openapi: 3.0.0
servers:
  - url: https://rest.zuora.com
info:
  contact:
    email: docs@zuora.com
    x-twitter: Zuora
  description: |
    

    # Introduction

    Welcome to the reference for the Zuora Billing REST API!

    To learn about the common use cases of Zuora Billing REST APIs, check out the [API Guides](https://www.zuora.com/developer/api-guides/).

    In addition to Zuora API Reference; Billing, we also provide API references for other Zuora products:

      * [API Reference: Collect](https://www.zuora.com/developer/collect-api/)
      * [API Reference: Revenue](https://www.zuora.com/developer/revpro-api/)
        
    The Zuora REST API provides a broad set of operations and resources that:

      * Enable Web Storefront integration from your website.
      * Support self-service subscriber sign-ups and account management.
      * Process revenue schedules through custom revenue rule models.
      * Enable manipulation of most objects in the Zuora Billing Object Model.

    Want to share your opinion on how our API works for you? <a href="https://community.zuora.com/t5/Developers/API-Feedback-Form/gpm-p/21399" target="_blank">Tell us how you feel </a>about using our API and what we can do to make it better.

    ## Access to the API

    If you have a Zuora tenant, you can access the Zuora REST API via one of the following endpoints:

    | Tenant              | Base URL for REST Endpoints |
    |-------------------------|-------------------------|
    |US Production | https://rest.zuora.com   |
    |US API Sandbox    | https://rest.apisandbox.zuora.com|
    |US Performance Test | https://rest.pt1.zuora.com |
    |US Production Copy | Submit a request at <a href="http://support.zuora.com/" target="_blank">Zuora Global Support</a> to enable the Zuora REST API in your tenant and obtain the base URL for REST endpoints. See [REST endpoint base URL of Production Copy (Service) Environment for existing and new customers](https://community.zuora.com/t5/API/REST-endpoint-base-URL-of-Production-Copy-Service-Environment/td-p/29611) for more information. |
    |US Cloud Production | 	https://rest.na.zuora.com |
    |US Cloud API Sandbox | 	https://rest.sandbox.na.zuora.com |
    |US Central Sandbox | 	https://rest.test.zuora.com |    
    |EU Production | https://rest.eu.zuora.com |
    |EU API Sandbox | https://rest.sandbox.eu.zuora.com |
    |EU Central Sandbox | 	https://rest.test.eu.zuora.com |

    The Production endpoint provides access to your live user data. Sandbox tenants are a good place to test code without affecting real-world data. If you would like Zuora to provision a Sandbox tenant for you, contact your Zuora representative for assistance.


    If you do not have a Zuora tenant, go to <a href="https://www.zuora.com/resource/zuora-test-drive" target="_blank">https://www.zuora.com/resource/zuora-test-drive</a> and sign up for a Production Test Drive tenant. The tenant comes with seed data, including a sample product catalog.

    # API Changelog
    You can find the <a href="https://community.zuora.com/t5/Developers/API-Changelog/gpm-p/18092" target="_blank">Changelog</a> of the API Reference: Billing in the Zuora Community.

    # Authentication

    ## OAuth v2.0

    Zuora recommends that you use OAuth v2.0 to authenticate to the Zuora REST API. Currently, OAuth is not available in every environment. See [Zuora Testing Environments](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/D_Zuora_Environments) for more information.

    Zuora recommends you to create a dedicated API user with API write access on a tenant when authenticating via OAuth, and then create an OAuth client for this user. See <a href="https://knowledgecenter.zuora.com/CF_Users_and_Administrators/A_Administrator_Settings/Manage_Users/Create_an_API_User" target="_blank">Create an API User</a> for how to do this. By creating a dedicated API user, you can control permissions of the API user without affecting other non-API users.

    If a user is deactivated, all of the user's OAuth clients will be automatically deactivated.

    Authenticating via OAuth requires the following steps:
    1. Create a Client
    2. Generate a Token
    3. Make Authenticated Requests

    ### Create a Client

    You must first [create an OAuth client](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/A_Administrator_Settings/Manage_Users#Create_an_OAuth_Client_for_a_User) in the Zuora UI. To do this, you must be an administrator of your Zuora tenant. This is a one-time operation. You will be provided with a Client ID and a Client Secret. Please note this information down, as it will be required for the next step.

    **Note:** The OAuth client will be owned by a Zuora user account. If you want to perform PUT, POST, or DELETE operations using the OAuth client, the owner of the OAuth client must have a Platform role that includes the "API Write Access" permission.

    ### Generate a Token

    After creating a client, you must make a call to obtain a bearer token using the [Generate an OAuth token](https://www.zuora.com/developer/api-reference/#operation/createToken) operation. This operation requires the following parameters:
    - `client_id` - the Client ID displayed when you created the OAuth client in the previous step
    - `client_secret` - the Client Secret displayed when you created the OAuth client in the previous step
    - `grant_type` - must be set to `client_credentials`

    **Note**: The Client ID and Client Secret mentioned above were displayed when you created the OAuth Client in the prior step. The [Generate an OAuth token](https://www.zuora.com/developer/api-reference/#operation/createToken) response specifies how long the bearer token is valid for. You should reuse the bearer token until it is expired. When the token is expired, call [Generate an OAuth token](https://www.zuora.com/developer/api-reference/#operation/createToken) again to generate a new one.

    ### Make Authenticated Requests

    To authenticate subsequent API requests, you must provide a valid bearer token in an HTTP header:

    `Authorization: Bearer {bearer_token}`

    If you have [Zuora Multi-entity](https://www.zuora.com/developer/api-reference/#tag/Entities) enabled, you need to set an additional header to specify the ID of the entity that you want to access. You can use the `scope` field in the [Generate an OAuth token](https://www.zuora.com/developer/api-reference/#operation/createToken) response to determine whether you need to specify an entity ID.

    If the `scope` field contains more than one entity ID, you must specify the ID of the entity that you want to access. For example, if the `scope` field contains `entity.1a2b7a37-3e7d-4cb3-b0e2-883de9e766cc` and `entity.c92ed977-510c-4c48-9b51-8d5e848671e9`, specify one of the following headers:
    - `Zuora-Entity-Ids: 1a2b7a37-3e7d-4cb3-b0e2-883de9e766cc`
    - `Zuora-Entity-Ids: c92ed977-510c-4c48-9b51-8d5e848671e9`

    **Note**: For a limited period of time, Zuora will accept the `entityId` header as an alternative to the `Zuora-Entity-Ids` header. If you choose to set the `entityId` header, you must remove all "-" characters from the entity ID in the `scope` field.

    If the `scope` field contains a single entity ID, you do not need to specify an entity ID.

    ## Other Supported Authentication Schemes

    Zuora continues to support the following additional legacy means of authentication:

      * Use username and password. Include authentication with each request in the header: 
      
        * `apiAccessKeyId` 
        * `apiSecretAccessKey`
        
        Zuora recommends that you create an API user specifically for making API calls. See <a href="https://knowledgecenter.zuora.com/CF_Users_and_Administrators/A_Administrator_Settings/Manage_Users/Create_an_API_User" target="_blank">Create an API User</a> for more information.
      
      * Use an authorization cookie. The cookie authorizes the user to make calls to the REST API for the duration specified in  **Administration > Security Policies > Session timeout**. The cookie expiration time is reset with this duration after every call to the REST API. To obtain a cookie, call the [Connections](https://www.zuora.com/developer/api-reference/#tag/Connections) resource with the following API user information: 
      
        *   ID    
        *   Password
        
      * For CORS-enabled APIs only: Include a 'single-use' token in the request header, which re-authenticates the user with each request. See below for more details.

    ### Entity Id and Entity Name

    The `entityId` and `entityName` parameters are only used for [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity "Zuora Multi-entity"). These are the legacy parameters that Zuora will only continue to support for a period of time. Zuora recommends you to use the `Zuora-Entity-Ids` parameter instead.


    The  `entityId` and `entityName` parameters specify the Id and the [name of the entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity/B_Introduction_to_Entity_and_Entity_Hierarchy#Name_and_Display_Name "Introduction to Entity and Entity Hierarchy") that you want to access, respectively. Note that you must have permission to access the entity. 

    You can specify either the `entityId` or `entityName` parameter in the authentication to access and view an entity.

      * If both `entityId` and `entityName` are specified in the authentication, an error occurs. 
      * If neither `entityId` nor `entityName` is specified in the authentication, you will log in to the entity in which your user account is created. 
      

    To get the entity Id and entity name, you can use the GET Entities REST call. For more information, see [API User Authentication](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity/A_Overview_of_Multi-entity#API_User_Authentication "API User Authentication").
      
      ### Token Authentication for CORS-Enabled APIs
      
      The CORS mechanism enables REST API calls to Zuora to be made directly from your customer's browser, with all credit card and security information transmitted directly to Zuora. This minimizes your PCI compliance burden, allows you to implement advanced validation on your payment forms, and  makes your payment forms look just like any other part of your website.
      
    For security reasons, instead of using cookies, an API request via CORS uses **tokens** for authentication.

    The token method of authentication is only designed for use with requests that must originate from your customer's browser; **it should  not be considered a replacement to the existing cookie authentication** mechanism.

    See [Zuora CORS REST](https://knowledgecenter.zuora.com/DC_Developers/C_REST_API/Zuora_CORS_REST "Zuora CORS REST") for details on how CORS works and how you can begin to implement customer calls to the Zuora REST APIs. See  [HMAC Signatures](https://www.zuora.com/developer/api-reference/#operation/POSTHMACSignature "HMAC Signatures") for details on the HMAC method that returns the authentication token.

    # Requests and Responses

    ## Request IDs 
    As a general rule, when asked to supply a "key" for an account or subscription (accountKey, account-key, subscriptionKey, subscription-key), you can provide either the actual ID or  the number of the entity.

    ## HTTP Request Body

    Most of the parameters and data accompanying your requests will be contained in the body of the HTTP request. 

    The Zuora REST API accepts JSON in the HTTP request body. No other data format (e.g., XML) is supported.

    ### Data Type

    ([Actions](https://www.zuora.com/developer/api-reference/#tag/Actions) and CRUD operations only) We recommend that you do not specify the decimal values with quotation marks, commas, and spaces. Use characters of `+-0-9.eE`, for example, `5`, `1.9`, `-8.469`, and `7.7e2`. Also, Zuora does not convert currencies for decimal values.

    ## Testing a Request

    Use a third party client, such as [curl](https://curl.haxx.se "curl"), [Postman](https://www.getpostman.com "Postman"), or [Advanced REST Client](https://advancedrestclient.com "Advanced REST Client"), to test the Zuora REST API.

    You can test the Zuora REST API from the Zuora API Sandbox or Production tenants. If connecting to Production, bear in mind that you are working with your live production data, not sample data or test data.

    ## Testing with Credit Cards

    Sooner or later it will probably be necessary to test some transactions that involve credit cards. For suggestions on how to handle this, see [Going Live With Your Payment Gateway](https://knowledgecenter.zuora.com/CB_Billing/M_Payment_Gateways/C_Managing_Payment_Gateways/B_Going_Live_Payment_Gateways#Testing_with_Credit_Cards "C_Zuora_User_Guides/A_Billing_and_Payments/M_Payment_Gateways/C_Managing_Payment_Gateways/B_Going_Live_Payment_Gateways#Testing_with_Credit_Cards"
    ).

    ## Concurrent Request Limits

    Zuora enforces tenant-level concurrent request limits. See <a href="https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits" target="_blank">Concurrent Request Limits</a> for more information.

    ## Timeout Limit

    If a request does not complete within 120 seconds, the request times out and Zuora returns a Gateway Timeout error.


    # Error Handling

    If a request to Zuora Billing REST API with an endpoint starting with `/v1` (except [Actions](https://www.zuora.com/developer/api-reference/#tag/Actions) and CRUD operations) fails, the response will contain an eight-digit error code with a corresponding error message to indicate the details of the error.

    The following code snippet is a sample error response that contains an error code and message pair:

    ```
     {
       "success": false,
       "processId": "CBCFED6580B4E076",
       "reasons":  [
         {
          "code": 53100320,
          "message": "'termType' value should be one of: TERMED, EVERGREEN"
         }
        ]
     }
    ```
    The `success` field indicates whether the API request has succeeded. The `processId` field is a Zuora internal ID that you can provide to Zuora Global Support for troubleshooting purposes.

    The `reasons` field contains the actual error code and message pair. The error code begins with `5` or `6` means that you encountered a certain issue that is specific to a REST API resource in Zuora Billing. For example, `53100320` indicates that an invalid value is specified for the `termType` field of the `subscription` object.

    The error code beginning with `9` usually indicates that an authentication-related issue occurred, and it can also indicate other unexpected errors depending on different cases. For example, `90000011` indicates that an invalid credential is provided in the request header. 

    When troubleshooting the error, you can divide the error code into two components: REST API resource code and error category code. See the following Zuora error code sample:

    <a href="https://assets.zuora.com/zuora-documentation/ZuoraErrorCode.jpeg" target="_blank"><img src="https://assets.zuora.com/zuora-documentation/ZuoraErrorCode.jpeg" alt="Zuora Error Code Sample"></a>


    **Note:** Zuora determines resource codes based on the request payload. Therefore, if GET and DELETE requests that do not contain payloads fail, you will get `500000` as the resource code, which indicates an unknown object and an unknown field. 
    The error category code of these requests is valid and follows the rules described in the [Error Category Code](https://www.zuora.com/developer/api-reference/#section/Error-Handling/Error-Category-Code) section. 
    In such case, you can refer to the returned error message to troubleshoot.


    ## REST API Resource Code

    The 6-digit resource code indicates the REST API resource, typically a field of a Zuora object, on which the issue occurs. In the preceding example, `531003` refers to the `termType` field of the `subscription` object. 

    The value range for all REST API resource codes is from `500000` to `679999`. See [Resource Codes](https://knowledgecenter.zuora.com/Central_Platform/API/AA_REST_API/Resource_Codes) in the Knowledge Center for a full list of resource codes.

    ## Error Category Code

    The 2-digit error category code identifies the type of error, for example, resource not found or missing required field. 

    The following table describes all error categories and the corresponding resolution:

    | Code    | Error category              | Description    | Resolution    |
    |:--------|:--------|:--------|:--------|
    | 10      | Permission or access denied | The request cannot be processed because a certain tenant or user permission is missing. | Check the missing tenant or user permission in the response message and contact [Zuora Global Support](https://support.zuora.com) for enablement. |
    | 11      | Authentication failed       | Authentication fails due to invalid API authentication credentials. | Ensure that a valid API credential is specified. |
    | 20      | Invalid format or value     | The request cannot be processed due to an invalid field format or value. | Check the invalid field in the error message, and ensure that the format and value of all fields you passed in are valid. |
    | 21      | Unknown field in request    | The request cannot be processed because an unknown field exists in the request body. | Check the unknown field name in the response message, and ensure that you do not include any unknown field in the request body. |
    | 22      | Missing required field      | The request cannot be processed because a required field in the request body is missing. | Check the missing field name in the response message, and ensure that you include all required fields in the request body. |
    | 30      | Rule restriction            | The request cannot be processed due to the violation of a Zuora business rule. | Check the response message and ensure that the API request meets the specified business rules. |
    | 40      | Not found                   | The specified resource cannot be found. | Check the response message and ensure that the specified resource exists in your Zuora tenant. |
    | 45      | Unsupported request         | The requested endpoint does not support the specified HTTP method. | Check your request and ensure that the endpoint and method matches. |
    | 50      | Locking contention          | This request cannot be processed because the objects this request is trying to modify are being modified by another API request, UI operation, or batch job process. | <p>Resubmit the request first to have another try.</p> <p>If this error still occurs, contact [Zuora Global Support](https://support.zuora.com) with the returned `Zuora-Request-Id` value in the response header for assistance.</p> |
    | 60      | Internal error              | The server encounters an internal error. | Contact [Zuora Global Support](https://support.zuora.com) with the returned `Zuora-Request-Id` value in the response header for assistance. |
    | 70      | Request exceeded limit      | The total number of concurrent requests exceeds the limit allowed by the system. | <p>Resubmit the request after the number of seconds specified by the `Retry-After` value in the response header.</p> <p>Check [Concurrent request limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits) for details about Zuora’s concurrent request limit policy.</p> |
    | 90      | Malformed request           | The request cannot be processed due to JSON syntax errors. | Check the syntax error in the JSON request body and ensure that the request is in the correct JSON format. |
    | 99      | Integration error           | The server encounters an error when communicating with an external system, for example, payment gateway, tax engine provider. | Check the response message and take action accordingly. |


    # Pagination

    When retrieving information (using GET methods), the optional `pageSize` query parameter sets the maximum number of rows to return in a response. The maximum is `40`; larger values are treated as `40`. If this value is empty or invalid, `pageSize` typically defaults to `10`.

    The default value for the maximum number of rows retrieved can be overridden at the method level.

    If more rows are available, the response will include a `nextPage` element, which contains a URL for requesting the next page.  If this value is not provided, no more rows are available. No "previous page" element is explicitly provided; to support backward paging, use the previous call.

    ## Array Size

    For data items that are not paginated, the REST API supports arrays of up to 300 rows.  Thus, for instance, repeated pagination can retrieve thousands of customer accounts, but within any account an array of no more than 300 rate plans is returned.

    # API Versions

    The Zuora REST API are version controlled. Versioning ensures that Zuora REST API changes are backward compatible. Zuora uses a major and minor version nomenclature to manage changes. By specifying a version in a REST request, you can get expected responses regardless of future changes to the API.

    ## Major Version

    The major version number of the REST API appears in the REST URL. Currently, Zuora only supports the **v1** major version. For example, `POST https://rest.zuora.com/v1/subscriptions`.

    ## Minor Version

    Zuora uses minor versions for the REST API to control small changes. For example, a field in a REST method is deprecated and a new field is used to replace it. 

    Some fields in the REST methods are supported as of minor versions. If a field is not noted with a minor version, this field is available for all minor versions. If a field is noted with a minor version, this field is in version control. You must specify the supported minor version in the request header to process without an error. 

    If a field is in version control, it is either with a minimum minor version or a maximum minor version, or both of them. You can only use this field with the minor version between the minimum and the maximum minor versions. For example, the `invoiceCollect` field in the POST Subscription method is in version control and its maximum minor version is 189.0. You can only use this field with the minor version 189.0 or earlier.

    If you specify a version number in the request header that is not supported, Zuora will use the minimum minor version of the REST API. In our REST API documentation, if a field or feature requires a minor version number, we note that in the field description.

    You only need to specify the version number when you use the fields require a minor version. To specify the minor version, set the `zuora-version` parameter to the minor version number in the request header for the request call. For example, the `collect` field is in 196.0 minor version. If you want to use this field for the POST Subscription method, set the  `zuora-version` parameter to `196.0` in the request header. The `zuora-version` parameter is case sensitive.

    For all the REST API fields, by default, if the minor version is not specified in the request header, Zuora will use the minimum minor version of the REST API to avoid breaking your integration. 

    ### Minor Version History

    The supported minor versions are not serial. This section documents the changes made to each Zuora REST API minor version.

    The following table lists the supported versions and the fields that have a Zuora REST API minor version.

    | Fields         | Minor Version      | REST Methods    | Description |
    |:--------|:--------|:--------|:--------|
    | invoiceCollect | 189.0 and earlier  | [Create Subscription](https://www.zuora.com/developer/api-reference/#operation/POST_Subscription "Create Subscription"); [Update Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_Subscription "Update Subscription"); [Renew Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_RenewSubscription "Renew Subscription"); [Cancel Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_CancelSubscription "Cancel Subscription"); [Suspend Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_SuspendSubscription "Suspend Subscription"); [Resume Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_ResumeSubscription "Resume Subscription"); [Create Account](https://www.zuora.com/developer/api-reference/#operation/POST_Account "Create Account")|Generates an invoice and collects a payment for a subscription. |
    | collect        | 196.0 and later    | [Create Subscription](https://www.zuora.com/developer/api-reference/#operation/POST_Subscription "Create Subscription"); [Update Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_Subscription "Update Subscription"); [Renew Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_RenewSubscription "Renew Subscription"); [Cancel Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_CancelSubscription "Cancel Subscription"); [Suspend Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_SuspendSubscription "Suspend Subscription"); [Resume Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_ResumeSubscription "Resume Subscription"); [Create Account](https://www.zuora.com/developer/api-reference/#operation/POST_Account "Create Account")|Collects an automatic payment for a subscription. |
    | invoice | 196.0 and 207.0| [Create Subscription](https://www.zuora.com/developer/api-reference/#operation/POST_Subscription "Create Subscription"); [Update Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_Subscription "Update Subscription"); [Renew Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_RenewSubscription "Renew Subscription"); [Cancel Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_CancelSubscription "Cancel Subscription"); [Suspend Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_SuspendSubscription "Suspend Subscription"); [Resume Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_ResumeSubscription "Resume Subscription"); [Create Account](https://www.zuora.com/developer/api-reference/#operation/POST_Account "Create Account")|Generates an invoice for a subscription. |
    | invoiceTargetDate | 196.0 and earlier  | [Preview Subscription](https://www.zuora.com/developer/api-reference/#operation/POST_SubscriptionPreview "Preview Subscription") |Date through which charges are calculated on the invoice, as `yyyy-mm-dd`. |
    | invoiceTargetDate | 207.0 and earlier  | [Create Subscription](https://www.zuora.com/developer/api-reference/#operation/POST_Subscription "Create Subscription"); [Update Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_Subscription "Update Subscription"); [Renew Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_RenewSubscription "Renew Subscription"); [Cancel Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_CancelSubscription "Cancel Subscription"); [Suspend Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_SuspendSubscription "Suspend Subscription"); [Resume Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_ResumeSubscription "Resume Subscription"); [Create Account](https://www.zuora.com/developer/api-reference/#operation/POST_Account "Create Account")|Date through which charges are calculated on the invoice, as `yyyy-mm-dd`. |
    | targetDate | 207.0 and later | [Preview Subscription](https://www.zuora.com/developer/api-reference/#operation/POST_SubscriptionPreview "Preview Subscription") |Date through which charges are calculated on the invoice, as `yyyy-mm-dd`. |
    | targetDate | 211.0 and later | [Create Subscription](https://www.zuora.com/developer/api-reference/#operation/POST_Subscription "Create Subscription"); [Update Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_Subscription "Update Subscription"); [Renew Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_RenewSubscription "Renew Subscription"); [Cancel Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_CancelSubscription "Cancel Subscription"); [Suspend Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_SuspendSubscription "Suspend Subscription"); [Resume Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_ResumeSubscription "Resume Subscription"); [Create Account](https://www.zuora.com/developer/api-reference/#operation/POST_Account "Create Account")|Date through which charges are calculated on the invoice, as `yyyy-mm-dd`. |
    | includeExisting DraftInvoiceItems | 196.0 and earlier| [Preview Subscription](https://www.zuora.com/developer/api-reference/#operation/POST_SubscriptionPreview "Preview Subscription"); [Update Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_Subscription "Update Subscription") | Specifies whether to include draft invoice items in subscription previews. Specify it to be `true` (default) to include draft invoice items in the preview result. Specify it to be `false` to excludes draft invoice items in the preview result. |
    | includeExisting DraftDocItems | 207.0 and later  | [Preview Subscription](https://www.zuora.com/developer/api-reference/#operation/POST_SubscriptionPreview "Preview Subscription"); [Update Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_Subscription "Update Subscription") | Specifies whether to include draft invoice items in subscription previews. Specify it to be `true` (default) to include draft invoice items in the preview result. Specify it to be `false` to excludes draft invoice items in the preview result. |
    | previewType | 196.0 and earlier| [Preview Subscription](https://www.zuora.com/developer/api-reference/#operation/POST_SubscriptionPreview "Preview Subscription"); [Update Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_Subscription "Update Subscription") | The type of preview you will receive. The possible values are `InvoiceItem`(default), `ChargeMetrics`, and `InvoiceItemChargeMetrics`. |
    | previewType | 207.0 and later  | [Preview Subscription](https://www.zuora.com/developer/api-reference/#operation/POST_SubscriptionPreview "Preview Subscription"); [Update Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_Subscription "Update Subscription") | The type of preview you will receive. The possible values are `LegalDoc`(default), `ChargeMetrics`, and `LegalDocChargeMetrics`. |
    | runBilling  | 211.0 and later  | [Create Subscription](https://www.zuora.com/developer/api-reference/#operation/POST_Subscription "Create Subscription"); [Update Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_Subscription "Update Subscription"); [Renew Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_RenewSubscription "Renew Subscription"); [Cancel Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_CancelSubscription "Cancel Subscription"); [Suspend Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_SuspendSubscription "Suspend Subscription"); [Resume Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_ResumeSubscription "Resume Subscription"); [Create Account](https://www.zuora.com/developer/api-reference/#operation/POST_Account "Create Account")|Generates an invoice or credit memo for a subscription. **Note:** Credit memos are only available if you have the Invoice Settlement feature enabled. |
    | invoiceDate | 214.0 and earlier  | [Invoice and Collect](https://www.zuora.com/developer/api-reference/#operation/POST_TransactionInvoicePayment "Invoice and Collect") |Date that should appear on the invoice being generated, as `yyyy-mm-dd`. |
    | invoiceTargetDate | 214.0 and earlier  | [Invoice and Collect](https://www.zuora.com/developer/api-reference/#operation/POST_TransactionInvoicePayment "Invoice and Collect") |Date through which to calculate charges on this account if an invoice is generated, as `yyyy-mm-dd`. |
    | documentDate | 215.0 and later | [Invoice and Collect](https://www.zuora.com/developer/api-reference/#operation/POST_TransactionInvoicePayment "Invoice and Collect") |Date that should appear on the invoice and credit memo being generated, as `yyyy-mm-dd`. |
    | targetDate | 215.0 and later | [Invoice and Collect](https://www.zuora.com/developer/api-reference/#operation/POST_TransactionInvoicePayment "Invoice and Collect") |Date through which to calculate charges on this account if an invoice or a credit memo is generated, as `yyyy-mm-dd`. |
    | memoItemAmount | 223.0 and earlier | [Create credit memo from charge](https://www.zuora.com/developer/api-reference/#operation/POST_CreditMemoFromPrpc "Create credit memo from charge"); [Create debit memo from charge](https://www.zuora.com/developer/api-reference/#operation/POST_DebitMemoFromPrpc "Create debit memo from charge") | Amount of the memo item. |
    | amount | 224.0 and later | [Create credit memo from charge](https://www.zuora.com/developer/api-reference/#operation/POST_CreditMemoFromPrpc "Create credit memo from charge"); [Create debit memo from charge](https://www.zuora.com/developer/api-reference/#operation/POST_DebitMemoFromPrpc "Create debit memo from charge") | Amount of the memo item. |
    | subscriptionNumbers | 222.4 and earlier | [Create order](https://www.zuora.com/developer/api-reference/#operation/POST_Order "Create order") | Container for the subscription numbers of the subscriptions in an order. |
    | subscriptions | 223.0 and later | [Create order](https://www.zuora.com/developer/api-reference/#operation/POST_Order "Create order") | Container for the subscription numbers and statuses in an order. |
    | creditTaxItems | 238.0 and earlier | [Get credit memo items](https://www.zuora.com/developer/api-reference/#operation/GET_CreditMemoItems "Get credit memo items"); [Get credit memo item](https://www.zuora.com/developer/api-reference/#operation/GET_CreditMemoItem "Get credit memo item") | Container for the taxation items of the credit memo item. |
    | taxItems | 238.0 and earlier | [Get debit memo items](https://www.zuora.com/developer/api-reference/#operation/GET_DebitMemoItems "Get debit memo items"); [Get debit memo item](https://www.zuora.com/developer/api-reference/#operation/GET_DebitMemoItem "Get debit memo item") | Container for the taxation items of the debit memo item. |
    | taxationItems | 239.0 and later | [Get credit memo items](https://www.zuora.com/developer/api-reference/#operation/GET_CreditMemoItems "Get credit memo items"); [Get credit memo item](https://www.zuora.com/developer/api-reference/#operation/GET_CreditMemoItem "Get credit memo item"); [Get debit memo items](https://www.zuora.com/developer/api-reference/#operation/GET_DebitMemoItems "Get debit memo items"); [Get debit memo item](https://www.zuora.com/developer/api-reference/#operation/GET_DebitMemoItem "Get debit memo item") | Container for the taxation items of the memo item. |
    | chargeId | 256.0 and earlier | [Create credit memo from charge](https://www.zuora.com/developer/api-reference/#operation/POST_CreditMemoFromPrpc "Create credit memo from charge"); [Create debit memo from charge](https://www.zuora.com/developer/api-reference/#operation/POST_DebitMemoFromPrpc "Create debit memo from charge") | ID of the product rate plan charge that the memo is created from. |
    | productRatePlanChargeId | 257.0 and later | [Create credit memo from charge](https://www.zuora.com/developer/api-reference/#operation/POST_CreditMemoFromPrpc "Create credit memo from charge"); [Create debit memo from charge](https://www.zuora.com/developer/api-reference/#operation/POST_DebitMemoFromPrpc "Create debit memo from charge") | ID of the product rate plan charge that the memo is created from. |
    | comment | 256.0 and earlier | [Create credit memo from charge](https://www.zuora.com/developer/api-reference/#operation/POST_CreditMemoFromPrpc "Create credit memo from charge"); [Create debit memo from charge](https://www.zuora.com/developer/api-reference/#operation/POST_DebitMemoFromPrpc "Create debit memo from charge"); [Create credit memo from invoice](https://www.zuora.com/developer/api-reference/#operation/POST_CreditMemoFromInvoice "Create credit memo from invoice"); [Create debit memo from invoice](https://www.zuora.com/developer/api-reference/#operation/POST_DebitMemoFromInvoice "Create debit memo from invoice"); [Get credit memo items](https://www.zuora.com/developer/api-reference/#operation/GET_CreditMemoItems "Get credit memo items"); [Get credit memo item](https://www.zuora.com/developer/api-reference/#operation/GET_CreditMemoItem "Get credit memo item"); [Get debit memo items](https://www.zuora.com/developer/api-reference/#operation/GET_DebitMemoItems "Get debit memo items"); [Get debit memo item](https://www.zuora.com/developer/api-reference/#operation/GET_DebitMemoItem "Get debit memo item") | Comments about the product rate plan charge, invoice item, or memo item. |
    | description | 257.0 and later | [Create credit memo from charge](https://www.zuora.com/developer/api-reference/#operation/POST_CreditMemoFromPrpc "Create credit memo from charge"); [Create debit memo from charge](https://www.zuora.com/developer/api-reference/#operation/POST_DebitMemoFromPrpc "Create debit memo from charge"); [Create credit memo from invoice](https://www.zuora.com/developer/api-reference/#operation/POST_CreditMemoFromInvoice "Create credit memo from invoice"); [Create debit memo from invoice](https://www.zuora.com/developer/api-reference/#operation/POST_DebitMemoFromInvoice "Create debit memo from invoice"); [Get credit memo items](https://www.zuora.com/developer/api-reference/#operation/GET_CreditMemoItems "Get credit memo items"); [Get credit memo item](https://www.zuora.com/developer/api-reference/#operation/GET_CreditMemoItem "Get credit memo item"); [Get debit memo items](https://www.zuora.com/developer/api-reference/#operation/GET_DebitMemoItems "Get debit memo items"); [Get debit memo item](https://www.zuora.com/developer/api-reference/#operation/GET_DebitMemoItem "Get debit memo item") | Description of the the product rate plan charge, invoice item, or memo item. |


    #### Version 207.0 and Later

    The response structure of the [Preview Subscription](https://www.zuora.com/developer/api-reference/#operation/POST_SubscriptionPreview "Preview Subscription") and [Update Subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_Subscription "Update Subscription") methods are changed. The following invoice related response fields are moved to the invoice container:

      * amount
      * amountWithoutTax
      * taxAmount
      * invoiceItems
      * targetDate
      * chargeMetrics

    # Zuora Billing Object Model

    The following diagram is a high-level view of how key business objects are related to one another within Zuora Billing.

    Click the diagram to open it in a new tab and zoom in.
    For more information about the different sections of the diagram, see
    <a href="https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/A_Zuora_Billing_business_object_model" target="_blank">Zuora Billing business object model</a>.

    <a href="https://assets.zuora.com/zuora-documentation/Zuora_Billing_object_model_Sep2020.png" target="_blank"><img src="https://assets.zuora.com/zuora-documentation/Zuora_Billing_object_model_Sep2020.png" alt="Zuora Billing object model diagram"></a>

    This diagram is intended to provide a conceptual understanding; it does not illustrate a specific way to integrate with Zuora.

    The diagram includes the Orders feature and the Invoice Settlement feature.
    If your organization does not use either of these features, see
    <a href="https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/B_Zuora_Billing_business_object_model_prior_to_Orders_and_Invoice_Settlement" target="_blank">Zuora Billing business object model prior to Orders and Invoice Settlement</a>
    for an alternative diagram.

    ## API Names

    You can use the [Describe object](https://www.zuora.com/developer/api-reference/#operation/GET_Describe) operation to list the fields of each Zuora object that is available in your tenant. When you call the operation, you must specify the API name of the Zuora object.

    The following table provides the API name of each Zuora object:

    | Object                                        | API Name                                   |
    |-----------------------------------------------|--------------------------------------------|
    | Account                                       | `Account`                                  |
    | Accounting Code                               | `AccountingCode`                           |
    | Accounting Period                             | `AccountingPeriod`                         |
    | Amendment                                     | `Amendment`                                |
    | Application Group                             | `ApplicationGroup`                         |
    | Billing Run                                   | <p>`BillingRun` - API name used  in the [Describe object](https://www.zuora.com/developer/api-reference/#operation/GET_Describe) operation, Export ZOQL queries, and Data Query.</p> <p>`BillRun` - API name used in the [Actions](https://www.zuora.com/developer/api-reference/#tag/Actions). See the CRUD oprations of [Bill Run](https://www.zuora.com/developer/api-reference/#tag/Bill-Run) for more information about the `BillRun` object. `BillingRun` and `BillRun` have different fields. |
    | Contact                                       | `Contact`                                  |
    | Contact Snapshot                              | `ContactSnapshot`                          |
    | Credit Balance Adjustment                     | `CreditBalanceAdjustment`                  |
    | Credit Memo                                   | `CreditMemo`                               |
    | Credit Memo Application                       | `CreditMemoApplication`                    |
    | Credit Memo Application Item                  | `CreditMemoApplicationItem`                |
    | Credit Memo Item                              | `CreditMemoItem`                           |
    | Credit Memo Part                              | `CreditMemoPart`                           |
    | Credit Memo Part Item                         | `CreditMemoPartItem`                       |
    | Credit Taxation Item                          | `CreditTaxationItem`                       |
    | Custom Exchange Rate                          | `FXCustomRate`                             |
    | Debit Memo                                    | `DebitMemo`                                |
    | Debit Memo Item                               | `DebitMemoItem`                            |
    | Debit Taxation Item                           | `DebitTaxationItem`                        |
    | Discount Applied Metrics                      | `DiscountAppliedMetrics`                   |
    | Entity                                        | `Tenant`                                   |
    | Feature                                       | `Feature`                                  |
    | Gateway Reconciliation Event                  | `PaymentGatewayReconciliationEventLog`     |
    | Gateway Reconciliation Job                    | `PaymentReconciliationJob`                 |
    | Gateway Reconciliation Log                    | `PaymentReconciliationLog`                 |
    | Invoice                                       | `Invoice`                                  |
    | Invoice Adjustment                            | `InvoiceAdjustment`                        |
    | Invoice Item                                  | `InvoiceItem`                              |
    | Invoice Item Adjustment                       | `InvoiceItemAdjustment`                    |
    | Invoice Payment                               | `InvoicePayment`                           |
    | Journal Entry                                 | `JournalEntry`                             |
    | Journal Entry Item                            | `JournalEntryItem`                         |
    | Journal Run                                   | `JournalRun`                               |
    | Order                                         | `Order`                                    |
    | Order Action                                  | `OrderAction`                              |
    | Order ELP                                     | `OrderElp`                                 |
    | Order Line Items                              | `OrderLineItems`                           |    
    | Order Item                                    | `OrderItem`                                |
    | Order MRR                                     | `OrderMrr`                                 |
    | Order Quantity                                | `OrderQuantity`                            |
    | Order TCB                                     | `OrderTcb`                                 |
    | Order TCV                                     | `OrderTcv`                                 |
    | Payment                                       | `Payment`                                  |
    | Payment Application                           | `PaymentApplication`                       |
    | Payment Application Item                      | `PaymentApplicationItem`                   |
    | Payment Method                                | `PaymentMethod`                            |
    | Payment Method Snapshot                       | `PaymentMethodSnapshot`                    |
    | Payment Method Transaction Log                | `PaymentMethodTransactionLog`              |
    | Payment Method Update                         | `UpdaterDetail`                            |
    | Payment Part                                  | `PaymentPart`                              |
    | Payment Part Item                             | `PaymentPartItem`                          |
    | Payment Run                                   | `PaymentRun`                               |
    | Payment Transaction Log                       | `PaymentTransactionLog`                    |
    | Processed Usage                               | `ProcessedUsage`                           |
    | Product                                       | `Product`                                  |
    | Product Feature                               | `ProductFeature`                           |
    | Product Rate Plan                             | `ProductRatePlan`                          |
    | Product Rate Plan Charge                      | `ProductRatePlanCharge`                    |
    | Product Rate Plan Charge Tier                 | `ProductRatePlanChargeTier`                |
    | Rate Plan                                     | `RatePlan`                                 |
    | Rate Plan Charge                              | `RatePlanCharge`                           |
    | Rate Plan Charge Tier                         | `RatePlanChargeTier`                       |
    | Refund                                        | `Refund`                                   |
    | Refund Application                            | `RefundApplication`                        |
    | Refund Application Item                       | `RefundApplicationItem`                    |
    | Refund Invoice Payment                        | `RefundInvoicePayment`                     |
    | Refund Part                                   | `RefundPart`                               |
    | Refund Part Item                              | `RefundPartItem`                           |
    | Refund Transaction Log                        | `RefundTransactionLog`                     |
    | Revenue Charge Summary                        | `RevenueChargeSummary`                     |
    | Revenue Charge Summary Item                   | `RevenueChargeSummaryItem`                 |
    | Revenue Event                                 | `RevenueEvent`                             |
    | Revenue Event Credit Memo Item                | `RevenueEventCreditMemoItem`               |
    | Revenue Event Debit Memo Item                 | `RevenueEventDebitMemoItem`                |
    | Revenue Event Invoice Item                    | `RevenueEventInvoiceItem`                  |
    | Revenue Event Invoice Item Adjustment         | `RevenueEventInvoiceItemAdjustment`        |
    | Revenue Event Item                            | `RevenueEventItem`                         |
    | Revenue Event Item Credit Memo Item           | `RevenueEventItemCreditMemoItem`           |
    | Revenue Event Item Debit Memo Item            | `RevenueEventItemDebitMemoItem`            |
    | Revenue Event Item Invoice Item               | `RevenueEventItemInvoiceItem`              |
    | Revenue Event Item Invoice Item Adjustment    | `RevenueEventItemInvoiceItemAdjustment`    |
    | Revenue Event Type                            | `RevenueEventType`                         |
    | Revenue Schedule                              | `RevenueSchedule`                          |
    | Revenue Schedule Credit Memo Item             | `RevenueScheduleCreditMemoItem`            |
    | Revenue Schedule Debit Memo Item              | `RevenueScheduleDebitMemoItem`             |
    | Revenue Schedule Invoice Item                 | `RevenueScheduleInvoiceItem`               |
    | Revenue Schedule Invoice Item Adjustment      | `RevenueScheduleInvoiceItemAdjustment`     |
    | Revenue Schedule Item                         | `RevenueScheduleItem`                      |
    | Revenue Schedule Item Credit Memo Item        | `RevenueScheduleItemCreditMemoItem`        |
    | Revenue Schedule Item Debit Memo Item         | `RevenueScheduleItemDebitMemoItem`         |
    | Revenue Schedule Item Invoice Item            | `RevenueScheduleItemInvoiceItem`           |
    | Revenue Schedule Item Invoice Item Adjustment | `RevenueScheduleItemInvoiceItemAdjustment` |
    | Subscription                                  | `Subscription`                             |
    | Subscription Product Feature                  | `SubscriptionProductFeature`               |
    | Taxable Item Snapshot                         | `TaxableItemSnapshot`                      |
    | Taxation Item                                 | `TaxationItem`                             |
    | Updater Batch                                 | `UpdaterBatch`                             |
    | Usage                                         | `Usage`                                    |
  title: "API Reference: Billing"
  version: 2021-08-20
  x-apisguru-categories:
    - financial
  x-logo:
    url: https://www.zuora.com/wp-content/uploads/2016/10/zuora-dev-logo-api-ref.svg
  x-origin:
    - format: openapi
      url: https://www.zuora.com/wp-content/themes/zuora/yaml/swagger.yaml?v-7.0
      version: "3.0"
  x-providerName: zuora.com
tags:
  - description: |
      Actions are operations that are batch in nature. For example, the "create", "update", "delete", and other operations allow changes to up-to 50 objects at a time. The "query" operation will return up-to 2000 result records back at a time, before requiring additional pages of data to be returned via a subsequent "queryMore" operation.

      The default WSDL version for Actions is 79. If you want to change the WSDL version, set the `X-Zuora-WSDL-Version` header. To find out in which WSDL version a particular object or field was introduced, see [Zuora SOAP API Version History](https://knowledgecenter.zuora.com/DC_Developers/G_SOAP_API/Zuora_SOAP_API_Version_History).

      **Note**: Actions do not support the Invoice Settlement feature. This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. Actions also do not support the Orders feature.
    name: Actions
  - description: ""
    name: Accounting Codes
  - description: ""
    name: Accounting Periods
  - description: |
      Some operations in this section are similar to each other, but are provided for different use scenarios. You should choose the one that best suits your needs.

      For example, the [Create account](https://www.zuora.com/developer/api-reference/#operation/POST_Account) operation is used to create an account with a credit card payment method, a bill-to contact, and optionally an sold-to contact or an associated subscription. If you want to create an account without creating any associated objects such as subscriptions, use [CRUD: Create Account](https://www.zuora.com/developer/api-reference/#operation/Object_POSTAccount) instead.

      If you want to create an account and the associated subscription at the same time without providing credit card information, use the [Subscribe](https://www.zuora.com/developer/api-reference/#operation/Action_POSTsubscribe) action.
    name: Accounts
  - description: |
      You can use amendments to modify subscriptions. However, Zuora recommends you to use [Update subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_Subscription) (recommended) or [Amend](https://www.zuora.com/developer/api-reference/#operation/Action_POSTamend) to do so.
    name: Amendments
  - description: ""
    name: Attachments
  - description: |
      Use the Bill Run call to create ad hoc bill runs and Post, Cancel, Query, and Delete bill runs.
    name: Bill Run
  - description: ""
    name: Billing Documents
  - description: ""
    name: Billing Preview Run
  - description: ""
    name: Catalog
  - description: |
      Charge Metrics provides a service to access key metrics for rate plan charges in Zuora, for example, Gross MRR, Net MRR, Gross TCV, and Net TCV.
    name: Charge Metrics
  - description: ""
    name: Charge Revenue Summaries
  - description: |
      A communication profile enables you to send specific event-driven notifications to targeted customer accounts.
      For more information, see [Communication profiles](https://knowledgecenter.zuora.com/Central_Platform/Notifications/C_Viewing_Profiles).

      You can manage communication profiles using the REST API:

        - [Retrieve a communication profile](https://www.zuora.com/developer/api-reference/#operation/Object_GETCommunicationProfile)
        - [Retrieve all notifications under a communication profile (using the Settings API)](https://knowledgecenter.zuora.com/Central_Platform/API/BB_C_Settings_API/Settings_API_tutorials/Get_all_Notifications_under_a_particular_Communication_Profile)
        - [Retrieve all communication profiles (using the Settings API)](https://knowledgecenter.zuora.com/Central_Platform/API/BB_C_Settings_API/Settings_API_tutorials/Get_all_Communication_Profiles)
        - [Update a communication profile (using the Settings API)](https://knowledgecenter.zuora.com/Central_Platform/API/BB_C_Settings_API/Settings_API_tutorials/Modify_a_Communication_Profile)
        - [Create a communication profile (using the Settings API)](https://knowledgecenter.zuora.com/Central_Platform/API/BB_C_Settings_API/Settings_API_tutorials/Create_a_new_Communication_Profile)
    name: Communication Profiles
  - description: ""
    name: Connections
  - description: ""
    name: Contacts
  - description: ""
    name: Credit Balance Adjustments
  - description: ""
    name: Credit Memos
  - description: ""
    name: Custom Exchange Rates
  - description: |
      With Custom Objects service, you can define custom objects, extending the Zuora data model to accommodate your specific use cases.

      If you use Postman, you can import the custom objects endpoints as a collection into your Postman app and try out different requests to learn how the API works. Click the following button to get started:

      [![Run in Postman](https://run.pstmn.io/button.svg)](https://www.getpostman.com/run-collection/1f068ba43651bf63c0d4)

      You can sign up for a free account on the [Postman website](https://identity.getpostman.com/signup) and download the app in case you do not use Postman yet.

      Note that the Custom Object Definitions API is versioned by `Zuora-Version` in the request header. The response may be different for the same request with a different API version. Specify `Zuora-Version` in the request header if you expect a specific response schema.

      ### Error handling      
      If the Custom Objects API call fails, an error code will be returned in the response body. See [Custom Objects API error code](https://knowledgecenter.zuora.com/Central_Platform/Custom_Objects/Z_Custom_Objects_API#Custom_Objects_API_error_code) for details.
    name: Custom Object Definitions
  - description: |
      With Custom Objects service, you can create, update, delete and find custom object records.

      If you use Postman, you can import the custom objects endpoints as a collection into your Postman app and try out different requests to learn how the API works. Click the following button to get started:

      [![Run in Postman](https://run.pstmn.io/button.svg)](https://www.getpostman.com/run-collection/1f068ba43651bf63c0d4)

      You can sign up for a free account on the [Postman website](https://identity.getpostman.com/signup) and download the app in case you do not use Postman yet.

      Note that the Custom Object Records API is versioned by `Zuora-Version` in the request header. The response may be different for the same request with a different API version. Specify `Zuora-Version` in the request header if you expect a specific response schema.

      ### Error handling      
      If the Custom Objects API call fails, an error code will be returned in the response body. See [Custom Objects API error code](https://knowledgecenter.zuora.com/Central_Platform/Custom_Objects/Z_Custom_Objects_API#Custom_Objects_API_error_code) for details.
    name: Custom Object Records
  - description: |
      With Custom Objects service, you can submit a bulk job request to delete or create custom object records in a batch.

      If you use Postman, you can import the custom objects endpoints as a collection into your Postman app and try out different requests to learn how the API works. Click the following button to get started:

      [![Run in Postman](https://run.pstmn.io/button.svg)](https://www.getpostman.com/run-collection/1f068ba43651bf63c0d4)

      You can sign up for a free account on the [Postman website](https://identity.getpostman.com/signup) and download the app in case you do not use Postman yet.

      Note that the Custom Object Jobs API is versioned by `Zuora-Version` in the request header. The response may be different for the same request with a different API version. Specify `Zuora-Version` in the request header if you expect a specific response schema.

      ### Error handling      
      If the Custom Objects API call fails, an error code will be returned in the response body. See [Custom Objects API error code](https://knowledgecenter.zuora.com/Central_Platform/Custom_Objects/Z_Custom_Objects_API#Custom_Objects_API_error_code) for details.
    name: Custom Object Jobs
  - description: |
      The Data Query feature enables you to perform SQL queries in your Zuora tenant. To learn how to get started with Data Query, see [Overview of Data Query](https://knowledgecenter.zuora.com/DC_Developers/BA_Data_Query/A_Overview_of_Data_Query).
    name: Data Queries
  - description: ""
    name: Debit Memos
  - description: ""
    name: Describe
  - description: ""
    name: Document Properties
  - description: ""
    name: Entities
  - description: ""
    name: Entity Connections
  - description: |
      The Event Trigger service manages the business events and trigger conditions that are defined on [Zuora Business Object Model](http://knowledgecenter.zuora.com/BB_Introducing_Z_Business/D_Zuora_Business_Objects_Relationship). When a Zuora object changes, the trigger conditions defined on the object are evaluated, and if any condition qualifies, a business event will be triggered and turned into a notification.

      **Note**: Event Triggers operations are only applicable to custom events.
    name: Event Triggers
  - description: ""
    name: Exports
  - description: ""
    name: Features
  - description: ""
    name: Files
  - description: ""
    name: HMAC Signatures
  - description: ""
    name: Hosted Pages
  - description: ""
    name: Imports
  - description: ""
    name: Invoice Adjustments
  - description: ""
    name: Invoice Item Adjustments
  - description: ""
    name: Invoice Items
  - description: ""
    name: Invoice Payments
  - description: ""
    name: Invoice Split Items
  - description: ""
    name: Invoice Splits
  - description: ""
    name: Invoices
  - description: ""
    name: Journal Runs
  - description: ""
    name: Mass Updater
  - description: |
      Notifications are the actions taken to inform users or call third-party endpoints when a certain event happens. Typical actions include emails and callouts. Callouts typically refer to HTTP invocations, such as HTTP calls to REST services.

      **NOTE:** Notifications are processed asynchronously and may be delivered with a delay and out of order.

      Notifications are associated with Communication Profiles, which allow you to send specific event-driven notifications to targeted customers. Zuora provides the following Settings API to access the settings of Communication Profiles:
        * [Get all Communication Profiles](https://knowledgecenter.zuora.com/DC_Developers/BB_C_Settings_API/Settings_API_tutorials/Get_all_Communication_Profiles)
        * [Create a new Communication Profile](https://knowledgecenter.zuora.com/DC_Developers/BB_C_Settings_API/Settings_API_tutorials/Create_a_new_Communication_Profile)
        * [Modify a Communication Profile](https://knowledgecenter.zuora.com/DC_Developers/BB_C_Settings_API/Settings_API_tutorials/Modify_a_Communication_Profile)
        * [Get all Notifications under a particular Communication Profile](https://knowledgecenter.zuora.com/DC_Developers/BB_C_Settings_API/Settings_API_tutorials/Get_all_Notifications_under_a_particular_Communication_Profile)
    name: Notifications
  - description: ""
    name: OAuth
  - description: ""
    name: Operations
  - description: ""
    name: Orders
  - description: ""
    name: Order Line Items
  - description: ""
    name: Payment Gateways
  - description: ""
    name: Payment Gateway Reconciliation
  - description: ""
    name: Payment Method Snapshots
  - description: ""
    name: Payment Method Transaction Logs
  - description: ""
    name: Payment Methods
  - description: ""
    name: Payment Runs
  - description: ""
    name: Payment Transaction Logs
  - description: ""
    name: Payments
  - description: ""
    name: Product Features
  - description: |
      To manage product rate plan charge tiers, use the [Product Rate Plan Charges](https://www.zuora.com/developer/api-reference/#tag/Product-Rate-Plan-Charges) operations instead to update the corresponding product rate plan charge with all the tiers.
    name: Product Rate Plan Charge Tiers
  - description: ""
    name: Product Rate Plan Charges
  - description: ""
    name: Product Rate Plans
  - description: ""
    name: Products
  - description: ""
    name: Quotes Document
  - description: ""
    name: Ramps
  - description: ""
    name: Rate Plan Charge Tiers
  - description: ""
    name: Rate Plan Charges
  - description: ""
    name: Rate Plans
  - description: ""
    name: Refund Invoice Payments
  - description: ""
    name: Refund Transaction Logs
  - description: ""
    name: Refunds
  - description: ""
    name: Revenue Events
  - description: ""
    name: Revenue Items
  - description: ""
    name: Revenue Rules
  - description: ""
    name: Revenue Schedules
  - description: ""
    name: RSA Signatures
  - description: ""
    name: Sequence Sets
  - description: |
      The Setting API provides a central API for managing settings in your Zuora tenant.

      If you use Postman, you can import the Settings API endpoints as a collection into your Postman app and try out different requests to learn how the API works. Click the following button to get started:

      [![Run in Postman](https://run.pstmn.io/button.svg)](https://www.getpostman.com/run-collection/1379901-d43e93a3-7d51-437c-b4cd-14163dd62fa2-SWLk4kiK)

      You can sign up for a free account on the [Postman website](https://identity.getpostman.com/signup) and download the app in case you do not use Postman yet.
    name: Settings
  - description: |
      **Note:** The Entitlements settings must be enabled to use this operation. Access to the Entitlements feature requires a specific edition of Zuora. See [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for details.    
    name: Subscription Product Features
  - description: ""
    name: Subscriptions
  - description: ""
    name: Summary Journal Entries
  - description: ""
    name: Taxation Items
  - description: ""
    name: Transactions
  - description: ""
    name: Unit Of Measure
  - description: ""
    name: Usage
  - description: ""
    name: Users
  - description: ""
    name: Workflows
  - description: |
      **Note:** You can only use the operations in this section if you have the Billing - Revenue Integration feature enabled. See [Billing - Revenue Integration](https://knowledgecenter.zuora.com/Zuora_Revenue/Billing_-_Revenue_Integration) for more information.
    name: Zuora Revenue Integration
paths:
  /charge-metrics/data/charge-metrics:
    get:
      description: |
        Retrieves key charge metrics about rate plan charges that have changes in a specified time range.

        The purpose of `fromTimestamp` and `toTimestamp` is to synchronize charge metrics data incrementally. 
      operationId: GET_ChargeMetrics
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Charge_Metrics_Accept"
        - description: |
            The starting date and time of a time range when changes are made to charge metrics, in `yyyy-mm-ddThh:mm:ssZ` format. For example, `2020-08-18T09:01:11Z`. The timestamp maps to the `UpdatedOn` timestamp of the to-be-exported object.
          in: query
          name: fromTimestamp
          required: true
          schema:
            format: date-time
            type: string
        - description: |
            The end date and time of a time range when changes are made to charge metrics, in `yyyy-mm-ddThh:mm:ssZ` format. For example, `2020-08-20T09:01:11Z`. The timestamp maps to the `UpdatedOn` timestamp of the to-be-exported object.
          in: query
          name: toTimestamp
          required: true
          schema:
            format: date-time
            type: string
      responses:
        "200":
          content:
            application/json-seq:
              examples:
                response:
                  value:
                    amendmentId: 2c92a00770ec485c01710777fe944f82
                    amendmentType: NewProduct
                    chargeNumber: C-00000001
                    createdOn: 2020-01-01T00:00:01+00:00
                    currency: USD
                    deleted: false
                    endDate: 2020-04-01
                    id: 8c6bab39-317b-471f-8c6d-9c23649ac548
                    invoiceOwnerAccountNumber: A-00000001
                    mrrDiscountAmount: 10
                    mrrGrossAmount: 100
                    mrrNetAmount: 90
                    productId: 2c92a0f94fded238014ff66557c22724
                    productRatePlanChargeId: 2c92a00770ec485c01710777fe944f82
                    productRatePlanId: 2c92a0f94fded238014ff6655d9127cc
                    ratePlanChargeId: 2c92a00770ec485c01710777ff284f8b
                    startDate: 2020-01-01
                    subscriptionName: A-S0000001
                    subscriptionOwnerAccountNumber: A-00000001
                    tcvDiscountAmount: 30
                    tcvGrossAmount: 300
                    tcvNetAmount: 270
                    updatedOn: 2020-01-01T00:00:01+00:00
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ChargeMetricsResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "400":
          content:
            application/json:
              examples:
                response:
                  value:
                    reasons:
                      - code: "53400020"
                        message: "'toTimestamp' must be after the 'fromTimestamp'."
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonReasonsErrorResponse"
          description: Invalid Parameters
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "429":
          content:
            application/json:
              examples:
                response:
                  value:
                    reasons:
                      - code: "53400070"
                        message: Only two requests are allowed within any 24-hour window.
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonReasonsErrorResponse"
          description: Rate limited
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Retry-After:
              description: |
                The interval of seconds that you have to wait before another retry.
              schema:
                type: integer
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "500":
          content:
            application/json:
              examples:
                response:
                  value:
                    reasons:
                      - code: "53400060"
                        message: Internal error detected.
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonReasonsErrorResponse"
          description: Internal Error
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List charge metrics by time range
      tags:
        - Charge Metrics
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/charge-metrics/data/charge-metrics"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/charge-metrics/data/charge-metrics');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/charge-metrics/data/charge-metrics")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/charge-metrics/data/charge-metrics", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/charge-metrics/data/charge-metrics")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/charge-metrics/data/charge-metrics");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  /charge-metrics/data/charge-metrics-discount-allocation-detail:
    get:
      description: |
        Retrieves discount allocation details about rate plan charges that have changes in a specified time range.

        The purpose of `fromTimestamp` and `toTimestamp` is to synchronize discount allocation details incrementally. 
      operationId: GET_ChargeMetricsDiscountAllocationDetails
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Charge_Metrics_Accept"
        - description: |
            The starting date and time of a time range when changes are made to charge metrics, in `yyyy-mm-ddThh:mm:ssZ` format. For example, `2020-08-18T09:01:11Z`. The timestamp maps to the `UpdatedOn` timestamp of the to-be-exported object.
          in: query
          name: fromTimestamp
          required: true
          schema:
            format: date-time
            type: string
        - description: |
            The end date and time of a time range when changes are made to charge metrics, in `yyyy-mm-ddThh:mm:ssZ` format. For example, `2020-08-20T09:01:11Z`. The timestamp maps to the `UpdatedOn` timestamp of the to-be-exported object.
          in: query
          name: toTimestamp
          required: true
          schema:
            format: date-time
            type: string
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ChargeMetricsDiscountAllocationDetailResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "400":
          content:
            application/json:
              examples:
                response:
                  value:
                    reasons:
                      - code: "53410020"
                        message: "'toTimestamp' must be after the 'fromTimestamp'."
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonReasonsErrorResponse"
          description: Invalid Parameters
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "429":
          content:
            application/json:
              examples:
                response:
                  value:
                    reasons:
                      - code: "53410070"
                        message: Only two requests are allowed within any 24-hour window.
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonReasonsErrorResponse"
          description: Rate limited
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Retry-After:
              description: |
                The interval of seconds that you have to wait before another retry.
              schema:
                type: integer
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "500":
          content:
            application/json:
              examples:
                response:
                  value:
                    reasons:
                      - code: "53410060"
                        message: Internal error detected.
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonReasonsErrorResponse"
          description: Internal Error
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List discount allocation details by time range
      tags:
        - Charge Metrics
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/charge-metrics/data/charge-metrics-discount-allocation-detail"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/charge-metrics/data/charge-metrics-discount-allocation-detail');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/charge-metrics/data/charge-metrics-discount-allocation-detail")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/charge-metrics/data/charge-metrics-discount-allocation-detail", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/charge-metrics/data/charge-metrics-discount-allocation-detail")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/charge-metrics/data/charge-metrics-discount-allocation-detail");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  /events/event-triggers:
    get:
      operationId: GET_EventTriggers
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: "The Zuora object that trigger condition is defined upon. Should be specified in the pattern: ^[A-Z][\\\\w\\\\-]*$"
          in: query
          name: baseObject
          required: false
          schema:
            type: string
        - description: "The event type name. Should be specified in the pattern: ^[A-Za-z]{1,}[\\w\\-]*$"
          in: query
          name: eventTypeName
          required: false
          schema:
            type: string
        - description: The status of the event trigger.
          in: query
          name: active
          required: false
          schema:
            type: string
        - description: The first index of the query result. Default to 0 if absent, and the minimum is 0.
          in: query
          name: start
          required: false
          schema:
            default: 0
            minimum: 0
            type: integer
        - description: The maximum number of data records to be returned. Default to 10 if absent.
          in: query
          name: limit
          required: false
          schema:
            default: 10
            minimum: 1
            type: integer
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "data": [
                        {
                          "id": "ac1ee535e8524858a72edb464212729d",
                          "baseObject": "Invoice",
                          "condition": "changeType == 'UPDATE' && Invoice.Status == 'Posted' && Invoice.Status_old != 'Posted' && Invoice.Amount > 1000",
                          "description": "trigger an event when an invoice is posted with amount over 1000",
                          "eventType": {
                            "name": "LargeInvoicePosted",
                            "displayName": "Large Invoice Posted",
                            "description": "An invoice is posted with amount over 1000"
                          },
                          "active": true
                        }
                      ],
                      "next": "https://api.zuora.com/events/event-triggers?start=1&limit=1"
                    }
            application/json; charset=utf-8:
              schema:
                properties:
                  data:
                    items:
                      $ref: "#/components/schemas/EventTrigger"
                    type: array
                  next:
                    description: The link to the next page. No value if it is last page.
                    type: string
                type: object
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "400":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "reasons": [
                        {
                          "code": "FieldConstraintViolation",
                          "message": "start should be >= 0"
                        }
                      ]
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Bad Request
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "500":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "reasons": [
                        {
                          "code": "SystemError",
                          "message": "internal server error"
                        }
                      ]
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Server Error
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List event triggers
      tags:
        - Event Triggers
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/events/event-triggers"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/events/event-triggers');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/events/event-triggers")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/events/event-triggers", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/events/event-triggers")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/events/event-triggers");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    post:
      description: |
        When you create an event trigger, you must specify the base object and define the trigger condition.

        ### Specify the base object
        Use `baseObject` field to specify which object to define a trigger on. You can define an event trigger on any of the following objects:

          * Account
          * AccountingCode
          * AccountingPeriod
          * Amendment
          * BillingRun
          * Contact
          * CreditBalanceAdjustment
          * CreditMemo
          * CreditMemoApplication
          * CreditMemoApplicationItem
          * CreditMemoItem
          * DebitMemo
          * DebitMemoItem
          * Feature
          * Invoice
          * InvoiceAdjustment
          * InvoiceItem
          * InvoiceItemAdjustment
          * JournalEntry
          * JournalEntryItem
          * Order
          * OrderAction
          * Payment
          * PaymentApplication
          * PaymentMethod
          * PaymentPart
          * Product
          * ProductFeature
          * ProductRatePlan
          * ProductRatePlanCharge
          * RatePlan
          * RatePlanCharge
          * Refund
          * RefundApplication
          * RevenueEvent
          * RevenueEventItem
          * RevenueSchedule
          * RevenueScheduleItem
          * Subscription
          * SubscriptionProductFeature
          * TaxationItem
          * Usage

        #### Tenant level base objects and tenant level event triggers
        Zuora identifies the following base objects as the tenant level base objects:

          * AccountingCode
          * AccountingPeriod
          * BillingRun
          * Feature
          * JournalEntry
          * JournalEntryItem
          * Product
          * ProductFeature
          * ProductRatePlan
          * ProductRatePlanCharge

        Event triggers defined on tenant level base objects are tenant level event triggers. Notifications associated with tenant level events are system notifications. 

        **Note:** Tenant level event triggers and system notifications are only available in the default profile.        

        ### Define the trigger condition
        The `condition` field is a [JEXL](http://commons.apache.org/proper/commons-jexl/) expression that specifies when to trigger events. The expression can contain fields from the object that the trigger is defined on.

        **Note:** The condition cannot contain fields from [data source](https://knowledgecenter.zuora.com/DC_Developers/M_Export_ZOQL) objects that are joined to the object that the trigger is defined on.

        For example, the following condition causes an event to be triggered whenever an invoice is posted with an amount greater than 1000:

        ```changeType == 'UPDATE' && Invoice.Status == 'Posted' && Invoice.Status_old != 'Posted' && Invoice.Amount > 1000```

        Where:

          * `changeType` is a keyword that specifies the type of change that occurred to the Invoice object. For all objects, the supported values of `changeType` are `INSERT`, `UPDATE`,  and `DELETE`.
          * `Invoice.Status` is the value of the Invoice object's `Status` field after the change occurred.
          * `Invoice.Status_old` is the value of the Invoice object's `Status` field before the change occurred.

        In the above example, the value of `baseObject` is `Invoice`.

        ### Limitations 

        This event trigger has the following limitations:

        * The maximum number of event triggers is 20. If you want to increase the limit, submit a request at [Zuora Global Support](https://support.zuora.com).

        * The INSERT change type is not supported on RatePlan base objects.

        * The INSERT change type is not supported on SubscriptionProductFeature base objects.
      operationId: POST_EventTrigger
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PostEventTriggerRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "id": "ac1ee535e8524858a72edb464212729d",
                      "baseObject": "Invoice",
                      "condition": "changeType == 'UPDATE' && Invoice.Status == 'Posted' && Invoice.Status_old != 'Posted' && Invoice.Amount > 1000",
                      "description": "trigger an event when an invoice is posted with amount over 1000",
                      "eventType": {
                        "name": "LargeInvoicePosted",
                        "displayName": "Large Invoice Posted",
                        "description": "An invoice is posted with amount over 1000"
                      },
                      "active": true
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/EventTrigger"
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "400":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "reasons": [
                        {
                          "code": "MissingRequiredField",
                          "message": "eventType is missing"
                        }
                      ]
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Bad Request
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "500":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "reasons": [
                        {
                          "code": "SystemError",
                          "message": "internal server error"
                        }
                      ]
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Server Error
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Create an event trigger
      tags:
        - Event Triggers
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "active": true, 
                "baseObject": "Invoice", 
                "condition": "changeType == '\''UPDATE'\'' && Invoice.Status == '\''Posted'\'' && Invoice.Status_old != '\''Posted'\'' && Invoice.Amount > 1000", 
                "description": "Trigger an event when an invoice is posted with amount over 1000", 
                "eventType": {
                    "description": "An invoice is posted with amount over 1000", 
                    "displayName": "Large Invoice Posted", 
                    "name": "LargeInvoicePosted"
                }
            }' "https://rest.zuora.com/events/event-triggers"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/events/event-triggers');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "active": true, 
                "baseObject": "Invoice", 
                "condition": "changeType == \'UPDATE\' && Invoice.Status == \'Posted\' && Invoice.Status_old != \'Posted\' && Invoice.Amount > 1000", 
                "description": "Trigger an event when an invoice is posted with amount over 1000", 
                "eventType": {
                    "description": "An invoice is posted with amount over 1000", 
                    "displayName": "Large Invoice Posted", 
                    "name": "LargeInvoicePosted"
                }
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"active\": true, \n    \"baseObject\": \"Invoice\", \n    \"condition\": \"changeType == 'UPDATE' && Invoice.Status == 'Posted' && Invoice.Status_old != 'Posted' && Invoice.Amount > 1000\", \n    \"description\": \"Trigger an event when an invoice is posted with amount over 1000\", \n    \"eventType\": {\n        \"description\": \"An invoice is posted with amount over 1000\", \n        \"displayName\": \"Large Invoice Posted\", \n        \"name\": \"LargeInvoicePosted\"\n    }\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/events/event-triggers")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"active\": true, \n    \"baseObject\": \"Invoice\", \n    \"condition\": \"changeType == 'UPDATE' && Invoice.Status == 'Posted' && Invoice.Status_old != 'Posted' && Invoice.Amount > 1000\", \n    \"description\": \"Trigger an event when an invoice is posted with amount over 1000\", \n    \"eventType\": {\n        \"description\": \"An invoice is posted with amount over 1000\", \n        \"displayName\": \"Large Invoice Posted\", \n        \"name\": \"LargeInvoicePosted\"\n    }\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/events/event-triggers", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/events/event-triggers")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"active\": true, \n    \"baseObject\": \"Invoice\", \n    \"condition\": \"changeType == 'UPDATE' && Invoice.Status == 'Posted' && Invoice.Status_old != 'Posted' && Invoice.Amount > 1000\", \n    \"description\": \"Trigger an event when an invoice is posted with amount over 1000\", \n    \"eventType\": {\n        \"description\": \"An invoice is posted with amount over 1000\", \n        \"displayName\": \"Large Invoice Posted\", \n        \"name\": \"LargeInvoicePosted\"\n    }\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/events/event-triggers");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"active\": true, \n    \"baseObject\": \"Invoice\", \n    \"condition\": \"changeType == 'UPDATE' && Invoice.Status == 'Posted' && Invoice.Status_old != 'Posted' && Invoice.Amount > 1000\", \n    \"description\": \"Trigger an event when an invoice is posted with amount over 1000\", \n    \"eventType\": {\n        \"description\": \"An invoice is posted with amount over 1000\", \n        \"displayName\": \"Large Invoice Posted\", \n        \"name\": \"LargeInvoicePosted\"\n    }\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/events/event-triggers/{id}":
    delete:
      description: ""
      operationId: DELETE_EventTrigger
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - in: path
          name: id
          required: true
          schema:
            format: uuid
            type: string
      responses:
        "204":
          description: No Content
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "reasons": [
                        {
                          "code": "ObjectNotFound",
                          "message": "no event trigger found with the given id"
                        }
                      ]
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Not Found
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "500":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "reasons": [
                        {
                          "code": "SystemError",
                          "message": "internal server error"
                        }
                      ]
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Server Error
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Delete an event trigger
      tags:
        - Event Triggers
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/events/event-triggers/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/events/event-triggers/{id}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/events/event-triggers/{id}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/events/event-triggers/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/events/event-triggers/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/events/event-triggers/{id}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      operationId: GET_EventTrigger
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - in: path
          name: id
          required: true
          schema:
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "id": "ac1ee535e8524858a72edb464212729d",
                      "baseObject": "Invoice",
                      "condition": "changeType == 'UPDATE' && Invoice.Status == 'Posted' && Invoice.Status_old != 'Posted' && Invoice.Amount > 1000",
                      "description": "trigger an event when an invoice is posted with amount over 1000",
                      "eventType": {
                        "name": "LargeInvoicePosted",
                        "displayName": "Large Invoice Posted",
                        "description": "An invoice is posted with amount over 1000"
                      },
                      "active": true
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/EventTrigger"
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "reasons": [
                        {
                          "code": "ObjectNotFound",
                          "message": "no event trigger found with the given id"
                        }
                      ]
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Not Found
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "500":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "reasons": [
                        {
                          "code": "SystemError",
                          "message": "internal server error"
                        }
                      ]
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Server Error
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve an event trigger
      tags:
        - Event Triggers
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/events/event-triggers/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/events/event-triggers/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/events/event-triggers/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/events/event-triggers/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/events/event-triggers/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/events/event-triggers/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: ""
      operationId: PUT_EventTrigger
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - in: path
          name: id
          required: true
          schema:
            format: uuid
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PutEventTriggerRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "id": "ac1ee535e8524858a72edb464212729d",
                      "baseObject": "Invoice",
                      "condition": "changeType == 'UPDATE' && Invoice.Status == 'Posted' && Invoice.Status_old != 'Posted' && Invoice.Amount > 5000",
                      "description": "trigger an event when an invoice is posted with amount over 5000",
                      "eventType": {
                        "name": "LargeInvoicePosted",
                        "displayName": "Large Invoice Posted",
                        "description": "An invoice is posted with amount over 5000"
                      },
                      "active": true
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/EventTrigger"
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "reasons": [
                        {
                          "code": "ObjectNotFound",
                          "message": "no event trigger found with the given id"
                        }
                      ]
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Not Found
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "500":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "reasons": [
                        {
                          "code": "SystemError",
                          "message": "internal server error"
                        }
                      ]
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Server Error
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Update an event trigger
      tags:
        - Event Triggers
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "condition": "changeType == '\''UPDATE'\'' && Invoice.Status == '\''Posted'\'' && Invoice.Status_old != '\''Posted'\'' && Invoice.Amount > 5000", 
                "description": "Trigger an event when an invoice is posted with amount over 5000", 
                "eventType": {
                    "description": "An invoice is posted with amount over 5000"
                }
            }' "https://rest.zuora.com/events/event-triggers/{id}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/events/event-triggers/{id}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "condition": "changeType == \'UPDATE\' && Invoice.Status == \'Posted\' && Invoice.Status_old != \'Posted\' && Invoice.Amount > 5000", 
                "description": "Trigger an event when an invoice is posted with amount over 5000", 
                "eventType": {
                    "description": "An invoice is posted with amount over 5000"
                }
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"condition\": \"changeType == 'UPDATE' && Invoice.Status == 'Posted' && Invoice.Status_old != 'Posted' && Invoice.Amount > 5000\", \n    \"description\": \"Trigger an event when an invoice is posted with amount over 5000\", \n    \"eventType\": {\n        \"description\": \"An invoice is posted with amount over 5000\"\n    }\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/events/event-triggers/{id}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"condition\": \"changeType == 'UPDATE' && Invoice.Status == 'Posted' && Invoice.Status_old != 'Posted' && Invoice.Amount > 5000\", \n    \"description\": \"Trigger an event when an invoice is posted with amount over 5000\", \n    \"eventType\": {\n        \"description\": \"An invoice is posted with amount over 5000\"\n    }\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/events/event-triggers/{id}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/events/event-triggers/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"condition\": \"changeType == 'UPDATE' && Invoice.Status == 'Posted' && Invoice.Status_old != 'Posted' && Invoice.Amount > 5000\", \n    \"description\": \"Trigger an event when an invoice is posted with amount over 5000\", \n    \"eventType\": {\n        \"description\": \"An invoice is posted with amount over 5000\"\n    }\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/events/event-triggers/{id}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"condition\": \"changeType == 'UPDATE' && Invoice.Status == 'Posted' && Invoice.Status_old != 'Posted' && Invoice.Amount > 5000\", \n    \"description\": \"Trigger an event when an invoice is posted with amount over 5000\", \n    \"eventType\": {\n        \"description\": \"An invoice is posted with amount over 5000\"\n    }\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /notifications/email-templates:
    get:
      description: |
        Queries email templates.

        **Note**: This operation is only applicable to email templates for custom events.
      operationId: GET_Query_Email_Templates
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth_Notifications"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - allowEmptyValue: true
          description: The first index of the query result.
          in: query
          name: start
          schema:
            default: 1
            format: int32
            type: integer
        - allowEmptyValue: true
          description: The maximum number of results the query should return.
          in: query
          name: limit
          schema:
            default: 20
            format: int32
            maximum: 100
            minimum: 1
            type: integer
        - allowEmptyValue: true
          description: The name of the event.
          in: query
          name: eventTypeName
          schema:
            type: string
        - allowEmptyValue: true
          description: The name of the email template.
          in: query
          name: name
          schema:
            type: string
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                properties:
                  data:
                    items:
                      $ref: "#/components/schemas/GETPublicEmailTemplateResponse"
                    type: array
                  next:
                    description: The URI to query the next page of data, e.g. '/notification-definitions?start=1&limit=10'. The start equals request's start+limit, and the limit equals the request's limit. If the current page is the last page, this value is null.
                    example: /notification-definitions?start=1&limit=10
                    type: string
                type: object
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"404",
                      "message":"HTTP 404 Not Found"
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Not Found
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "405":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"405",
                      "message":"HTTP 405 Method Not Allowed"
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Method Not Allowed
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "415":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"415",
                      "message":"HTTP 415 Unsupported Media Type"
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Unsupported Media Type
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "500":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"500",
                      "message":"A temporary problem in the service occurred, you can retry later."
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Internal Server Error
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List email templates
      tags:
        - Notifications
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/notifications/email-templates"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/notifications/email-templates');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/notifications/email-templates")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/notifications/email-templates", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/notifications/email-templates")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/notifications/email-templates");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    post:
      description: |
        Creates an email template.

        **Note**: This operation is only applicable to email templates for custom events.
      operationId: POST_Create_Email_Template
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth_Notifications"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTPublicEmailTemplateRequest"
        description: The request body to create an email template.
        required: true
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETPublicEmailTemplateResponse"
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "400":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"ObjectNotFound",
                      "message":"eventType {com.zuora.notification, AccountEdit} does not exist"
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Bad Request
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"404",
                      "message":"HTTP 404 Not Found"
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Not Found
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "405":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"405",
                      "message":"HTTP 405 Method Not Allowed"
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Method Not Allowed
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "415":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"415",
                      "message":"HTTP 415 Unsupported Media Type"
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Unsupported Media Type
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "500":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"500",
                      "message":"A temporary problem in the service occurred, you can retry later."
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Internal Server Error
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Create an email template
      tags:
        - Notifications
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "active": true, 
                "bccEmailAddress": "user@example.com", 
                "ccEmailAddress": "user@example.com", 
                "ccEmailType": "SpecificEmails", 
                "description": "Email when an account is edited", 
                "emailBody": "Dear user,<p>the account <Account.Name> has been edited. <p>Example Co. Ltd.", 
                "emailSubject": "Account <Account.Number> has been edited", 
                "encodingType": "UTF8", 
                "eventTypeName": "AccountEdit", 
                "fromEmailAddress": null, 
                "fromEmailType": "TenantEmail", 
                "fromName": "Example Co. Ltd.", 
                "isHtml": true, 
                "name": "Account Edit Email", 
                "replyToEmailAddress": null, 
                "replyToEmailType": "TenantEmail", 
                "toEmailAddress": null, 
                "toEmailType": "BillToContact"
            }' "https://rest.zuora.com/notifications/email-templates"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/notifications/email-templates');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "active": true, 
                "bccEmailAddress": "user@example.com", 
                "ccEmailAddress": "user@example.com", 
                "ccEmailType": "SpecificEmails", 
                "description": "Email when an account is edited", 
                "emailBody": "Dear user,<p>the account <Account.Name> has been edited. <p>Example Co. Ltd.", 
                "emailSubject": "Account <Account.Number> has been edited", 
                "encodingType": "UTF8", 
                "eventTypeName": "AccountEdit", 
                "fromEmailAddress": null, 
                "fromEmailType": "TenantEmail", 
                "fromName": "Example Co. Ltd.", 
                "isHtml": true, 
                "name": "Account Edit Email", 
                "replyToEmailAddress": null, 
                "replyToEmailType": "TenantEmail", 
                "toEmailAddress": null, 
                "toEmailType": "BillToContact"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"active\": true, \n    \"bccEmailAddress\": \"user@example.com\", \n    \"ccEmailAddress\": \"user@example.com\", \n    \"ccEmailType\": \"SpecificEmails\", \n    \"description\": \"Email when an account is edited\", \n    \"emailBody\": \"Dear user,<p>the account <Account.Name> has been edited. <p>Example Co. Ltd.\", \n    \"emailSubject\": \"Account <Account.Number> has been edited\", \n    \"encodingType\": \"UTF8\", \n    \"eventTypeName\": \"AccountEdit\", \n    \"fromEmailAddress\": null, \n    \"fromEmailType\": \"TenantEmail\", \n    \"fromName\": \"Example Co. Ltd.\", \n    \"isHtml\": true, \n    \"name\": \"Account Edit Email\", \n    \"replyToEmailAddress\": null, \n    \"replyToEmailType\": \"TenantEmail\", \n    \"toEmailAddress\": null, \n    \"toEmailType\": \"BillToContact\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/notifications/email-templates")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"active\": true, \n    \"bccEmailAddress\": \"user@example.com\", \n    \"ccEmailAddress\": \"user@example.com\", \n    \"ccEmailType\": \"SpecificEmails\", \n    \"description\": \"Email when an account is edited\", \n    \"emailBody\": \"Dear user,<p>the account <Account.Name> has been edited. <p>Example Co. Ltd.\", \n    \"emailSubject\": \"Account <Account.Number> has been edited\", \n    \"encodingType\": \"UTF8\", \n    \"eventTypeName\": \"AccountEdit\", \n    \"fromEmailAddress\": null, \n    \"fromEmailType\": \"TenantEmail\", \n    \"fromName\": \"Example Co. Ltd.\", \n    \"isHtml\": true, \n    \"name\": \"Account Edit Email\", \n    \"replyToEmailAddress\": null, \n    \"replyToEmailType\": \"TenantEmail\", \n    \"toEmailAddress\": null, \n    \"toEmailType\": \"BillToContact\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/notifications/email-templates", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/notifications/email-templates")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"active\": true, \n    \"bccEmailAddress\": \"user@example.com\", \n    \"ccEmailAddress\": \"user@example.com\", \n    \"ccEmailType\": \"SpecificEmails\", \n    \"description\": \"Email when an account is edited\", \n    \"emailBody\": \"Dear user,<p>the account <Account.Name> has been edited. <p>Example Co. Ltd.\", \n    \"emailSubject\": \"Account <Account.Number> has been edited\", \n    \"encodingType\": \"UTF8\", \n    \"eventTypeName\": \"AccountEdit\", \n    \"fromEmailAddress\": null, \n    \"fromEmailType\": \"TenantEmail\", \n    \"fromName\": \"Example Co. Ltd.\", \n    \"isHtml\": true, \n    \"name\": \"Account Edit Email\", \n    \"replyToEmailAddress\": null, \n    \"replyToEmailType\": \"TenantEmail\", \n    \"toEmailAddress\": null, \n    \"toEmailType\": \"BillToContact\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/notifications/email-templates");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"active\": true, \n    \"bccEmailAddress\": \"user@example.com\", \n    \"ccEmailAddress\": \"user@example.com\", \n    \"ccEmailType\": \"SpecificEmails\", \n    \"description\": \"Email when an account is edited\", \n    \"emailBody\": \"Dear user,<p>the account <Account.Name> has been edited. <p>Example Co. Ltd.\", \n    \"emailSubject\": \"Account <Account.Number> has been edited\", \n    \"encodingType\": \"UTF8\", \n    \"eventTypeName\": \"AccountEdit\", \n    \"fromEmailAddress\": null, \n    \"fromEmailType\": \"TenantEmail\", \n    \"fromName\": \"Example Co. Ltd.\", \n    \"isHtml\": true, \n    \"name\": \"Account Edit Email\", \n    \"replyToEmailAddress\": null, \n    \"replyToEmailType\": \"TenantEmail\", \n    \"toEmailAddress\": null, \n    \"toEmailType\": \"BillToContact\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/notifications/email-templates/{id}":
    delete:
      description: |
        Deletes an email template.

        **Note**: This operation is only applicable to notifications for custom events.
      operationId: DELETE_Delete_Email_Template
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth_Notifications"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: The ID of the email template to be deleted.
          in: path
          name: id
          required: true
          schema:
            format: uuid
            type: string
      responses:
        "204":
          description: No Content
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "400":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"ObjectNotFound",
                      "message":"The email template with id 6e569e1e05f040eda51a927b140c0ac2 does not exist in this tenant"
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Bad Request
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"404",
                      "message":"HTTP 404 Not Found"
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Not Found
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "405":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"405",
                      "message":"HTTP 405 Method Not Allowed"
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Method Not Allowed
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "415":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"415",
                      "message":"HTTP 415 Unsupported Media Type"
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Unsupported Media Type
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "500":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"500",
                      "message":"A temporary problem in the service occurred, you can retry later."
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Internal Server Error
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Delete an email template
      tags:
        - Notifications
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/notifications/email-templates/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/notifications/email-templates/{id}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/notifications/email-templates/{id}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/notifications/email-templates/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/notifications/email-templates/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/notifications/email-templates/{id}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      description: |
        Queries the email template of the specified ID.

        **Note**: This operation is only applicable to email templates for custom events.
      operationId: GET_Get_Email_Template
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth_Notifications"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: The ID of the email template.
          in: path
          name: id
          required: true
          schema:
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETPublicEmailTemplateResponse"
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "400":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"ObjectNotFound",
                      "message":"The email template with id 6e569e1e05f040eda51a927b140c0ac2 does not exist in this tenant"
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Bad Request
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"404",
                      "message":"HTTP 404 Not Found"
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Not Found
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "405":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"405",
                      "message":"HTTP 405 Method Not Allowed"
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Method Not Allowed
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "415":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"415",
                      "message":"HTTP 415 Unsupported Media Type"
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Unsupported Media Type
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "500":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"500",
                      "message":"A temporary problem in the service occurred, you can retry later."
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Internal Server Error
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve an email template
      tags:
        - Notifications
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/notifications/email-templates/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/notifications/email-templates/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/notifications/email-templates/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/notifications/email-templates/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/notifications/email-templates/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/notifications/email-templates/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: |
        Updates an email template.

        **Note**: This operation is only applicable to email templates for custom events.
      operationId: PUT_Update_Email_Template
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth_Notifications"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: The ID of the email template to be updated.
          in: path
          name: id
          required: true
          schema:
            format: uuid
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTPublicEmailTemplateRequest"
        description: The request body to update an email template.
        required: true
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETPublicEmailTemplateResponse"
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "400":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"ObjectNotFound",
                      "message":"eventType {com.zuora.notification, AccountEdit} does not exist"
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Bad Request
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"404",
                      "message":"HTTP 404 Not Found"
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Not Found
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "405":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"405",
                      "message":"HTTP 405 Method Not Allowed"
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Method Not Allowed
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "415":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"415",
                      "message":"HTTP 415 Unsupported Media Type"
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Unsupported Media Type
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "500":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"500",
                      "message":"A temporary problem in the service occurred, you can retry later."
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Internal Server Error
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Update an email template
      tags:
        - Notifications
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "active": true, 
                "bccEmailAddress": "user@example.com", 
                "ccEmailAddress": "user@example.com", 
                "ccEmailType": "SpecificEmails", 
                "description": "Email when an account is edited", 
                "emailBody": "Dear user,<p>the account <Account.Name> has been edited. <p>Example Co. Ltd.", 
                "emailSubject": "Account <Account.Number> has been edited", 
                "encodingType": "UTF8", 
                "fromEmailAddress": null, 
                "fromEmailType": "TenantEmail", 
                "fromName": "Example Co. Ltd.", 
                "isHtml": true, 
                "name": "Account Edit Email", 
                "replyToEmailAddress": null, 
                "replyToEmailType": "TenantEmail", 
                "toEmailAddress": null, 
                "toEmailType": "BillToContact"
            }' "https://rest.zuora.com/notifications/email-templates/{id}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/notifications/email-templates/{id}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "active": true, 
                "bccEmailAddress": "user@example.com", 
                "ccEmailAddress": "user@example.com", 
                "ccEmailType": "SpecificEmails", 
                "description": "Email when an account is edited", 
                "emailBody": "Dear user,<p>the account <Account.Name> has been edited. <p>Example Co. Ltd.", 
                "emailSubject": "Account <Account.Number> has been edited", 
                "encodingType": "UTF8", 
                "fromEmailAddress": null, 
                "fromEmailType": "TenantEmail", 
                "fromName": "Example Co. Ltd.", 
                "isHtml": true, 
                "name": "Account Edit Email", 
                "replyToEmailAddress": null, 
                "replyToEmailType": "TenantEmail", 
                "toEmailAddress": null, 
                "toEmailType": "BillToContact"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"active\": true, \n    \"bccEmailAddress\": \"user@example.com\", \n    \"ccEmailAddress\": \"user@example.com\", \n    \"ccEmailType\": \"SpecificEmails\", \n    \"description\": \"Email when an account is edited\", \n    \"emailBody\": \"Dear user,<p>the account <Account.Name> has been edited. <p>Example Co. Ltd.\", \n    \"emailSubject\": \"Account <Account.Number> has been edited\", \n    \"encodingType\": \"UTF8\", \n    \"fromEmailAddress\": null, \n    \"fromEmailType\": \"TenantEmail\", \n    \"fromName\": \"Example Co. Ltd.\", \n    \"isHtml\": true, \n    \"name\": \"Account Edit Email\", \n    \"replyToEmailAddress\": null, \n    \"replyToEmailType\": \"TenantEmail\", \n    \"toEmailAddress\": null, \n    \"toEmailType\": \"BillToContact\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/notifications/email-templates/{id}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"active\": true, \n    \"bccEmailAddress\": \"user@example.com\", \n    \"ccEmailAddress\": \"user@example.com\", \n    \"ccEmailType\": \"SpecificEmails\", \n    \"description\": \"Email when an account is edited\", \n    \"emailBody\": \"Dear user,<p>the account <Account.Name> has been edited. <p>Example Co. Ltd.\", \n    \"emailSubject\": \"Account <Account.Number> has been edited\", \n    \"encodingType\": \"UTF8\", \n    \"fromEmailAddress\": null, \n    \"fromEmailType\": \"TenantEmail\", \n    \"fromName\": \"Example Co. Ltd.\", \n    \"isHtml\": true, \n    \"name\": \"Account Edit Email\", \n    \"replyToEmailAddress\": null, \n    \"replyToEmailType\": \"TenantEmail\", \n    \"toEmailAddress\": null, \n    \"toEmailType\": \"BillToContact\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/notifications/email-templates/{id}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/notifications/email-templates/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"active\": true, \n    \"bccEmailAddress\": \"user@example.com\", \n    \"ccEmailAddress\": \"user@example.com\", \n    \"ccEmailType\": \"SpecificEmails\", \n    \"description\": \"Email when an account is edited\", \n    \"emailBody\": \"Dear user,<p>the account <Account.Name> has been edited. <p>Example Co. Ltd.\", \n    \"emailSubject\": \"Account <Account.Number> has been edited\", \n    \"encodingType\": \"UTF8\", \n    \"fromEmailAddress\": null, \n    \"fromEmailType\": \"TenantEmail\", \n    \"fromName\": \"Example Co. Ltd.\", \n    \"isHtml\": true, \n    \"name\": \"Account Edit Email\", \n    \"replyToEmailAddress\": null, \n    \"replyToEmailType\": \"TenantEmail\", \n    \"toEmailAddress\": null, \n    \"toEmailType\": \"BillToContact\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/notifications/email-templates/{id}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"active\": true, \n    \"bccEmailAddress\": \"user@example.com\", \n    \"ccEmailAddress\": \"user@example.com\", \n    \"ccEmailType\": \"SpecificEmails\", \n    \"description\": \"Email when an account is edited\", \n    \"emailBody\": \"Dear user,<p>the account <Account.Name> has been edited. <p>Example Co. Ltd.\", \n    \"emailSubject\": \"Account <Account.Number> has been edited\", \n    \"encodingType\": \"UTF8\", \n    \"fromEmailAddress\": null, \n    \"fromEmailType\": \"TenantEmail\", \n    \"fromName\": \"Example Co. Ltd.\", \n    \"isHtml\": true, \n    \"name\": \"Account Edit Email\", \n    \"replyToEmailAddress\": null, \n    \"replyToEmailType\": \"TenantEmail\", \n    \"toEmailAddress\": null, \n    \"toEmailType\": \"BillToContact\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /notifications/history:
    delete:
      description: |
        Delete all notification histories for the given account. All email and callout notifications for this account will be deleted upon successful operation.

        **Note**: This operation is only available if you have the Notification and the Configurable Event features enabled.
      operationId: DELETE_Delete_Notification_History_For_Account
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth_Notifications"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: The ID of the account whose notification histories are to be deleted.
          in: query
          name: accountId
          required: true
          schema:
            format: uuid
            type: string
      responses:
        "202":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "id": "2be2f02afc504d1b83fb3cd095ce4dc6",
                        "status": "RUNNING",
                        "tenantId": "9",
                        "createdBy": "402881e522cf4f9b0122cf5d82860002",
                        "createdOn": 1610358627000,
                        "accountId": "2c9e8084769a87be0176f0cfa138001e"
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/NotificationsHistoryDeletionTaskResponse"
          description: Accepted
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "400":
          content:
            application/json; charset=utf-8:
              schema:
                description: The error message notifying that `accountId` must not be empty.
                example: may not be null (path = PublicNotificationHistoryResource.deleteHistoryByAccountId.query param accountId, invalidValue = null)
                type: string
          description: Bad Request
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "reasons": [
                            {
                                "code": "404",
                                "message": "HTTP 404 Not Found"
                            }
                        ]
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Not Found
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Delete notification histories for an account
      tags:
        - Notifications
      x-code-samples:
        - lang: Curl
          source: |
            curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com//notifications/history?accountId=402892c74c9193cd014c96bbe7c101f9"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/notifications/history');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/notifications/history")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/notifications/history", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/notifications/history")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/notifications/history");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/notifications/history/tasks/{id}":
    get:
      description: |
        Get the notification history deletion task by ID.

        **Note**: This operation is only available if you have the Notification and the Configurable Event features enabled.
      operationId: GET_Get_Notification_History_Deletion_Task
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth_Notifications"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The ID of the notification history deletion task. You can get the deletion task ID from the 202 response body of the [Delete notification histories for an account](https://www.zuora.com/developer/api-reference/#operation/DELETE_Delete_Notification_History_For_Account) operation.
          in: path
          name: id
          required: true
          schema:
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "id": "2be2f02afc504d1b83fb3cd095ce4dc6",
                        "status": "FINISHED",
                        "tenantId": "9",
                        "createdBy": "402881e522cf4f9b0122cf5d82860002",
                        "createdOn": 1610358627000,
                        "accountId": "2c9e8084769a87be0176f0cfa138001e"
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/NotificationsHistoryDeletionTaskResponse"
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                        "reasons": [
                            {
                                "code": "ObjectNotFound",
                                "message": "history task with id 2be2f02afc504d1b83fb3cd095ce4dc7 not found"
                            }
                        ]
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Not Found
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a notification history deletion task
      tags:
        - Notifications
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/notifications/history/tasks/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/notifications/history/tasks/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/notifications/history/tasks/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/notifications/history/tasks/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/notifications/history/tasks/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/notifications/history/tasks/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  /notifications/notification-definitions:
    get:
      description: |
        Queries notification definitions with the specified filters.

        **Note**: This operation is only applicable to notifications for custom events.
      operationId: GET_Query_Notification_Definitions
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth_Notifications"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - allowEmptyValue: true
          description: The first index of the query result.
          in: query
          name: start
          schema:
            default: 1
            format: int32
            type: integer
        - allowEmptyValue: true
          description: The maximum number of results the query should return.
          in: query
          name: limit
          schema:
            default: 20
            format: int32
            maximum: 100
            minimum: 1
            type: integer
        - allowEmptyValue: true
          description: Id of the profile.
          in: query
          name: profileId
          schema:
            format: uuid
            type: string
        - allowEmptyValue: true
          description: The name of the event.
          in: query
          name: eventTypeName
          schema:
            type: string
        - allowEmptyValue: true
          description: The ID of the email template.
          in: query
          name: emailTemplateId
          schema:
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                properties:
                  data:
                    items:
                      $ref: "#/components/schemas/GETPublicNotificationDefinitionResponse"
                    type: array
                  next:
                    description: The URI to query the next page of data, e.g. '/notification-definitions?start=1&limit=10'. The start equals request's start+limit, and the limit equals the request's limit. If the current page is the last page, this value is null.
                    example: /notification-definitions?start=1&limit=10
                    type: string
                type: object
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"404",
                      "message":"HTTP 404 Not Found"
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Not Found
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "405":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"405",
                      "message":"HTTP 405 Method Not Allowed"
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Method Not Allowed
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "415":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"415",
                      "message":"HTTP 415 Unsupported Media Type"
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Unsupported Media Type
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "500":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"500",
                      "message":"A temporary problem in the service occurred, you can retry later."
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Internal Server Error
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List notification definitions
      tags:
        - Notifications
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/notifications/notification-definitions"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/notifications/notification-definitions');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/notifications/notification-definitions")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/notifications/notification-definitions", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/notifications/notification-definitions")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/notifications/notification-definitions");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    post:
      description: |
        Creates a notification definition. If a filter rule is specified, it will be evaluated to
        see if the notification definition is qualified to handle the incoming events 
        during runtime. If the notification is qualified, it will send the email and
        invoke the callout if it has an email template or a callout. See a step-by-step guide for
        [creating a custom notification](https://www.zuora.com/developer/api-guides/#Callout-to-external-system-for-provisioning-or-entitlements)
        in [Zuora API Guides](https://www.zuora.com/developer/api-guides/).

        **Note**: This operation is only applicable to notifications for custom events.
      operationId: POST_Create_Notification_Definition
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth_Notifications"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTPublicNotificationDefinitionRequest"
        description: The request body used to create the notification definition.
        required: true
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETPublicNotificationDefinitionResponse"
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "400":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"ConstraintViolated",
                      "message":"The email template is defined on a different EventType other than the notification's"
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Bad Request
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"404",
                      "message":"HTTP 404 Not Found"
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Not Found
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "405":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"405",
                      "message":"HTTP 405 Method Not Allowed"
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Method Not Allowed
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "415":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"415",
                      "message":"HTTP 415 Unsupported Media Type"
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Unsupported Media Type
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "500":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"500",
                      "message":"A temporary problem in the service occurred, you can retry later."
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Internal Server Error
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Create a notification definition
      tags:
        - Notifications
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "active": true, 
                "callout": {
                    "active": true, 
                    "calloutAuth": {
                        "domain": "example_domain", 
                        "password": "example_password", 
                        "preemptive": true, 
                        "username": "example_user"
                    }, 
                    "calloutBaseurl": "https://www.example.com/callout/AccountEdit", 
                    "calloutParams": {
                        "AccountName": "<Account.Name>", 
                        "AccountNumber": "<Account.AccountNumber>"
                    }, 
                    "calloutRetry": true, 
                    "description": "Callout when an account is edited", 
                    "eventTypeName": "AccountEdit", 
                    "httpMethod": "POST", 
                    "name": "Callout for Account Edited", 
                    "requiredAuth": true
                }, 
                "calloutActive": true, 
                "communicationProfileId": "6e569e1e05f040eda51a927b140c0ac5", 
                "description": "Notification sent out when an account is edited", 
                "emailActive": true, 
                "emailTemplateId": "6e569e1e05f040eda51a927b140c0ac6", 
                "eventTypeName": "AccountEdit", 
                "filterRule": {
                    "condition": "Account.Balance >= _VIP_BALANCE_AMOUNT && Account.Status == _ACCOUNT_STATUS", 
                    "description": "Filter rule to test if an account is a VIP account", 
                    "parameters": {
                        "_ACCOUNT_STATUS": {
                            "description": "The status of the VIP Account", 
                            "displayName": "VIP Account Status", 
                            "options": [
                                "Draft", 
                                "Active", 
                                "Canceled"
                            ], 
                            "valueType": "STRING"
                        }, 
                        "_VIP_BALANCE_AMOUNT": {
                            "description": "The minimum account balance", 
                            "displayName": "VIP Account Balance", 
                            "options": null, 
                            "valueType": "BIG_DECIMAL"
                        }
                    }
                }, 
                "filterRuleParams": {
                    "_EDITED_FROM": "UI", 
                    "_VIP_ACCOUNT_BALANCE": "100000"
                }, 
                "name": "Account Edit Notification"
            }' "https://rest.zuora.com/notifications/notification-definitions"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/notifications/notification-definitions');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "active": true, 
                "callout": {
                    "active": true, 
                    "calloutAuth": {
                        "domain": "example_domain", 
                        "password": "example_password", 
                        "preemptive": true, 
                        "username": "example_user"
                    }, 
                    "calloutBaseurl": "https://www.example.com/callout/AccountEdit", 
                    "calloutParams": {
                        "AccountName": "<Account.Name>", 
                        "AccountNumber": "<Account.AccountNumber>"
                    }, 
                    "calloutRetry": true, 
                    "description": "Callout when an account is edited", 
                    "eventTypeName": "AccountEdit", 
                    "httpMethod": "POST", 
                    "name": "Callout for Account Edited", 
                    "requiredAuth": true
                }, 
                "calloutActive": true, 
                "communicationProfileId": "6e569e1e05f040eda51a927b140c0ac5", 
                "description": "Notification sent out when an account is edited", 
                "emailActive": true, 
                "emailTemplateId": "6e569e1e05f040eda51a927b140c0ac6", 
                "eventTypeName": "AccountEdit", 
                "filterRule": {
                    "condition": "Account.Balance >= _VIP_BALANCE_AMOUNT && Account.Status == _ACCOUNT_STATUS", 
                    "description": "Filter rule to test if an account is a VIP account", 
                    "parameters": {
                        "_ACCOUNT_STATUS": {
                            "description": "The status of the VIP Account", 
                            "displayName": "VIP Account Status", 
                            "options": [
                                "Draft", 
                                "Active", 
                                "Canceled"
                            ], 
                            "valueType": "STRING"
                        }, 
                        "_VIP_BALANCE_AMOUNT": {
                            "description": "The minimum account balance", 
                            "displayName": "VIP Account Balance", 
                            "options": null, 
                            "valueType": "BIG_DECIMAL"
                        }
                    }
                }, 
                "filterRuleParams": {
                    "_EDITED_FROM": "UI", 
                    "_VIP_ACCOUNT_BALANCE": "100000"
                }, 
                "name": "Account Edit Notification"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"active\": true, \n    \"callout\": {\n        \"active\": true, \n        \"calloutAuth\": {\n            \"domain\": \"example_domain\", \n            \"password\": \"example_password\", \n            \"preemptive\": true, \n            \"username\": \"example_user\"\n        }, \n        \"calloutBaseurl\": \"https://www.example.com/callout/AccountEdit\", \n        \"calloutParams\": {\n            \"AccountName\": \"<Account.Name>\", \n            \"AccountNumber\": \"<Account.AccountNumber>\"\n        }, \n        \"calloutRetry\": true, \n        \"description\": \"Callout when an account is edited\", \n        \"eventTypeName\": \"AccountEdit\", \n        \"httpMethod\": \"POST\", \n        \"name\": \"Callout for Account Edited\", \n        \"requiredAuth\": true\n    }, \n    \"calloutActive\": true, \n    \"communicationProfileId\": \"6e569e1e05f040eda51a927b140c0ac5\", \n    \"description\": \"Notification sent out when an account is edited\", \n    \"emailActive\": true, \n    \"emailTemplateId\": \"6e569e1e05f040eda51a927b140c0ac6\", \n    \"eventTypeName\": \"AccountEdit\", \n    \"filterRule\": {\n        \"condition\": \"Account.Balance >= _VIP_BALANCE_AMOUNT && Account.Status == _ACCOUNT_STATUS\", \n        \"description\": \"Filter rule to test if an account is a VIP account\", \n        \"parameters\": {\n            \"_ACCOUNT_STATUS\": {\n                \"description\": \"The status of the VIP Account\", \n                \"displayName\": \"VIP Account Status\", \n                \"options\": [\n                    \"Draft\", \n                    \"Active\", \n                    \"Canceled\"\n                ], \n                \"valueType\": \"STRING\"\n            }, \n            \"_VIP_BALANCE_AMOUNT\": {\n                \"description\": \"The minimum account balance\", \n                \"displayName\": \"VIP Account Balance\", \n                \"options\": null, \n                \"valueType\": \"BIG_DECIMAL\"\n            }\n        }\n    }, \n    \"filterRuleParams\": {\n        \"_EDITED_FROM\": \"UI\", \n        \"_VIP_ACCOUNT_BALANCE\": \"100000\"\n    }, \n    \"name\": \"Account Edit Notification\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/notifications/notification-definitions")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"active\": true, \n    \"callout\": {\n        \"active\": true, \n        \"calloutAuth\": {\n            \"domain\": \"example_domain\", \n            \"password\": \"example_password\", \n            \"preemptive\": true, \n            \"username\": \"example_user\"\n        }, \n        \"calloutBaseurl\": \"https://www.example.com/callout/AccountEdit\", \n        \"calloutParams\": {\n            \"AccountName\": \"<Account.Name>\", \n            \"AccountNumber\": \"<Account.AccountNumber>\"\n        }, \n        \"calloutRetry\": true, \n        \"description\": \"Callout when an account is edited\", \n        \"eventTypeName\": \"AccountEdit\", \n        \"httpMethod\": \"POST\", \n        \"name\": \"Callout for Account Edited\", \n        \"requiredAuth\": true\n    }, \n    \"calloutActive\": true, \n    \"communicationProfileId\": \"6e569e1e05f040eda51a927b140c0ac5\", \n    \"description\": \"Notification sent out when an account is edited\", \n    \"emailActive\": true, \n    \"emailTemplateId\": \"6e569e1e05f040eda51a927b140c0ac6\", \n    \"eventTypeName\": \"AccountEdit\", \n    \"filterRule\": {\n        \"condition\": \"Account.Balance >= _VIP_BALANCE_AMOUNT && Account.Status == _ACCOUNT_STATUS\", \n        \"description\": \"Filter rule to test if an account is a VIP account\", \n        \"parameters\": {\n            \"_ACCOUNT_STATUS\": {\n                \"description\": \"The status of the VIP Account\", \n                \"displayName\": \"VIP Account Status\", \n                \"options\": [\n                    \"Draft\", \n                    \"Active\", \n                    \"Canceled\"\n                ], \n                \"valueType\": \"STRING\"\n            }, \n            \"_VIP_BALANCE_AMOUNT\": {\n                \"description\": \"The minimum account balance\", \n                \"displayName\": \"VIP Account Balance\", \n                \"options\": null, \n                \"valueType\": \"BIG_DECIMAL\"\n            }\n        }\n    }, \n    \"filterRuleParams\": {\n        \"_EDITED_FROM\": \"UI\", \n        \"_VIP_ACCOUNT_BALANCE\": \"100000\"\n    }, \n    \"name\": \"Account Edit Notification\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/notifications/notification-definitions", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/notifications/notification-definitions")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"active\": true, \n    \"callout\": {\n        \"active\": true, \n        \"calloutAuth\": {\n            \"domain\": \"example_domain\", \n            \"password\": \"example_password\", \n            \"preemptive\": true, \n            \"username\": \"example_user\"\n        }, \n        \"calloutBaseurl\": \"https://www.example.com/callout/AccountEdit\", \n        \"calloutParams\": {\n            \"AccountName\": \"<Account.Name>\", \n            \"AccountNumber\": \"<Account.AccountNumber>\"\n        }, \n        \"calloutRetry\": true, \n        \"description\": \"Callout when an account is edited\", \n        \"eventTypeName\": \"AccountEdit\", \n        \"httpMethod\": \"POST\", \n        \"name\": \"Callout for Account Edited\", \n        \"requiredAuth\": true\n    }, \n    \"calloutActive\": true, \n    \"communicationProfileId\": \"6e569e1e05f040eda51a927b140c0ac5\", \n    \"description\": \"Notification sent out when an account is edited\", \n    \"emailActive\": true, \n    \"emailTemplateId\": \"6e569e1e05f040eda51a927b140c0ac6\", \n    \"eventTypeName\": \"AccountEdit\", \n    \"filterRule\": {\n        \"condition\": \"Account.Balance >= _VIP_BALANCE_AMOUNT && Account.Status == _ACCOUNT_STATUS\", \n        \"description\": \"Filter rule to test if an account is a VIP account\", \n        \"parameters\": {\n            \"_ACCOUNT_STATUS\": {\n                \"description\": \"The status of the VIP Account\", \n                \"displayName\": \"VIP Account Status\", \n                \"options\": [\n                    \"Draft\", \n                    \"Active\", \n                    \"Canceled\"\n                ], \n                \"valueType\": \"STRING\"\n            }, \n            \"_VIP_BALANCE_AMOUNT\": {\n                \"description\": \"The minimum account balance\", \n                \"displayName\": \"VIP Account Balance\", \n                \"options\": null, \n                \"valueType\": \"BIG_DECIMAL\"\n            }\n        }\n    }, \n    \"filterRuleParams\": {\n        \"_EDITED_FROM\": \"UI\", \n        \"_VIP_ACCOUNT_BALANCE\": \"100000\"\n    }, \n    \"name\": \"Account Edit Notification\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/notifications/notification-definitions");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"active\": true, \n    \"callout\": {\n        \"active\": true, \n        \"calloutAuth\": {\n            \"domain\": \"example_domain\", \n            \"password\": \"example_password\", \n            \"preemptive\": true, \n            \"username\": \"example_user\"\n        }, \n        \"calloutBaseurl\": \"https://www.example.com/callout/AccountEdit\", \n        \"calloutParams\": {\n            \"AccountName\": \"<Account.Name>\", \n            \"AccountNumber\": \"<Account.AccountNumber>\"\n        }, \n        \"calloutRetry\": true, \n        \"description\": \"Callout when an account is edited\", \n        \"eventTypeName\": \"AccountEdit\", \n        \"httpMethod\": \"POST\", \n        \"name\": \"Callout for Account Edited\", \n        \"requiredAuth\": true\n    }, \n    \"calloutActive\": true, \n    \"communicationProfileId\": \"6e569e1e05f040eda51a927b140c0ac5\", \n    \"description\": \"Notification sent out when an account is edited\", \n    \"emailActive\": true, \n    \"emailTemplateId\": \"6e569e1e05f040eda51a927b140c0ac6\", \n    \"eventTypeName\": \"AccountEdit\", \n    \"filterRule\": {\n        \"condition\": \"Account.Balance >= _VIP_BALANCE_AMOUNT && Account.Status == _ACCOUNT_STATUS\", \n        \"description\": \"Filter rule to test if an account is a VIP account\", \n        \"parameters\": {\n            \"_ACCOUNT_STATUS\": {\n                \"description\": \"The status of the VIP Account\", \n                \"displayName\": \"VIP Account Status\", \n                \"options\": [\n                    \"Draft\", \n                    \"Active\", \n                    \"Canceled\"\n                ], \n                \"valueType\": \"STRING\"\n            }, \n            \"_VIP_BALANCE_AMOUNT\": {\n                \"description\": \"The minimum account balance\", \n                \"displayName\": \"VIP Account Balance\", \n                \"options\": null, \n                \"valueType\": \"BIG_DECIMAL\"\n            }\n        }\n    }, \n    \"filterRuleParams\": {\n        \"_EDITED_FROM\": \"UI\", \n        \"_VIP_ACCOUNT_BALANCE\": \"100000\"\n    }, \n    \"name\": \"Account Edit Notification\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/notifications/notification-definitions/{id}":
    delete:
      description: |
        Deletes a notification definition.

        **Note**: This operation is only applicable to notifications for custom events.
      operationId: DELETE_Delete_Notification_Definition
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth_Notifications"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: The ID of the notification definition to be deleted.
          in: path
          name: id
          required: true
          schema:
            format: uuid
            type: string
      responses:
        "204":
          description: No Content
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "400":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"ObjectNotFound",
                      "message":"The notification definition with id 6e569e1e05f040eda51a927b140c0ac2 does not exist"
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Bad Request
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"404",
                      "message":"HTTP 404 Not Found"
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Not Found
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "405":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"405",
                      "message":"HTTP 405 Method Not Allowed"
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Method Not Allowed
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "415":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"415",
                      "message":"HTTP 415 Unsupported Media Type"
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Unsupported Media Type
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "500":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"500",
                      "message":"A temporary problem in the service occurred, you can retry later."
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Internal Server Error
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Delete a notification definition
      tags:
        - Notifications
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/notifications/notification-definitions/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/notifications/notification-definitions/{id}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/notifications/notification-definitions/{id}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/notifications/notification-definitions/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/notifications/notification-definitions/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/notifications/notification-definitions/{id}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      description: |
        Queries the notification definition of the given ID.

        **Note**: This operation is only applicable to notifications for custom events.
      operationId: GET_Get_Notification_Definition
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth_Notifications"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: The ID of the notification definition.
          in: path
          name: id
          required: true
          schema:
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETPublicNotificationDefinitionResponse"
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"404",
                      "message":"HTTP 404 Not Found"
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Not Found
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: The Zuora request ID passed from the request or generated by the API Gateway.
              schema:
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "405":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"405",
                      "message":"HTTP 405 Method Not Allowed"
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Method Not Allowed
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "415":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"415",
                      "message":"HTTP 415 Unsupported Media Type"
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Unsupported Media Type
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "500":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"500",
                      "message":"A temporary problem in the service occurred, you can retry later."
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Internal Server Error
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a notification definition
      tags:
        - Notifications
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/notifications/notification-definitions/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/notifications/notification-definitions/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/notifications/notification-definitions/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/notifications/notification-definitions/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/notifications/notification-definitions/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/notifications/notification-definitions/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: |
        Updates a notification definition.

        **Note**: This operation is only applicable to notifications for custom events.
      operationId: PUT_Update_Notification_Definition
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth_Notifications"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: The ID of the notification definition to be updated.
          in: path
          name: id
          required: true
          schema:
            format: uuid
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTPublicNotificationDefinitionRequest"
        description: The request body of the notification definition to be updated.
        required: true
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETPublicNotificationDefinitionResponse"
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "400":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"ConstraintViolated",
                      "message":"The email template is defined on a different EventType other than the notification's"
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Bad Request
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"404",
                      "message":"HTTP 404 Not Found"
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Not Found
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "405":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"405",
                      "message":"HTTP 405 Method Not Allowed"
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Method Not Allowed
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "415":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"415",
                      "message":"HTTP 415 Unsupported Media Type"
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Unsupported Media Type
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "500":
          content:
            application/json:
              examples:
                response:
                  value: |-
                    {
                      "code":"500",
                      "message":"A temporary problem in the service occurred, you can retry later."
                    }
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
          description: Internal Server Error
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Update a notification definition
      tags:
        - Notifications
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "active": true, 
                "callout": {
                    "active": true, 
                    "calloutAuth": {
                        "domain": "example_domain", 
                        "password": "example_password", 
                        "preemptive": true, 
                        "username": "example_user"
                    }, 
                    "calloutBaseurl": "https://www.example.com/callout/AccountEdit", 
                    "calloutParams": {
                        "AccountName": "<Account.Name>", 
                        "AccountNumber": "<Account.Number>"
                    }, 
                    "calloutRetry": true, 
                    "description": "Callout when an account is edited", 
                    "httpMethod": "POST", 
                    "name": "Callout for Account Edited", 
                    "requiredAuth": true
                }, 
                "calloutActive": true, 
                "communicationProfileId": "6e569e1e05f040eda51a927b140c0ac5", 
                "description": "Notification sent out when an account is edited", 
                "emailActive": true, 
                "emailTemplateId": "6e569e1e05f040eda51a927b140c0ac6", 
                "filterRule": {
                    "condition": "Account.Balance >= _VIP_BALANCE_AMOUNT && Account.Status == _ACCOUNT_STATUS", 
                    "description": "Filter rule to test if an account is a VIP account", 
                    "parameters": {
                        "_ACCOUNT_STATUS": {
                            "description": "The status of the VIP Account", 
                            "displayName": "VIP Account Status", 
                            "options": [
                                "Draft", 
                                "Active", 
                                "Canceled"
                            ], 
                            "valueType": "STRING"
                        }, 
                        "_VIP_BALANCE_AMOUNT": {
                            "description": "The minimum account balance", 
                            "displayName": "VIP Account Balance", 
                            "options": null, 
                            "valueType": "BIG_DECIMAL"
                        }
                    }
                }, 
                "filterRuleParams": {
                    "_EDITED_FROM": "UI", 
                    "_VIP_ACCOUNT_BALANCE": "100000"
                }, 
                "name": "Account Edit Notification"
            }' "https://rest.zuora.com/notifications/notification-definitions/{id}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/notifications/notification-definitions/{id}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "active": true, 
                "callout": {
                    "active": true, 
                    "calloutAuth": {
                        "domain": "example_domain", 
                        "password": "example_password", 
                        "preemptive": true, 
                        "username": "example_user"
                    }, 
                    "calloutBaseurl": "https://www.example.com/callout/AccountEdit", 
                    "calloutParams": {
                        "AccountName": "<Account.Name>", 
                        "AccountNumber": "<Account.Number>"
                    }, 
                    "calloutRetry": true, 
                    "description": "Callout when an account is edited", 
                    "httpMethod": "POST", 
                    "name": "Callout for Account Edited", 
                    "requiredAuth": true
                }, 
                "calloutActive": true, 
                "communicationProfileId": "6e569e1e05f040eda51a927b140c0ac5", 
                "description": "Notification sent out when an account is edited", 
                "emailActive": true, 
                "emailTemplateId": "6e569e1e05f040eda51a927b140c0ac6", 
                "filterRule": {
                    "condition": "Account.Balance >= _VIP_BALANCE_AMOUNT && Account.Status == _ACCOUNT_STATUS", 
                    "description": "Filter rule to test if an account is a VIP account", 
                    "parameters": {
                        "_ACCOUNT_STATUS": {
                            "description": "The status of the VIP Account", 
                            "displayName": "VIP Account Status", 
                            "options": [
                                "Draft", 
                                "Active", 
                                "Canceled"
                            ], 
                            "valueType": "STRING"
                        }, 
                        "_VIP_BALANCE_AMOUNT": {
                            "description": "The minimum account balance", 
                            "displayName": "VIP Account Balance", 
                            "options": null, 
                            "valueType": "BIG_DECIMAL"
                        }
                    }
                }, 
                "filterRuleParams": {
                    "_EDITED_FROM": "UI", 
                    "_VIP_ACCOUNT_BALANCE": "100000"
                }, 
                "name": "Account Edit Notification"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"active\": true, \n    \"callout\": {\n        \"active\": true, \n        \"calloutAuth\": {\n            \"domain\": \"example_domain\", \n            \"password\": \"example_password\", \n            \"preemptive\": true, \n            \"username\": \"example_user\"\n        }, \n        \"calloutBaseurl\": \"https://www.example.com/callout/AccountEdit\", \n        \"calloutParams\": {\n            \"AccountName\": \"<Account.Name>\", \n            \"AccountNumber\": \"<Account.Number>\"\n        }, \n        \"calloutRetry\": true, \n        \"description\": \"Callout when an account is edited\", \n        \"httpMethod\": \"POST\", \n        \"name\": \"Callout for Account Edited\", \n        \"requiredAuth\": true\n    }, \n    \"calloutActive\": true, \n    \"communicationProfileId\": \"6e569e1e05f040eda51a927b140c0ac5\", \n    \"description\": \"Notification sent out when an account is edited\", \n    \"emailActive\": true, \n    \"emailTemplateId\": \"6e569e1e05f040eda51a927b140c0ac6\", \n    \"filterRule\": {\n        \"condition\": \"Account.Balance >= _VIP_BALANCE_AMOUNT && Account.Status == _ACCOUNT_STATUS\", \n        \"description\": \"Filter rule to test if an account is a VIP account\", \n        \"parameters\": {\n            \"_ACCOUNT_STATUS\": {\n                \"description\": \"The status of the VIP Account\", \n                \"displayName\": \"VIP Account Status\", \n                \"options\": [\n                    \"Draft\", \n                    \"Active\", \n                    \"Canceled\"\n                ], \n                \"valueType\": \"STRING\"\n            }, \n            \"_VIP_BALANCE_AMOUNT\": {\n                \"description\": \"The minimum account balance\", \n                \"displayName\": \"VIP Account Balance\", \n                \"options\": null, \n                \"valueType\": \"BIG_DECIMAL\"\n            }\n        }\n    }, \n    \"filterRuleParams\": {\n        \"_EDITED_FROM\": \"UI\", \n        \"_VIP_ACCOUNT_BALANCE\": \"100000\"\n    }, \n    \"name\": \"Account Edit Notification\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/notifications/notification-definitions/{id}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"active\": true, \n    \"callout\": {\n        \"active\": true, \n        \"calloutAuth\": {\n            \"domain\": \"example_domain\", \n            \"password\": \"example_password\", \n            \"preemptive\": true, \n            \"username\": \"example_user\"\n        }, \n        \"calloutBaseurl\": \"https://www.example.com/callout/AccountEdit\", \n        \"calloutParams\": {\n            \"AccountName\": \"<Account.Name>\", \n            \"AccountNumber\": \"<Account.Number>\"\n        }, \n        \"calloutRetry\": true, \n        \"description\": \"Callout when an account is edited\", \n        \"httpMethod\": \"POST\", \n        \"name\": \"Callout for Account Edited\", \n        \"requiredAuth\": true\n    }, \n    \"calloutActive\": true, \n    \"communicationProfileId\": \"6e569e1e05f040eda51a927b140c0ac5\", \n    \"description\": \"Notification sent out when an account is edited\", \n    \"emailActive\": true, \n    \"emailTemplateId\": \"6e569e1e05f040eda51a927b140c0ac6\", \n    \"filterRule\": {\n        \"condition\": \"Account.Balance >= _VIP_BALANCE_AMOUNT && Account.Status == _ACCOUNT_STATUS\", \n        \"description\": \"Filter rule to test if an account is a VIP account\", \n        \"parameters\": {\n            \"_ACCOUNT_STATUS\": {\n                \"description\": \"The status of the VIP Account\", \n                \"displayName\": \"VIP Account Status\", \n                \"options\": [\n                    \"Draft\", \n                    \"Active\", \n                    \"Canceled\"\n                ], \n                \"valueType\": \"STRING\"\n            }, \n            \"_VIP_BALANCE_AMOUNT\": {\n                \"description\": \"The minimum account balance\", \n                \"displayName\": \"VIP Account Balance\", \n                \"options\": null, \n                \"valueType\": \"BIG_DECIMAL\"\n            }\n        }\n    }, \n    \"filterRuleParams\": {\n        \"_EDITED_FROM\": \"UI\", \n        \"_VIP_ACCOUNT_BALANCE\": \"100000\"\n    }, \n    \"name\": \"Account Edit Notification\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/notifications/notification-definitions/{id}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/notifications/notification-definitions/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"active\": true, \n    \"callout\": {\n        \"active\": true, \n        \"calloutAuth\": {\n            \"domain\": \"example_domain\", \n            \"password\": \"example_password\", \n            \"preemptive\": true, \n            \"username\": \"example_user\"\n        }, \n        \"calloutBaseurl\": \"https://www.example.com/callout/AccountEdit\", \n        \"calloutParams\": {\n            \"AccountName\": \"<Account.Name>\", \n            \"AccountNumber\": \"<Account.Number>\"\n        }, \n        \"calloutRetry\": true, \n        \"description\": \"Callout when an account is edited\", \n        \"httpMethod\": \"POST\", \n        \"name\": \"Callout for Account Edited\", \n        \"requiredAuth\": true\n    }, \n    \"calloutActive\": true, \n    \"communicationProfileId\": \"6e569e1e05f040eda51a927b140c0ac5\", \n    \"description\": \"Notification sent out when an account is edited\", \n    \"emailActive\": true, \n    \"emailTemplateId\": \"6e569e1e05f040eda51a927b140c0ac6\", \n    \"filterRule\": {\n        \"condition\": \"Account.Balance >= _VIP_BALANCE_AMOUNT && Account.Status == _ACCOUNT_STATUS\", \n        \"description\": \"Filter rule to test if an account is a VIP account\", \n        \"parameters\": {\n            \"_ACCOUNT_STATUS\": {\n                \"description\": \"The status of the VIP Account\", \n                \"displayName\": \"VIP Account Status\", \n                \"options\": [\n                    \"Draft\", \n                    \"Active\", \n                    \"Canceled\"\n                ], \n                \"valueType\": \"STRING\"\n            }, \n            \"_VIP_BALANCE_AMOUNT\": {\n                \"description\": \"The minimum account balance\", \n                \"displayName\": \"VIP Account Balance\", \n                \"options\": null, \n                \"valueType\": \"BIG_DECIMAL\"\n            }\n        }\n    }, \n    \"filterRuleParams\": {\n        \"_EDITED_FROM\": \"UI\", \n        \"_VIP_ACCOUNT_BALANCE\": \"100000\"\n    }, \n    \"name\": \"Account Edit Notification\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/notifications/notification-definitions/{id}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"active\": true, \n    \"callout\": {\n        \"active\": true, \n        \"calloutAuth\": {\n            \"domain\": \"example_domain\", \n            \"password\": \"example_password\", \n            \"preemptive\": true, \n            \"username\": \"example_user\"\n        }, \n        \"calloutBaseurl\": \"https://www.example.com/callout/AccountEdit\", \n        \"calloutParams\": {\n            \"AccountName\": \"<Account.Name>\", \n            \"AccountNumber\": \"<Account.Number>\"\n        }, \n        \"calloutRetry\": true, \n        \"description\": \"Callout when an account is edited\", \n        \"httpMethod\": \"POST\", \n        \"name\": \"Callout for Account Edited\", \n        \"requiredAuth\": true\n    }, \n    \"calloutActive\": true, \n    \"communicationProfileId\": \"6e569e1e05f040eda51a927b140c0ac5\", \n    \"description\": \"Notification sent out when an account is edited\", \n    \"emailActive\": true, \n    \"emailTemplateId\": \"6e569e1e05f040eda51a927b140c0ac6\", \n    \"filterRule\": {\n        \"condition\": \"Account.Balance >= _VIP_BALANCE_AMOUNT && Account.Status == _ACCOUNT_STATUS\", \n        \"description\": \"Filter rule to test if an account is a VIP account\", \n        \"parameters\": {\n            \"_ACCOUNT_STATUS\": {\n                \"description\": \"The status of the VIP Account\", \n                \"displayName\": \"VIP Account Status\", \n                \"options\": [\n                    \"Draft\", \n                    \"Active\", \n                    \"Canceled\"\n                ], \n                \"valueType\": \"STRING\"\n            }, \n            \"_VIP_BALANCE_AMOUNT\": {\n                \"description\": \"The minimum account balance\", \n                \"displayName\": \"VIP Account Balance\", \n                \"options\": null, \n                \"valueType\": \"BIG_DECIMAL\"\n            }\n        }\n    }, \n    \"filterRuleParams\": {\n        \"_EDITED_FROM\": \"UI\", \n        \"_VIP_ACCOUNT_BALANCE\": \"100000\"\n    }, \n    \"name\": \"Account Edit Notification\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /oauth/token:
    post:
      description: |
        Creates a bearer token that enables an OAuth client to authenticate with the Zuora REST API. The OAuth client must have been created using the Zuora UI. See [Authentication](https://www.zuora.com/developer/api-reference/#section/Authentication) for more information.

        **Note:** When using this operation, do not set any authentication headers such as `Authorization`, `apiAccessKeyId`, or `apiSecretAccessKey`.

        You should not use this operation to generate a large number of bearer tokens in a short period of time; each token should be used until it expires. If you receive a 429 Too Many Requests response when using this operation, reduce the frequency of requests. This endpoint is rate limited by IP address. The rate limit is 100 requests per minute.
      operationId: createToken
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              properties:
                client_id:
                  description: |
                    The Client ID of the OAuth client.
                  maxLength: 36
                  minLength: 36
                  type: string
                client_secret:
                  description: |
                    The Client Secret that was displayed when the OAuth client was created.
                  maxLength: 42
                  type: string
                grant_type:
                  description: |
                    The OAuth grant type that will be used to generate the token. The value of this parameter must be `client_credentials`.
                  enum:
                    - client_credentials
                  type: string
              required:
                - client_id
                - client_secret
                - grant_type
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    access_token: c652cbc0ea384b9f81856a93a2a74538
                    expires_in: 3599
                    jti: c652cbc0ea384b9f81856a93a2a74539
                    scope: user.7c4d5433dc234c369a01b9719ecd059f entity.1a2b7a37-3e7d-4cb3-b0e2-883de9e766cc entity.c92ed977-510c-4c48-9b51-8d5e848671e9 service.echo.read tenant.19
                    token_type: bearer
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/tokenResponse"
          description: OK
          headers:
            X-RateLimit-Limit-minute:
              description: |
                The rate limit of this operation, in requests per minute. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: integer
            X-RateLimit-Remaining-minute:
              description: |
                The number of requests that you may make in the next minute. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: integer
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "429":
          description: Too Many Requests
          headers:
            X-RateLimit-Limit-minute:
              description: |
                The rate limit of this operation, in requests per minute. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: integer
            X-RateLimit-Remaining-minute:
              description: |
                The number of requests that you may make in the next minute. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: integer
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Create an OAuth token
      tags:
        - OAuth
      x-code-samples:
        - lang: Curl
          source: |
            curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -d "client_id=b64e42ba-7e1a-4bc6-9146-5e1b420306b5" --data-urlencode "client_secret=dOFENLWU193EEoEsWjPZrcjLKVr5OrN1HC9Kqg" -d "grant_type=client_credentials" "https://rest.zuora.com/oauth/token"
  "/objects/batch/default/{object}":
    post:
      description: |
        Makes a batch update or delete of custom object records.
        ## Limitations 

        This call has the following limitations:
        * The maximum number of records that you can update by one call is 1,000.
        * The maximum number of records that you can delete by one call is 1,000.
        * The storage of empty strings in records is not supported.
        * Null values must be formatted as the following example: 
          ```
          {
              "action": {
                  "type": "update",
                  "records": {
                      "64edb2a5-2796-4e95-9559-846f8636a01b": {
                          "fieldName__c": null
                    }
                  }
              }
          }
          ```
      operationId: POST_CustomObjectRecordsBatchUpdateOrDelete
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - description: API version that determines the response schema. The default version is used if this parameter is not included. Specify `Zuora-Version` in the request header if you expect a specific response schema.
          in: header
          name: Zuora-Version
          required: false
          schema:
            format: date
            type: string
        - description: Specifies the custom object's API name as object. It is case-sensitive.
          in: path
          name: object
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/CustomObjectRecordBatchRequest"
        required: true
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CustomObjectRecordsBatchUpdatePartialSuccessResponse"
          description: |
            OK

            For the bacth `delete` action, it indicates the batch records have been successfully deleted.

            For the batch `update` action, it indicates that the batch records have been partially or completely updated.

            * If the `allowPartialSuccess` flag is set to `false`, the 200 response indicates that all object records have been successfully updated.
            * If the `allowPartialSuccess` flag is set to `true`, the 200 response indicates that some records might not be succesffully updated and the error information might be contained in the response body.
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "400":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CustomObjectRecordsErrorResponse"
          description: |
            Failed schema validation

            For the batch `update` action, the 400 response only returns when the `allowPartialSuccess` flag is set to `false` and the batch records have failed schema validation.
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse401Record"
          description: Unauthorized
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "500":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CustomObjectRecordsThrottledResponse"
          description: Internal error. Retry the returned records.
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Update or delete custom object records
      tags:
        - Custom Object Records
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "action": {
                    "allowPartialSuccess": true, 
                    "records": {
                        "64edb2a5-2796-4e95-9559-846f8636a01b": {
                            "age__c": "eighteen", 
                            "name__c": "elba43", 
                            "person_id__c": "30c52793-8f06-41c6-b623-04829710d7a"
                        }
                    }, 
                    "type": "update"
                }
            }' "https://rest.zuora.com/objects/batch/default/{object}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/objects/batch/default/{object}');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "action": {
                    "allowPartialSuccess": true, 
                    "records": {
                        "64edb2a5-2796-4e95-9559-846f8636a01b": {
                            "age__c": "eighteen", 
                            "name__c": "elba43", 
                            "person_id__c": "30c52793-8f06-41c6-b623-04829710d7a"
                        }
                    }, 
                    "type": "update"
                }
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"action\": {\n        \"allowPartialSuccess\": true, \n        \"records\": {\n            \"64edb2a5-2796-4e95-9559-846f8636a01b\": {\n                \"age__c\": \"eighteen\", \n                \"name__c\": \"elba43\", \n                \"person_id__c\": \"30c52793-8f06-41c6-b623-04829710d7a\"\n            }\n        }, \n        \"type\": \"update\"\n    }\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/objects/batch/default/{object}")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"action\": {\n        \"allowPartialSuccess\": true, \n        \"records\": {\n            \"64edb2a5-2796-4e95-9559-846f8636a01b\": {\n                \"age__c\": \"eighteen\", \n                \"name__c\": \"elba43\", \n                \"person_id__c\": \"30c52793-8f06-41c6-b623-04829710d7a\"\n            }\n        }, \n        \"type\": \"update\"\n    }\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/objects/batch/default/{object}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/objects/batch/default/{object}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"action\": {\n        \"allowPartialSuccess\": true, \n        \"records\": {\n            \"64edb2a5-2796-4e95-9559-846f8636a01b\": {\n                \"age__c\": \"eighteen\", \n                \"name__c\": \"elba43\", \n                \"person_id__c\": \"30c52793-8f06-41c6-b623-04829710d7a\"\n            }\n        }, \n        \"type\": \"update\"\n    }\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/objects/batch/default/{object}");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"action\": {\n        \"allowPartialSuccess\": true, \n        \"records\": {\n            \"64edb2a5-2796-4e95-9559-846f8636a01b\": {\n                \"age__c\": \"eighteen\", \n                \"name__c\": \"elba43\", \n                \"person_id__c\": \"30c52793-8f06-41c6-b623-04829710d7a\"\n            }\n        }, \n        \"type\": \"update\"\n    }\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /objects/definitions/default:
    get:
      description: |
        Get all custom objects definitions for a given tenant. If you want to copy all the existing custom objects from an old tenant to a new tenant, you can call this operation in your old tenant and then use its response directly as the request of the [Create custom object definitions](https://www.zuora.com/developer/api-reference/#operation/POST_CustomObjectDefinitions) call in the new tenant to import all the custom objects from the old tenant.
      operationId: GET_AllCustomObjectDefinitionsInNamespace
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - description: API version that determines the response schema. The default version is used if this parameter is not included. Specify `Zuora-Version` in the request header if you expect a specific response schema.
          in: header
          name: Zuora-Version
          required: false
          schema:
            format: date
            type: string
        - description: |
            If you set `select` to `type`, the response will only contain the `type` of each custom object.
          in: query
          name: select
          required: false
          schema:
            enum:
              - type
            type: string
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETAllCustomObjectDefinitionsInNamespaceResponse"
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List custom object definitions
      tags:
        - Custom Object Definitions
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/objects/definitions/default"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/objects/definitions/default');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/objects/definitions/default")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/objects/definitions/default", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/objects/definitions/default")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/objects/definitions/default");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    post:
      description: |
        You can post custom object definitions with the request body schema described below. 

        This operation also allows you to use the [List custom object definitions](https://www.zuora.com/developer/api-reference/#operation/GET_AllCustomObjectDefinitionsInNamespace) response schema as its request schema. If you want to copy all the existing custom objects from an old tenant to a new tenant, you can make a [List custom object definitions](https://www.zuora.com/developer/api-reference/#operation/GET_AllCustomObjectDefinitionsInNamespace) call in your old tenant and then use its response directly as the request of this operation in the new tenant to import all the custom objects from the old tenant.

        The `label` field is the UI label of the custom object. The `object` field contains the API Name of the custom object.

        ## Limitations 

        This custom object definition has the following limitations:

        * The maximum number of characters for the Custom Object API Name (`object`) is 64.
        * The maximum number of characters for the Custom Object Label (`label`) is	64.
        * The maximum number of characters for the Custom Object Description 250.
        * The maximum number of custom fields in an custom object	is 50.
        * The maximum number of characters for the custom field API name is	64.
        * The maximum number of characters for the custom field label (`label`) is	64.
        * The maximum number of characters for the custom field Description	is 250.
        * The maximum number of picklist options is 250.
        * The default maximum number of characters for the Text field is 512. You can configure the max length up to 4,096 characters when creating or updating the custom object definition via API.
      operationId: POST_CustomObjectDefinitions
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - description: API version that determines the response schema. The default version is used if this parameter is not included. Specify `Zuora-Version` in the request header if you expect a specific response schema.
          in: header
          name: Zuora-Version
          required: false
          schema:
            format: date
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PostCustomObjectDefinitionsRequest"
        description: The custom object definitions to be created
        required: true
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETAllCustomObjectDefinitionsInNamespaceResponse"
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "400":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonErrorResponse"
          description: Bad request
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Create custom object definitions
      tags:
        - Custom Object Definitions
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "definitions": {
                    "Delivery": {
                        "description": "Delivery schedule for shipping products based on customer'\''s subscription.", 
                        "filterable": [
                            "Quantity__c", 
                            "ProductName__c", 
                            "Cancelled__c", 
                            "ShippingStatus__c"
                        ], 
                        "label": "Delivery", 
                        "object": "Delivery", 
                        "properties": {
                            "CancellationTime__c": {
                                "description": "The time at which customer cancelled this particular shipment.", 
                                "format": "date-time", 
                                "label": "Cancellation Time", 
                                "type": "string"
                            }, 
                            "Cancelled__c": {
                                "default": false, 
                                "description": "Indicator is true when the customer has cancelled this particular shipment.", 
                                "label": "Shipment Cancelled", 
                                "type": "boolean"
                            }, 
                            "ContactEmail__c": {
                                "description": "The customer'\''s email address.", 
                                "label": "Customer Email", 
                                "maxLength": 128, 
                                "type": "string"
                            }, 
                            "ContactId__c": {
                                "description": "The customer contact who will receive the shipment.", 
                                "format": "uuid", 
                                "label": "Ship To Customer", 
                                "type": "string"
                            }, 
                            "ProductName__c": {
                                "description": "The name of the product that is being shipped to customer.", 
                                "label": "Product Name", 
                                "type": "string"
                            }, 
                            "Quantity__c": {
                                "description": "The quantity of product that is being shipped to customer.", 
                                "label": "Quantity", 
                                "maximum": 20, 
                                "minimum": 1, 
                                "type": "integer"
                            }, 
                            "ShippingDate__c": {
                                "description": "The date the product will be sent to shipping vendor for delivery.", 
                                "format": "date", 
                                "label": "Shipping Date", 
                                "type": "string"
                            }, 
                            "ShippingStatus__c": {
                                "default": "Pending", 
                                "description": "The status of the shipment - e.g. Pending, Preparing shipment, Waiting for tracking information, or Shipped.", 
                                "enum": [
                                    "Pending", 
                                    "Preparing shipment", 
                                    "Waiting for tracking information", 
                                    "Shipped"
                                ], 
                                "label": "Shipping Status", 
                                "type": "string"
                            }, 
                            "SubscriptionId__c": {
                                "description": "The subscription that is associated with the shipment record.", 
                                "format": "uuid", 
                                "label": "Subscription", 
                                "type": "string"
                            }, 
                            "TotalWeight__c": {
                                "description": "The total weight of the product and packaging that is being shipped to customer.", 
                                "label": "Total Weight (lbs.)", 
                                "minimum": 0, 
                                "type": "number"
                            }
                        }, 
                        "relationships": [
                            {
                                "cardinality": "manyToOne", 
                                "fields": {
                                    "SubscriptionId__c": "Id"
                                }, 
                                "namespace": "com_zuora", 
                                "object": "subscription", 
                                "recordConstraints": {
                                    "create": {
                                        "enforceValidMapping": false
                                    }
                                }
                            }, 
                            {
                                "cardinality": "manyToOne", 
                                "fields": {
                                    "ContactId__c": "Id"
                                }, 
                                "namespace": "com_zuora", 
                                "object": "contact", 
                                "recordConstraints": {
                                    "create": {
                                        "enforceValidMapping": false
                                    }
                                }
                            }
                        ], 
                        "required": [
                            "SubscriptionId__c", 
                            "ContactId__c", 
                            "ProductName__c", 
                            "Quantity__c", 
                            "ShippingDate__c"
                        ]
                    }, 
                    "birth_place_custom_object": {
                        "filterable": [
                            "city__c"
                        ], 
                        "label": "Birth Place Custom Object", 
                        "object": "birth_place_custom_object", 
                        "properties": {
                            "ContactId__c": {
                                "format": "uuid", 
                                "label": "Contact", 
                                "type": "string"
                            }, 
                            "city__c": {
                                "label": "city label", 
                                "type": "string"
                            }, 
                            "country__c": {
                                "label": "country label", 
                                "type": "string"
                            }, 
                            "state__c": {
                                "label": "state label", 
                                "type": "string"
                            }
                        }, 
                        "relationships": [
                            {
                                "cardinality": "manyToOne", 
                                "fields": {
                                    "ContactId__c": "Id"
                                }, 
                                "namespace": "com_zuora", 
                                "object": "contact", 
                                "recordConstraints": {
                                    "create": {
                                        "enforceValidMapping": false
                                    }
                                }
                            }
                        ], 
                        "required": [
                            "city__c", 
                            "state__c", 
                            "country__c"
                        ], 
                        "type": "object"
                    }
                }
            }' "https://rest.zuora.com/objects/definitions/default"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/objects/definitions/default');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "definitions": {
                    "Delivery": {
                        "description": "Delivery schedule for shipping products based on customer\'s subscription.", 
                        "filterable": [
                            "Quantity__c", 
                            "ProductName__c", 
                            "Cancelled__c", 
                            "ShippingStatus__c"
                        ], 
                        "label": "Delivery", 
                        "object": "Delivery", 
                        "properties": {
                            "CancellationTime__c": {
                                "description": "The time at which customer cancelled this particular shipment.", 
                                "format": "date-time", 
                                "label": "Cancellation Time", 
                                "type": "string"
                            }, 
                            "Cancelled__c": {
                                "default": false, 
                                "description": "Indicator is true when the customer has cancelled this particular shipment.", 
                                "label": "Shipment Cancelled", 
                                "type": "boolean"
                            }, 
                            "ContactEmail__c": {
                                "description": "The customer\'s email address.", 
                                "label": "Customer Email", 
                                "maxLength": 128, 
                                "type": "string"
                            }, 
                            "ContactId__c": {
                                "description": "The customer contact who will receive the shipment.", 
                                "format": "uuid", 
                                "label": "Ship To Customer", 
                                "type": "string"
                            }, 
                            "ProductName__c": {
                                "description": "The name of the product that is being shipped to customer.", 
                                "label": "Product Name", 
                                "type": "string"
                            }, 
                            "Quantity__c": {
                                "description": "The quantity of product that is being shipped to customer.", 
                                "label": "Quantity", 
                                "maximum": 20, 
                                "minimum": 1, 
                                "type": "integer"
                            }, 
                            "ShippingDate__c": {
                                "description": "The date the product will be sent to shipping vendor for delivery.", 
                                "format": "date", 
                                "label": "Shipping Date", 
                                "type": "string"
                            }, 
                            "ShippingStatus__c": {
                                "default": "Pending", 
                                "description": "The status of the shipment - e.g. Pending, Preparing shipment, Waiting for tracking information, or Shipped.", 
                                "enum": [
                                    "Pending", 
                                    "Preparing shipment", 
                                    "Waiting for tracking information", 
                                    "Shipped"
                                ], 
                                "label": "Shipping Status", 
                                "type": "string"
                            }, 
                            "SubscriptionId__c": {
                                "description": "The subscription that is associated with the shipment record.", 
                                "format": "uuid", 
                                "label": "Subscription", 
                                "type": "string"
                            }, 
                            "TotalWeight__c": {
                                "description": "The total weight of the product and packaging that is being shipped to customer.", 
                                "label": "Total Weight (lbs.)", 
                                "minimum": 0, 
                                "type": "number"
                            }
                        }, 
                        "relationships": [
                            {
                                "cardinality": "manyToOne", 
                                "fields": {
                                    "SubscriptionId__c": "Id"
                                }, 
                                "namespace": "com_zuora", 
                                "object": "subscription", 
                                "recordConstraints": {
                                    "create": {
                                        "enforceValidMapping": false
                                    }
                                }
                            }, 
                            {
                                "cardinality": "manyToOne", 
                                "fields": {
                                    "ContactId__c": "Id"
                                }, 
                                "namespace": "com_zuora", 
                                "object": "contact", 
                                "recordConstraints": {
                                    "create": {
                                        "enforceValidMapping": false
                                    }
                                }
                            }
                        ], 
                        "required": [
                            "SubscriptionId__c", 
                            "ContactId__c", 
                            "ProductName__c", 
                            "Quantity__c", 
                            "ShippingDate__c"
                        ]
                    }, 
                    "birth_place_custom_object": {
                        "filterable": [
                            "city__c"
                        ], 
                        "label": "Birth Place Custom Object", 
                        "object": "birth_place_custom_object", 
                        "properties": {
                            "ContactId__c": {
                                "format": "uuid", 
                                "label": "Contact", 
                                "type": "string"
                            }, 
                            "city__c": {
                                "label": "city label", 
                                "type": "string"
                            }, 
                            "country__c": {
                                "label": "country label", 
                                "type": "string"
                            }, 
                            "state__c": {
                                "label": "state label", 
                                "type": "string"
                            }
                        }, 
                        "relationships": [
                            {
                                "cardinality": "manyToOne", 
                                "fields": {
                                    "ContactId__c": "Id"
                                }, 
                                "namespace": "com_zuora", 
                                "object": "contact", 
                                "recordConstraints": {
                                    "create": {
                                        "enforceValidMapping": false
                                    }
                                }
                            }
                        ], 
                        "required": [
                            "city__c", 
                            "state__c", 
                            "country__c"
                        ], 
                        "type": "object"
                    }
                }
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"definitions\": {\n        \"Delivery\": {\n            \"description\": \"Delivery schedule for shipping products based on customer's subscription.\", \n            \"filterable\": [\n                \"Quantity__c\", \n                \"ProductName__c\", \n                \"Cancelled__c\", \n                \"ShippingStatus__c\"\n            ], \n            \"label\": \"Delivery\", \n            \"object\": \"Delivery\", \n            \"properties\": {\n                \"CancellationTime__c\": {\n                    \"description\": \"The time at which customer cancelled this particular shipment.\", \n                    \"format\": \"date-time\", \n                    \"label\": \"Cancellation Time\", \n                    \"type\": \"string\"\n                }, \n                \"Cancelled__c\": {\n                    \"default\": false, \n                    \"description\": \"Indicator is true when the customer has cancelled this particular shipment.\", \n                    \"label\": \"Shipment Cancelled\", \n                    \"type\": \"boolean\"\n                }, \n                \"ContactEmail__c\": {\n                    \"description\": \"The customer's email address.\", \n                    \"label\": \"Customer Email\", \n                    \"maxLength\": 128, \n                    \"type\": \"string\"\n                }, \n                \"ContactId__c\": {\n                    \"description\": \"The customer contact who will receive the shipment.\", \n                    \"format\": \"uuid\", \n                    \"label\": \"Ship To Customer\", \n                    \"type\": \"string\"\n                }, \n                \"ProductName__c\": {\n                    \"description\": \"The name of the product that is being shipped to customer.\", \n                    \"label\": \"Product Name\", \n                    \"type\": \"string\"\n                }, \n                \"Quantity__c\": {\n                    \"description\": \"The quantity of product that is being shipped to customer.\", \n                    \"label\": \"Quantity\", \n                    \"maximum\": 20, \n                    \"minimum\": 1, \n                    \"type\": \"integer\"\n                }, \n                \"ShippingDate__c\": {\n                    \"description\": \"The date the product will be sent to shipping vendor for delivery.\", \n                    \"format\": \"date\", \n                    \"label\": \"Shipping Date\", \n                    \"type\": \"string\"\n                }, \n                \"ShippingStatus__c\": {\n                    \"default\": \"Pending\", \n                    \"description\": \"The status of the shipment - e.g. Pending, Preparing shipment, Waiting for tracking information, or Shipped.\", \n                    \"enum\": [\n                        \"Pending\", \n                        \"Preparing shipment\", \n                        \"Waiting for tracking information\", \n                        \"Shipped\"\n                    ], \n                    \"label\": \"Shipping Status\", \n                    \"type\": \"string\"\n                }, \n                \"SubscriptionId__c\": {\n                    \"description\": \"The subscription that is associated with the shipment record.\", \n                    \"format\": \"uuid\", \n                    \"label\": \"Subscription\", \n                    \"type\": \"string\"\n                }, \n                \"TotalWeight__c\": {\n                    \"description\": \"The total weight of the product and packaging that is being shipped to customer.\", \n                    \"label\": \"Total Weight (lbs.)\", \n                    \"minimum\": 0, \n                    \"type\": \"number\"\n                }\n            }, \n            \"relationships\": [\n                {\n                    \"cardinality\": \"manyToOne\", \n                    \"fields\": {\n                        \"SubscriptionId__c\": \"Id\"\n                    }, \n                    \"namespace\": \"com_zuora\", \n                    \"object\": \"subscription\", \n                    \"recordConstraints\": {\n                        \"create\": {\n                            \"enforceValidMapping\": false\n                        }\n                    }\n                }, \n                {\n                    \"cardinality\": \"manyToOne\", \n                    \"fields\": {\n                        \"ContactId__c\": \"Id\"\n                    }, \n                    \"namespace\": \"com_zuora\", \n                    \"object\": \"contact\", \n                    \"recordConstraints\": {\n                        \"create\": {\n                            \"enforceValidMapping\": false\n                        }\n                    }\n                }\n            ], \n            \"required\": [\n                \"SubscriptionId__c\", \n                \"ContactId__c\", \n                \"ProductName__c\", \n                \"Quantity__c\", \n                \"ShippingDate__c\"\n            ]\n        }, \n        \"birth_place_custom_object\": {\n            \"filterable\": [\n                \"city__c\"\n            ], \n            \"label\": \"Birth Place Custom Object\", \n            \"object\": \"birth_place_custom_object\", \n            \"properties\": {\n                \"ContactId__c\": {\n                    \"format\": \"uuid\", \n                    \"label\": \"Contact\", \n                    \"type\": \"string\"\n                }, \n                \"city__c\": {\n                    \"label\": \"city label\", \n                    \"type\": \"string\"\n                }, \n                \"country__c\": {\n                    \"label\": \"country label\", \n                    \"type\": \"string\"\n                }, \n                \"state__c\": {\n                    \"label\": \"state label\", \n                    \"type\": \"string\"\n                }\n            }, \n            \"relationships\": [\n                {\n                    \"cardinality\": \"manyToOne\", \n                    \"fields\": {\n                        \"ContactId__c\": \"Id\"\n                    }, \n                    \"namespace\": \"com_zuora\", \n                    \"object\": \"contact\", \n                    \"recordConstraints\": {\n                        \"create\": {\n                            \"enforceValidMapping\": false\n                        }\n                    }\n                }\n            ], \n            \"required\": [\n                \"city__c\", \n                \"state__c\", \n                \"country__c\"\n            ], \n            \"type\": \"object\"\n        }\n    }\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/objects/definitions/default")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"definitions\": {\n        \"Delivery\": {\n            \"description\": \"Delivery schedule for shipping products based on customer's subscription.\", \n            \"filterable\": [\n                \"Quantity__c\", \n                \"ProductName__c\", \n                \"Cancelled__c\", \n                \"ShippingStatus__c\"\n            ], \n            \"label\": \"Delivery\", \n            \"object\": \"Delivery\", \n            \"properties\": {\n                \"CancellationTime__c\": {\n                    \"description\": \"The time at which customer cancelled this particular shipment.\", \n                    \"format\": \"date-time\", \n                    \"label\": \"Cancellation Time\", \n                    \"type\": \"string\"\n                }, \n                \"Cancelled__c\": {\n                    \"default\": false, \n                    \"description\": \"Indicator is true when the customer has cancelled this particular shipment.\", \n                    \"label\": \"Shipment Cancelled\", \n                    \"type\": \"boolean\"\n                }, \n                \"ContactEmail__c\": {\n                    \"description\": \"The customer's email address.\", \n                    \"label\": \"Customer Email\", \n                    \"maxLength\": 128, \n                    \"type\": \"string\"\n                }, \n                \"ContactId__c\": {\n                    \"description\": \"The customer contact who will receive the shipment.\", \n                    \"format\": \"uuid\", \n                    \"label\": \"Ship To Customer\", \n                    \"type\": \"string\"\n                }, \n                \"ProductName__c\": {\n                    \"description\": \"The name of the product that is being shipped to customer.\", \n                    \"label\": \"Product Name\", \n                    \"type\": \"string\"\n                }, \n                \"Quantity__c\": {\n                    \"description\": \"The quantity of product that is being shipped to customer.\", \n                    \"label\": \"Quantity\", \n                    \"maximum\": 20, \n                    \"minimum\": 1, \n                    \"type\": \"integer\"\n                }, \n                \"ShippingDate__c\": {\n                    \"description\": \"The date the product will be sent to shipping vendor for delivery.\", \n                    \"format\": \"date\", \n                    \"label\": \"Shipping Date\", \n                    \"type\": \"string\"\n                }, \n                \"ShippingStatus__c\": {\n                    \"default\": \"Pending\", \n                    \"description\": \"The status of the shipment - e.g. Pending, Preparing shipment, Waiting for tracking information, or Shipped.\", \n                    \"enum\": [\n                        \"Pending\", \n                        \"Preparing shipment\", \n                        \"Waiting for tracking information\", \n                        \"Shipped\"\n                    ], \n                    \"label\": \"Shipping Status\", \n                    \"type\": \"string\"\n                }, \n                \"SubscriptionId__c\": {\n                    \"description\": \"The subscription that is associated with the shipment record.\", \n                    \"format\": \"uuid\", \n                    \"label\": \"Subscription\", \n                    \"type\": \"string\"\n                }, \n                \"TotalWeight__c\": {\n                    \"description\": \"The total weight of the product and packaging that is being shipped to customer.\", \n                    \"label\": \"Total Weight (lbs.)\", \n                    \"minimum\": 0, \n                    \"type\": \"number\"\n                }\n            }, \n            \"relationships\": [\n                {\n                    \"cardinality\": \"manyToOne\", \n                    \"fields\": {\n                        \"SubscriptionId__c\": \"Id\"\n                    }, \n                    \"namespace\": \"com_zuora\", \n                    \"object\": \"subscription\", \n                    \"recordConstraints\": {\n                        \"create\": {\n                            \"enforceValidMapping\": false\n                        }\n                    }\n                }, \n                {\n                    \"cardinality\": \"manyToOne\", \n                    \"fields\": {\n                        \"ContactId__c\": \"Id\"\n                    }, \n                    \"namespace\": \"com_zuora\", \n                    \"object\": \"contact\", \n                    \"recordConstraints\": {\n                        \"create\": {\n                            \"enforceValidMapping\": false\n                        }\n                    }\n                }\n            ], \n            \"required\": [\n                \"SubscriptionId__c\", \n                \"ContactId__c\", \n                \"ProductName__c\", \n                \"Quantity__c\", \n                \"ShippingDate__c\"\n            ]\n        }, \n        \"birth_place_custom_object\": {\n            \"filterable\": [\n                \"city__c\"\n            ], \n            \"label\": \"Birth Place Custom Object\", \n            \"object\": \"birth_place_custom_object\", \n            \"properties\": {\n                \"ContactId__c\": {\n                    \"format\": \"uuid\", \n                    \"label\": \"Contact\", \n                    \"type\": \"string\"\n                }, \n                \"city__c\": {\n                    \"label\": \"city label\", \n                    \"type\": \"string\"\n                }, \n                \"country__c\": {\n                    \"label\": \"country label\", \n                    \"type\": \"string\"\n                }, \n                \"state__c\": {\n                    \"label\": \"state label\", \n                    \"type\": \"string\"\n                }\n            }, \n            \"relationships\": [\n                {\n                    \"cardinality\": \"manyToOne\", \n                    \"fields\": {\n                        \"ContactId__c\": \"Id\"\n                    }, \n                    \"namespace\": \"com_zuora\", \n                    \"object\": \"contact\", \n                    \"recordConstraints\": {\n                        \"create\": {\n                            \"enforceValidMapping\": false\n                        }\n                    }\n                }\n            ], \n            \"required\": [\n                \"city__c\", \n                \"state__c\", \n                \"country__c\"\n            ], \n            \"type\": \"object\"\n        }\n    }\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/objects/definitions/default", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/objects/definitions/default")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"definitions\": {\n        \"Delivery\": {\n            \"description\": \"Delivery schedule for shipping products based on customer's subscription.\", \n            \"filterable\": [\n                \"Quantity__c\", \n                \"ProductName__c\", \n                \"Cancelled__c\", \n                \"ShippingStatus__c\"\n            ], \n            \"label\": \"Delivery\", \n            \"object\": \"Delivery\", \n            \"properties\": {\n                \"CancellationTime__c\": {\n                    \"description\": \"The time at which customer cancelled this particular shipment.\", \n                    \"format\": \"date-time\", \n                    \"label\": \"Cancellation Time\", \n                    \"type\": \"string\"\n                }, \n                \"Cancelled__c\": {\n                    \"default\": false, \n                    \"description\": \"Indicator is true when the customer has cancelled this particular shipment.\", \n                    \"label\": \"Shipment Cancelled\", \n                    \"type\": \"boolean\"\n                }, \n                \"ContactEmail__c\": {\n                    \"description\": \"The customer's email address.\", \n                    \"label\": \"Customer Email\", \n                    \"maxLength\": 128, \n                    \"type\": \"string\"\n                }, \n                \"ContactId__c\": {\n                    \"description\": \"The customer contact who will receive the shipment.\", \n                    \"format\": \"uuid\", \n                    \"label\": \"Ship To Customer\", \n                    \"type\": \"string\"\n                }, \n                \"ProductName__c\": {\n                    \"description\": \"The name of the product that is being shipped to customer.\", \n                    \"label\": \"Product Name\", \n                    \"type\": \"string\"\n                }, \n                \"Quantity__c\": {\n                    \"description\": \"The quantity of product that is being shipped to customer.\", \n                    \"label\": \"Quantity\", \n                    \"maximum\": 20, \n                    \"minimum\": 1, \n                    \"type\": \"integer\"\n                }, \n                \"ShippingDate__c\": {\n                    \"description\": \"The date the product will be sent to shipping vendor for delivery.\", \n                    \"format\": \"date\", \n                    \"label\": \"Shipping Date\", \n                    \"type\": \"string\"\n                }, \n                \"ShippingStatus__c\": {\n                    \"default\": \"Pending\", \n                    \"description\": \"The status of the shipment - e.g. Pending, Preparing shipment, Waiting for tracking information, or Shipped.\", \n                    \"enum\": [\n                        \"Pending\", \n                        \"Preparing shipment\", \n                        \"Waiting for tracking information\", \n                        \"Shipped\"\n                    ], \n                    \"label\": \"Shipping Status\", \n                    \"type\": \"string\"\n                }, \n                \"SubscriptionId__c\": {\n                    \"description\": \"The subscription that is associated with the shipment record.\", \n                    \"format\": \"uuid\", \n                    \"label\": \"Subscription\", \n                    \"type\": \"string\"\n                }, \n                \"TotalWeight__c\": {\n                    \"description\": \"The total weight of the product and packaging that is being shipped to customer.\", \n                    \"label\": \"Total Weight (lbs.)\", \n                    \"minimum\": 0, \n                    \"type\": \"number\"\n                }\n            }, \n            \"relationships\": [\n                {\n                    \"cardinality\": \"manyToOne\", \n                    \"fields\": {\n                        \"SubscriptionId__c\": \"Id\"\n                    }, \n                    \"namespace\": \"com_zuora\", \n                    \"object\": \"subscription\", \n                    \"recordConstraints\": {\n                        \"create\": {\n                            \"enforceValidMapping\": false\n                        }\n                    }\n                }, \n                {\n                    \"cardinality\": \"manyToOne\", \n                    \"fields\": {\n                        \"ContactId__c\": \"Id\"\n                    }, \n                    \"namespace\": \"com_zuora\", \n                    \"object\": \"contact\", \n                    \"recordConstraints\": {\n                        \"create\": {\n                            \"enforceValidMapping\": false\n                        }\n                    }\n                }\n            ], \n            \"required\": [\n                \"SubscriptionId__c\", \n                \"ContactId__c\", \n                \"ProductName__c\", \n                \"Quantity__c\", \n                \"ShippingDate__c\"\n            ]\n        }, \n        \"birth_place_custom_object\": {\n            \"filterable\": [\n                \"city__c\"\n            ], \n            \"label\": \"Birth Place Custom Object\", \n            \"object\": \"birth_place_custom_object\", \n            \"properties\": {\n                \"ContactId__c\": {\n                    \"format\": \"uuid\", \n                    \"label\": \"Contact\", \n                    \"type\": \"string\"\n                }, \n                \"city__c\": {\n                    \"label\": \"city label\", \n                    \"type\": \"string\"\n                }, \n                \"country__c\": {\n                    \"label\": \"country label\", \n                    \"type\": \"string\"\n                }, \n                \"state__c\": {\n                    \"label\": \"state label\", \n                    \"type\": \"string\"\n                }\n            }, \n            \"relationships\": [\n                {\n                    \"cardinality\": \"manyToOne\", \n                    \"fields\": {\n                        \"ContactId__c\": \"Id\"\n                    }, \n                    \"namespace\": \"com_zuora\", \n                    \"object\": \"contact\", \n                    \"recordConstraints\": {\n                        \"create\": {\n                            \"enforceValidMapping\": false\n                        }\n                    }\n                }\n            ], \n            \"required\": [\n                \"city__c\", \n                \"state__c\", \n                \"country__c\"\n            ], \n            \"type\": \"object\"\n        }\n    }\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/objects/definitions/default");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"definitions\": {\n        \"Delivery\": {\n            \"description\": \"Delivery schedule for shipping products based on customer's subscription.\", \n            \"filterable\": [\n                \"Quantity__c\", \n                \"ProductName__c\", \n                \"Cancelled__c\", \n                \"ShippingStatus__c\"\n            ], \n            \"label\": \"Delivery\", \n            \"object\": \"Delivery\", \n            \"properties\": {\n                \"CancellationTime__c\": {\n                    \"description\": \"The time at which customer cancelled this particular shipment.\", \n                    \"format\": \"date-time\", \n                    \"label\": \"Cancellation Time\", \n                    \"type\": \"string\"\n                }, \n                \"Cancelled__c\": {\n                    \"default\": false, \n                    \"description\": \"Indicator is true when the customer has cancelled this particular shipment.\", \n                    \"label\": \"Shipment Cancelled\", \n                    \"type\": \"boolean\"\n                }, \n                \"ContactEmail__c\": {\n                    \"description\": \"The customer's email address.\", \n                    \"label\": \"Customer Email\", \n                    \"maxLength\": 128, \n                    \"type\": \"string\"\n                }, \n                \"ContactId__c\": {\n                    \"description\": \"The customer contact who will receive the shipment.\", \n                    \"format\": \"uuid\", \n                    \"label\": \"Ship To Customer\", \n                    \"type\": \"string\"\n                }, \n                \"ProductName__c\": {\n                    \"description\": \"The name of the product that is being shipped to customer.\", \n                    \"label\": \"Product Name\", \n                    \"type\": \"string\"\n                }, \n                \"Quantity__c\": {\n                    \"description\": \"The quantity of product that is being shipped to customer.\", \n                    \"label\": \"Quantity\", \n                    \"maximum\": 20, \n                    \"minimum\": 1, \n                    \"type\": \"integer\"\n                }, \n                \"ShippingDate__c\": {\n                    \"description\": \"The date the product will be sent to shipping vendor for delivery.\", \n                    \"format\": \"date\", \n                    \"label\": \"Shipping Date\", \n                    \"type\": \"string\"\n                }, \n                \"ShippingStatus__c\": {\n                    \"default\": \"Pending\", \n                    \"description\": \"The status of the shipment - e.g. Pending, Preparing shipment, Waiting for tracking information, or Shipped.\", \n                    \"enum\": [\n                        \"Pending\", \n                        \"Preparing shipment\", \n                        \"Waiting for tracking information\", \n                        \"Shipped\"\n                    ], \n                    \"label\": \"Shipping Status\", \n                    \"type\": \"string\"\n                }, \n                \"SubscriptionId__c\": {\n                    \"description\": \"The subscription that is associated with the shipment record.\", \n                    \"format\": \"uuid\", \n                    \"label\": \"Subscription\", \n                    \"type\": \"string\"\n                }, \n                \"TotalWeight__c\": {\n                    \"description\": \"The total weight of the product and packaging that is being shipped to customer.\", \n                    \"label\": \"Total Weight (lbs.)\", \n                    \"minimum\": 0, \n                    \"type\": \"number\"\n                }\n            }, \n            \"relationships\": [\n                {\n                    \"cardinality\": \"manyToOne\", \n                    \"fields\": {\n                        \"SubscriptionId__c\": \"Id\"\n                    }, \n                    \"namespace\": \"com_zuora\", \n                    \"object\": \"subscription\", \n                    \"recordConstraints\": {\n                        \"create\": {\n                            \"enforceValidMapping\": false\n                        }\n                    }\n                }, \n                {\n                    \"cardinality\": \"manyToOne\", \n                    \"fields\": {\n                        \"ContactId__c\": \"Id\"\n                    }, \n                    \"namespace\": \"com_zuora\", \n                    \"object\": \"contact\", \n                    \"recordConstraints\": {\n                        \"create\": {\n                            \"enforceValidMapping\": false\n                        }\n                    }\n                }\n            ], \n            \"required\": [\n                \"SubscriptionId__c\", \n                \"ContactId__c\", \n                \"ProductName__c\", \n                \"Quantity__c\", \n                \"ShippingDate__c\"\n            ]\n        }, \n        \"birth_place_custom_object\": {\n            \"filterable\": [\n                \"city__c\"\n            ], \n            \"label\": \"Birth Place Custom Object\", \n            \"object\": \"birth_place_custom_object\", \n            \"properties\": {\n                \"ContactId__c\": {\n                    \"format\": \"uuid\", \n                    \"label\": \"Contact\", \n                    \"type\": \"string\"\n                }, \n                \"city__c\": {\n                    \"label\": \"city label\", \n                    \"type\": \"string\"\n                }, \n                \"country__c\": {\n                    \"label\": \"country label\", \n                    \"type\": \"string\"\n                }, \n                \"state__c\": {\n                    \"label\": \"state label\", \n                    \"type\": \"string\"\n                }\n            }, \n            \"relationships\": [\n                {\n                    \"cardinality\": \"manyToOne\", \n                    \"fields\": {\n                        \"ContactId__c\": \"Id\"\n                    }, \n                    \"namespace\": \"com_zuora\", \n                    \"object\": \"contact\", \n                    \"recordConstraints\": {\n                        \"create\": {\n                            \"enforceValidMapping\": false\n                        }\n                    }\n                }\n            ], \n            \"required\": [\n                \"city__c\", \n                \"state__c\", \n                \"country__c\"\n            ], \n            \"type\": \"object\"\n        }\n    }\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/objects/definitions/default/{object}":
    delete:
      description: |
        Deletes the custom object definition for the provided type.

        **Note:** A custom object definition can only be deleted if no record of this custom object type exists.
      operationId: Delete_CustomObjectDefinitionByType
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - description: API version that determines the response schema. The default version is used if this parameter is not included. Specify `Zuora-Version` in the request header if you expect a specific response schema.
          in: header
          name: Zuora-Version
          required: false
          schema:
            format: date
            type: string
        - description: Specifies the custom object's API name as object. It is case-sensitive.
          in: path
          name: object
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                description: The URI of the deleted custom object definition
                example: /objects/definitions/default/test_custom_object
                format: uri
                type: string
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Delete a custom object definition
      tags:
        - Custom Object Definitions
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/objects/definitions/default/{object}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/objects/definitions/default/{object}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/objects/definitions/default/{object}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/objects/definitions/default/{object}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/objects/definitions/default/{object}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/objects/definitions/default/{object}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      description: |
        Retrieves the custom object definition by type for the given tenant.
      operationId: GET_CustomObjectDefinitionByType
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - description: API version that determines the response schema. The default version is used if this parameter is not included. Specify `Zuora-Version` in the request header if you expect a specific response schema.
          in: header
          name: Zuora-Version
          required: false
          schema:
            format: date
            type: string
        - description: Specifies the custom object's API name as object. It is case-sensitive.
          in: path
          name: object
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CustomObjectDefinition"
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonErrorResponse"
          description: Resource Request-URI not found.
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a custom object definition
      tags:
        - Custom Object Definitions
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/objects/definitions/default/{object}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/objects/definitions/default/{object}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/objects/definitions/default/{object}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/objects/definitions/default/{object}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/objects/definitions/default/{object}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/objects/definitions/default/{object}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  /objects/jobs:
    get:
      description: |
        Lists all custom object bulk jobs submitted by your tenant.
      operationId: GET_AllCustomObjectBulkJobs
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - description: API version that determines the response schema. The default version is used if this parameter is not included. Specify `Zuora-Version` in the request header if you expect a specific response schema.
          in: header
          name: Zuora-Version
          required: false
          schema:
            format: date
            type: string
        - description: Page size of the result. The maximum page size is 100. The defaut page size is 25.
          in: query
          name: pageSize
          required: false
          schema:
            type: integer
        - description: The `cursor` points to the last job of the previous result set. The cursor job is not included in this query result. The call returns the first page if `cursor` is not provided and `pageSize` is valid.
          in: query
          name: cursor
          required: false
          schema:
            type: string
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CustomObjectBulkJobResponseCollection"
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List all custom object bulk jobs
      tags:
        - Custom Object Jobs
      x-code-samples:
        - lang: Curl
          source: |
            curl -X GET -H "Authorization: Bearer e5cb941a9b1f47838b4085b4d5e00415" -H "Content-Type: application/json" "https://rest.zuora.com/objects/jobs?pageSize=2&cursor=a9e9a58d-0a11-4685-b1ab-99521dbc20a1"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/objects/jobs');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/objects/jobs")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/objects/jobs", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/objects/jobs")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/objects/jobs");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    post:
      description: |
        Submits a bulk job request for a bulk operation on the specified custom object records. A succcessful call returns a newly created bulk job. The job ID can be used to poll the job status or upload the CSV file if it is a `create` job.

        ## Limits
        This custom object bulk jobs have the following limits:
        * The concurrent bulk job limit per tenant is 5. Bulk jobs in `open`, `pending`, or `in_progress` status are counted towards the concurrent bulk job limit.
        * The bulk job execuation order is not guaranteed, which means the bulk job that you submit ealier may be executed later.  
        * Only the users that have the "Delete Custom Objects" permission can create a `delete` bulk job. Only the users that have the "Edit Custom Objects" permission can create a `create` bulk job. See [Platform Permissions](https://knowledgecenter.zuora.com/Billing/Tenant_Management/A_Administrator_Settings/User_Roles/h_Platform_Roles#Platform_Permissions) for more information.
      operationId: POST_CustomObjectBulkJob
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - description: API version that determines the response schema. The default version is used if this parameter is not included. Specify `Zuora-Version` in the request header if you expect a specific response schema.
          in: header
          name: Zuora-Version
          required: false
          schema:
            format: date
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/CustomObjectBulkJobRequest"
        description: Custom Objects bulk job request
        required: true
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CustomObjectBulkJobResponse"
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "400":
          content:
            application/json:
              examples:
                response:
                  value:
                    code: 71013020
                    message: Bad Request
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonErrorResponse"
          description: Invalid input
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "403":
          content:
            application/json:
              examples:
                response:
                  value:
                    code: 71012514
                    message: User does not have permission to delete custom objects.
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonErrorResponse"
          description: Unauthorized
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Submit a custom object bulk job
      tags:
        - Custom Object Jobs
      x-code-samples:
        - lang: Curl
          source: "curl -X POST -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" -d '{}' \"https://rest.zuora.com/objects/jobs\""
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/objects/jobs');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/objects/jobs")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/objects/jobs", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/objects/jobs")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/objects/jobs");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/objects/jobs/{id}":
    get:
      description: |
        Retrieves the custom object bulk job details by job ID.

        Only the users that have the "View Custom Objects" permission can retrieve custom object bulk jobs. See [Platform Permissions](https://knowledgecenter.zuora.com/Billing/Tenant_Management/A_Administrator_Settings/User_Roles/h_Platform_Roles#Platform_Permissions) for more information.
      operationId: GET_CustomObjectBulkJob
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - description: API version that determines the response schema. The default version is used if this parameter is not included. Specify `Zuora-Version` in the request header if you expect a specific response schema.
          in: header
          name: Zuora-Version
          required: false
          schema:
            format: date
            type: string
        - description: The ID of the custom object bulk job to be retrieved.
          in: path
          name: id
          required: true
          schema:
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CustomObjectBulkJobResponse"
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    code: 71013040
                    message: Not Found.
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonErrorResponse"
          description: Bulk job not found
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a custom object bulk job
      tags:
        - Custom Object Jobs
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/objects/jobs/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/objects/jobs/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/objects/jobs/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/objects/jobs/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/objects/jobs/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/objects/jobs/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/objects/jobs/{id}/errors":
    get:
      description: |
        Lists all errors for a custom object bulk job.
      operationId: GET_CustomObjectBulkJobErrors
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - description: API version that determines the response schema. The default version is used if this parameter is not included. Specify `Zuora-Version` in the request header if you expect a specific response schema.
          in: header
          name: Zuora-Version
          required: false
          schema:
            format: date
            type: string
        - description: The ID of the custom object bulk job that you retrieve errors for.
          in: path
          name: id
          required: true
          schema:
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CustomObjectBulkJobErrorResponseCollection"
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    code: 71013040
                    message: Not Found.
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonErrorResponse"
          description: Job not found
      summary: List all errors for a custom object bulk job
      tags:
        - Custom Object Jobs
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/objects/jobs/{id}/errors"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/objects/jobs/{id}/errors');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/objects/jobs/{id}/errors")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/objects/jobs/{id}/errors", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/objects/jobs/{id}/errors")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/objects/jobs/{id}/errors");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/objects/jobs/{id}/files":
    post:
      description: |
        Uploads a file to a create custom object bulk job. Only one file is allowed per job. The job must be in `pending` status when you upload the file to it. The job will start creating records once the upload is finished.

        Only the users that have the "Edit Custom Objects" permission can upload files to custom object bulk jobs. See [Platform Permissions](https://knowledgecenter.zuora.com/Billing/Tenant_Management/A_Administrator_Settings/User_Roles/h_Platform_Roles#Platform_Permissions) for more information.
      operationId: POST_UploadFileForCustomObjectBulkJob
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - description: API version that determines the response schema. The default version is used if this parameter is not included. Specify `Zuora-Version` in the request header if you expect a specific response schema.
          in: header
          name: Zuora-Version
          required: false
          schema:
            format: date
            type: string
        - description: The `Content-Type` of the request must be `text/csv`.
          in: header
          name: Content-Type
          required: true
          schema:
            type: string
        - description: The ID of the custom object bulk job that the file is uploaded to.
          in: path
          name: id
          required: true
          schema:
            format: uuid
            type: string
      requestBody:
        content:
          text/csv:
            schema:
              description: The CSV file to be uploaded. The file size limit is 15 MB.
              type: string
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    CreatedById: 2c92c0f96a07409d016a0a58ab1172ec
                    CreatedDate: 2021-03-10T00:05:54.207Z
                    Id: 5112347a-f7a1-4373-99df-c082984de7be
                    UpdatedById: 2c92c0f96a07409d016a0a58ab1172ec
                    UpdatedDate: 2021-03-10T00:08:15.539Z
                    namespace: default
                    object: vehicle
                    operation: create
                    processingTime: 0
                    recordsProcessed: 0
                    status: in_progress
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CustomObjectBulkJobResponse"
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "400":
          content:
            application/json:
              examples:
                response:
                  value:
                    code: 71013620
                    message: Bad Request
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonErrorResponse"
          description: Bad request
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "403":
          content:
            application/json:
              examples:
                response:
                  value:
                    code: 71012515
                    message: User does not have permission to create custom objects.
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonErrorResponse"
          description: Unauthorized
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    code: 71013040
                    message: Not Found.
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonErrorResponse"
          description: Job not found
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Upload a file for a custom object bulk job
      tags:
        - Custom Object Jobs
      x-code-samples:
        - lang: Curl
          source: |
            curl -X POST -H "Authorization: Bearer e5cb941a9b1f47838b4085b4d5e00415" -H "Content-Type: text/csv" --data-binary "@CustomObjectRecords.csv" "https://rest.zuora.com/objects/jobs/5112347a-f7a1-4373-99df-c082984de7be/files"
  /objects/migrations:
    post:
      description: |
        Updates a custom object definition by posting migration resource to initiate the migration of definitions.

        ## Limitations 

        Updating custom field definition has the following limitations:

        * You can only have one action per update request.
        * You cannot delete fields from custom objects that contain records.
        * You can only add required fields to custom objects with no records.
        * You can change optional fields to required only on the custom objects with no records. 
      operationId: POST_UpdateCustomObjectDefinition
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - description: API version that determines the response schema. The default version is used if this parameter is not included. Specify `Zuora-Version` in the request header if you expect a specific response schema.
          in: header
          name: Zuora-Version
          required: false
          schema:
            format: date
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/MigrationUpdateCustomObjectDefinitionsRequest"
        description: Migration resource for object and namespace changes.
        required: true
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/MigrationUpdateCustomObjectDefinitionsResponse"
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Update a custom object definition
      tags:
        - Custom Object Definitions
      x-code-samples:
        - lang: Curl
          source: "curl -X POST -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" -d '{}' \"https://rest.zuora.com/objects/migrations\""
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/objects/migrations');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/objects/migrations")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/objects/migrations", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/objects/migrations")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/objects/migrations");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/objects/records/default/{object}":
    get:
      description: |
        Lists all object records of the given type. You can also use the `q` query parameter to filter the output records.

        ## Limitations 

        This call has the following limitations:
        * When a record is created, there will be a delay before it is available for search. For example, if you create 5 records and perform a query that these 5 records satisfy the query conditions, there will be a delay between when the 5 records are created, and when all the 5 records can be returned in the query result.
      operationId: GET_AllRecordsForCustomObjectType
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - description: API version that determines the response schema. The default version is used if this parameter is not included. Specify `Zuora-Version` in the request header if you expect a specific response schema.
          in: header
          name: Zuora-Version
          required: false
          schema:
            format: date
            type: string
        - description: Specifies the custom object's API name as object. It is case-sensitive.
          in: path
          name: object
          required: true
          schema:
            type: string
        - description: |
            The query string to filter the records of a custom object. See the [Query syntax of custom object records](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Data_Model/Custom_object_records/Query_syntax_of_custom_object_records) for more information.

            Note that the `q` parameter only applies to filterable fields.
          in: query
          name: q
          required: false
          schema:
            type: string
        - description: |
            UUIDs of the records to be queried. For example:

            `GET /objects/records/default/passenger?ids=258d65b2-7bc6-4142-88bc-5184931af493&ids=82ecc9f7-b192-4f88-a4a3-4b2af6c750a1`
          in: query
          name: ids
          required: false
          schema:
            type: string
        - description: Page size. The value must be between 1 and 1000.
          in: query
          name: pageSize
          required: false
          schema:
            type: integer
        - description: The `cursor` points to the last record of the previous result set. The cursor record is not included in the query result. The call returns the first page if `cursor` is not provided and `pageSize` is valid.
          in: query
          name: cursor
          required: false
          schema:
            type: string
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/QueryCustomObjectRecordsResponse"
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List records for a custom object
      tags:
        - Custom Object Records
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/objects/records/default/{object}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/objects/records/default/{object}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/objects/records/default/{object}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/objects/records/default/{object}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/objects/records/default/{object}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/objects/records/default/{object}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    post:
      description: |
        Creates custom object records with the given type. 

        Upon creating records of a custom object type, the 200 response contains a list of records that have been successfully processed and stored.


        ## Limitations 

        This call has the following limitations:
        * The maximum number of records that you can create by one call is 1,000.
        * The storage of empty strings in records is not supported.
        * Null values must be formatted as the following example: 
          ```
          {
            "records": [
              {
                "fieldName__c": null
              }
            ]
          }
          ```
      operationId: POST_CustomObjectRecords
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - description: API version that determines the response schema. The default version is used if this parameter is not included. Specify `Zuora-Version` in the request header if you expect a specific response schema.
          in: header
          name: Zuora-Version
          required: false
          schema:
            format: date
            type: string
        - description: Specifies the custom object's API name as object. It is case-sensitive.
          in: path
          name: object
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PostCustomObjectRecordsRequest"
        required: true
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PostCustomObjectRecordsResponse"
          description: |
            OK

            The 200 response indicates that the records have been partially or completely created.

            * If the `allowPartialSuccess` flag is set to `false`, the 200 response indicates that all object records have been successfully created.
            * If the `allowPartialSuccess` flag is set to `true`, the 200 response indicates that some records might not be succesffully created and the error information might be contained in the response body.
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "400":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CustomObjectRecordsErrorResponse"
          description: Failed schema validation
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ErrorResponse401Record"
          description: Unauthorized
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "500":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CustomObjectRecordsThrottledResponse"
          description: Internal error. Retry the returned records.
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Create custom object records
      tags:
        - Custom Object Records
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "allowPartialSuccess": true, 
                "records": [
                    {
                        "GrossAmount__c": 123, 
                        "ItemName__c": "test", 
                        "ItemNumber__c": "1", 
                        "ItemState__c": "PendingCreation", 
                        "ItemType__c": "Product", 
                        "OrderId__c": "c086028c-5df8-427d-a3c8-7a7fb5d32d3d"
                    }, 
                    {
                        "GrossAmount__c": "123", 
                        "ItemName__c": "test", 
                        "ItemNumber__c": "1", 
                        "ItemState__c": "PendingCreation", 
                        "ItemType__c": "Product", 
                        "OrderId__c": "c086028c-5df8-427d-a3c8-7a7fb5d32d3d"
                    }
                ]
            }' "https://rest.zuora.com/objects/records/default/{object}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/objects/records/default/{object}');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "allowPartialSuccess": true, 
                "records": [
                    {
                        "GrossAmount__c": 123, 
                        "ItemName__c": "test", 
                        "ItemNumber__c": "1", 
                        "ItemState__c": "PendingCreation", 
                        "ItemType__c": "Product", 
                        "OrderId__c": "c086028c-5df8-427d-a3c8-7a7fb5d32d3d"
                    }, 
                    {
                        "GrossAmount__c": "123", 
                        "ItemName__c": "test", 
                        "ItemNumber__c": "1", 
                        "ItemState__c": "PendingCreation", 
                        "ItemType__c": "Product", 
                        "OrderId__c": "c086028c-5df8-427d-a3c8-7a7fb5d32d3d"
                    }
                ]
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"allowPartialSuccess\": true, \n    \"records\": [\n        {\n            \"GrossAmount__c\": 123, \n            \"ItemName__c\": \"test\", \n            \"ItemNumber__c\": \"1\", \n            \"ItemState__c\": \"PendingCreation\", \n            \"ItemType__c\": \"Product\", \n            \"OrderId__c\": \"c086028c-5df8-427d-a3c8-7a7fb5d32d3d\"\n        }, \n        {\n            \"GrossAmount__c\": \"123\", \n            \"ItemName__c\": \"test\", \n            \"ItemNumber__c\": \"1\", \n            \"ItemState__c\": \"PendingCreation\", \n            \"ItemType__c\": \"Product\", \n            \"OrderId__c\": \"c086028c-5df8-427d-a3c8-7a7fb5d32d3d\"\n        }\n    ]\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/objects/records/default/{object}")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"allowPartialSuccess\": true, \n    \"records\": [\n        {\n            \"GrossAmount__c\": 123, \n            \"ItemName__c\": \"test\", \n            \"ItemNumber__c\": \"1\", \n            \"ItemState__c\": \"PendingCreation\", \n            \"ItemType__c\": \"Product\", \n            \"OrderId__c\": \"c086028c-5df8-427d-a3c8-7a7fb5d32d3d\"\n        }, \n        {\n            \"GrossAmount__c\": \"123\", \n            \"ItemName__c\": \"test\", \n            \"ItemNumber__c\": \"1\", \n            \"ItemState__c\": \"PendingCreation\", \n            \"ItemType__c\": \"Product\", \n            \"OrderId__c\": \"c086028c-5df8-427d-a3c8-7a7fb5d32d3d\"\n        }\n    ]\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/objects/records/default/{object}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/objects/records/default/{object}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"allowPartialSuccess\": true, \n    \"records\": [\n        {\n            \"GrossAmount__c\": 123, \n            \"ItemName__c\": \"test\", \n            \"ItemNumber__c\": \"1\", \n            \"ItemState__c\": \"PendingCreation\", \n            \"ItemType__c\": \"Product\", \n            \"OrderId__c\": \"c086028c-5df8-427d-a3c8-7a7fb5d32d3d\"\n        }, \n        {\n            \"GrossAmount__c\": \"123\", \n            \"ItemName__c\": \"test\", \n            \"ItemNumber__c\": \"1\", \n            \"ItemState__c\": \"PendingCreation\", \n            \"ItemType__c\": \"Product\", \n            \"OrderId__c\": \"c086028c-5df8-427d-a3c8-7a7fb5d32d3d\"\n        }\n    ]\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/objects/records/default/{object}");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"allowPartialSuccess\": true, \n    \"records\": [\n        {\n            \"GrossAmount__c\": 123, \n            \"ItemName__c\": \"test\", \n            \"ItemNumber__c\": \"1\", \n            \"ItemState__c\": \"PendingCreation\", \n            \"ItemType__c\": \"Product\", \n            \"OrderId__c\": \"c086028c-5df8-427d-a3c8-7a7fb5d32d3d\"\n        }, \n        {\n            \"GrossAmount__c\": \"123\", \n            \"ItemName__c\": \"test\", \n            \"ItemNumber__c\": \"1\", \n            \"ItemState__c\": \"PendingCreation\", \n            \"ItemType__c\": \"Product\", \n            \"OrderId__c\": \"c086028c-5df8-427d-a3c8-7a7fb5d32d3d\"\n        }\n    ]\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/objects/records/default/{object}/{id}":
    delete:
      description: |
        Deletes a custom object record of the given type and ID.

        Note that 200 response will be returned under either of the following conditions:
        * The record is identified and successfully deleted
        * The record could not be found

        Note that the record is deleted immediately and, therefore, will not be retained upon successful deletion.
      operationId: Delete_CustomObjectRecordByID
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - description: API version that determines the response schema. The default version is used if this parameter is not included. Specify `Zuora-Version` in the request header if you expect a specific response schema.
          in: header
          name: Zuora-Version
          required: false
          schema:
            format: date
            type: string
        - description: Specifies the custom object's API name as object. It is case-sensitive.
          in: path
          name: object
          required: true
          schema:
            type: string
        - description: Id identifier in uuid form
          in: path
          name: id
          required: true
          schema:
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                description: The URI of the deleted custom object record.
                example: /objects/records/default/test_custom_object/3a437f0b-fa7a-45bf-a9a5-2187a5a13ec0
                format: uri
                type: string
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Delete a custom object record
      tags:
        - Custom Object Records
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/objects/records/default/{object}/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/objects/records/default/{object}/{id}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/objects/records/default/{object}/{id}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/objects/records/default/{object}/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/objects/records/default/{object}/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/objects/records/default/{object}/{id}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      description: |
        Retrieves a record of a given type by ID.
      operationId: GET_CustomObjectRecordByID
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - description: API version that determines the response schema. The default version is used if this parameter is not included. Specify `Zuora-Version` in the request header if you expect a specific response schema.
          in: header
          name: Zuora-Version
          required: false
          schema:
            format: date
            type: string
        - description: Specifies the custom object's API name as object. It is case-sensitive.
          in: path
          name: object
          required: true
          schema:
            type: string
        - description: Id identifier in uuid form
          in: path
          name: id
          required: true
          schema:
            format: uuid
            type: string
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CustomObjectRecordWithAllFields"
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonErrorResponse"
          description: Not exist
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a custom object record
      tags:
        - Custom Object Records
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/objects/records/default/{object}/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/objects/records/default/{object}/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/objects/records/default/{object}/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/objects/records/default/{object}/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/objects/records/default/{object}/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/objects/records/default/{object}/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    patch:
      description: |
        Updates one or many fields of a custom object record. Patch update uses JSON Merge Patch as specified in [RFC 7386](https://tools.ietf.org/html/rfc7386).

        ## Limitations 

        * The storage of empty strings in records is not supported.
        * Null values must be formatted as the following example: 
          ```
          {
            "records": [
              {
                "fieldName__c": null
              }
            ]
          }
          ```
      operationId: Patch_PartialUpdateCustomObjectRecord
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - description: API version that determines the response schema. The default version is used if this parameter is not included. Specify `Zuora-Version` in the request header if you expect a specific response schema.
          in: header
          name: Zuora-Version
          required: false
          schema:
            format: date
            type: string
        - description: Specifies the custom object's API name as object. It is case-sensitive.
          in: path
          name: object
          required: true
          schema:
            type: string
        - description: Id identifier in uuid form
          in: path
          name: id
          required: true
          schema:
            format: uuid
            type: string
      requestBody:
        content:
          application/merge-patch+json:
            schema:
              $ref: "#/components/schemas/CustomObjectRecordWithOnlyCustomFields"
        required: true
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CustomObjectRecordWithAllFields"
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonErrorResponse"
          description: Object record does not exist
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Partially update a custom object record
      tags:
        - Custom Object Records
      x-code-samples: []
    put:
      description: |
        Updates a record of the given type and ID.

        ## Limitations 

        * The storage of empty strings in records is not supported.
        * Null values must be formatted as the following example: 
          ```
          {
            "records": [
              {
                "fieldName__c": null
              }
            ]
          }
          ```
      operationId: PUT_CustomObjectRecord
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - $ref: "#/components/parameters/GLOBAL_HEADER_If_Match"
        - description: API version that determines the response schema. The default version is used if this parameter is not included. Specify `Zuora-Version` in the request header if you expect a specific response schema.
          in: header
          name: Zuora-Version
          required: false
          schema:
            format: date
            type: string
        - description: Specifies the custom object's API name as object. It is case-sensitive.
          in: path
          name: object
          required: true
          schema:
            type: string
        - description: Id identifier in uuid form
          in: path
          name: id
          required: true
          schema:
            format: uuid
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/CustomObjectRecordWithOnlyCustomFields"
        required: true
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CustomObjectRecordWithAllFields"
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonErrorResponse"
          description: Object record does not exist
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Update a custom object record
      tags:
        - Custom Object Records
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "age__c": 32, 
                "email__c": "smith123@example.com", 
                "home_address__c": "59b38ad1-27d4-40e8-af66-8c138bc382ee", 
                "last_name__c": "Smith", 
                "marital_status__c": "Married", 
                "work_address__c": "8a19f16a-2b5e-4a26-bb20-c79cd6984714"
            }' "https://rest.zuora.com/objects/records/default/{object}/{id}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/objects/records/default/{object}/{id}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "age__c": 32, 
                "email__c": "smith123@example.com", 
                "home_address__c": "59b38ad1-27d4-40e8-af66-8c138bc382ee", 
                "last_name__c": "Smith", 
                "marital_status__c": "Married", 
                "work_address__c": "8a19f16a-2b5e-4a26-bb20-c79cd6984714"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"age__c\": 32, \n    \"email__c\": \"smith123@example.com\", \n    \"home_address__c\": \"59b38ad1-27d4-40e8-af66-8c138bc382ee\", \n    \"last_name__c\": \"Smith\", \n    \"marital_status__c\": \"Married\", \n    \"work_address__c\": \"8a19f16a-2b5e-4a26-bb20-c79cd6984714\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/objects/records/default/{object}/{id}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"age__c\": 32, \n    \"email__c\": \"smith123@example.com\", \n    \"home_address__c\": \"59b38ad1-27d4-40e8-af66-8c138bc382ee\", \n    \"last_name__c\": \"Smith\", \n    \"marital_status__c\": \"Married\", \n    \"work_address__c\": \"8a19f16a-2b5e-4a26-bb20-c79cd6984714\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/objects/records/default/{object}/{id}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/objects/records/default/{object}/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"age__c\": 32, \n    \"email__c\": \"smith123@example.com\", \n    \"home_address__c\": \"59b38ad1-27d4-40e8-af66-8c138bc382ee\", \n    \"last_name__c\": \"Smith\", \n    \"marital_status__c\": \"Married\", \n    \"work_address__c\": \"8a19f16a-2b5e-4a26-bb20-c79cd6984714\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/objects/records/default/{object}/{id}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"age__c\": 32, \n    \"email__c\": \"smith123@example.com\", \n    \"home_address__c\": \"59b38ad1-27d4-40e8-af66-8c138bc382ee\", \n    \"last_name__c\": \"Smith\", \n    \"marital_status__c\": \"Married\", \n    \"work_address__c\": \"8a19f16a-2b5e-4a26-bb20-c79cd6984714\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /query/jobs:
    get:
      description: |
        Returns a list of [data query](https://knowledgecenter.zuora.com/DC_Developers/BA_Data_Query) jobs that have been created in your Zuora tenant. You can filter the list by status.

        If you are an administrator, you can retrieve all the query jobs in your tenant. Otherwise, you can only retrieve your own query jobs.
      operationId: GET_DataQueryJobs
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: |
            Filters the list of query jobs by status.
          in: query
          name: queryStatus
          required: false
          schema:
            enum:
              - accepted
              - in_progress
              - completed
              - failed
              - cancelled
            type: string
        - description: |
            Specifies the maximum number of query jobs to return.
          in: query
          name: pageSize
          required: false
          schema:
            default: 20
            maximum: 100
            type: integer
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    data:
                      - id: bf3b5640-ddd1-4b4f-9a81-906ec2b84a89
                        query: SELECT s.id FROM Subscription s JOIN RatePlan rp ON s.id = rp.subscriptionid WHERE rp.name = 'Premium Monthly'
                        queryStatus: in_progress
                        remainingRetries: 3
                        updatedOn: 2018-08-17T13:14:38.855Z
                      - dataFile: https://example.s3.us-west-2.amazonaws.com/3a3e85c4-96e7-486b-ae02-827120104301_24921638725108715.json?X-Amz-Security-Token=...
                        id: 3a3e85c4-96e7-486b-ae02-827120104301
                        outputRows: 24516
                        processingTime: 9212
                        query: SELECT accountnumber, balance FROM Account WHERE Account.balance > 100
                        queryStatus: completed
                        remainingRetries: 3
                        updatedOn: 2018-08-17T13:14:19.17Z
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GetDataQueryJobsResponse"
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List data query jobs
      tags:
        - Data Queries
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/query/jobs"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/query/jobs');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/query/jobs")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/query/jobs", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/query/jobs")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/query/jobs");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    post:
      description: |
        Submits a [data query](https://knowledgecenter.zuora.com/DC_Developers/BA_Data_Query) to be performed by Zuora and creates a query job. You can use [Retrieve a data query job](#operation/GET_DataQueryJob) to track the status of the query job and obtain the URL of the query results.
      operationId: POST_DataQueryJob
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/SubmitDataQueryRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    data:
                      id: 3a3e85c4-96e7-486b-ae02-827120104301
                      query: SELECT accountnumber, balance FROM Account WHERE Account.balance > 100
                      queryStatus: accepted
                      remainingRetries: 3
                      updatedOn: 2018-08-17T13:14:18.204Z
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/SubmitDataQueryResponse"
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "400":
          content:
            application/json:
              examples:
                response:
                  value:
                    code: 400
                    message: Unable to process JSON
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/DataQueryErrorResponse"
          description: Bad Request
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Submit a data query
      tags:
        - Data Queries
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "compression": "NONE", 
                "output": {
                    "target": "S3"
                }, 
                "outputFormat": "JSON", 
                "query": "SELECT accountnumber, balance FROM Account WHERE Account.balance > 100"
            }' "https://rest.zuora.com/query/jobs"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/query/jobs');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "compression": "NONE", 
                "output": {
                    "target": "S3"
                }, 
                "outputFormat": "JSON", 
                "query": "SELECT accountnumber, balance FROM Account WHERE Account.balance > 100"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"compression\": \"NONE\", \n    \"output\": {\n        \"target\": \"S3\"\n    }, \n    \"outputFormat\": \"JSON\", \n    \"query\": \"SELECT accountnumber, balance FROM Account WHERE Account.balance > 100\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/query/jobs")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"compression\": \"NONE\", \n    \"output\": {\n        \"target\": \"S3\"\n    }, \n    \"outputFormat\": \"JSON\", \n    \"query\": \"SELECT accountnumber, balance FROM Account WHERE Account.balance > 100\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/query/jobs", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/query/jobs")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"compression\": \"NONE\", \n    \"output\": {\n        \"target\": \"S3\"\n    }, \n    \"outputFormat\": \"JSON\", \n    \"query\": \"SELECT accountnumber, balance FROM Account WHERE Account.balance > 100\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/query/jobs");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"compression\": \"NONE\", \n    \"output\": {\n        \"target\": \"S3\"\n    }, \n    \"outputFormat\": \"JSON\", \n    \"query\": \"SELECT accountnumber, balance FROM Account WHERE Account.balance > 100\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/query/jobs/{job-id}":
    delete:
      description: |
        Cancels a [data query](https://knowledgecenter.zuora.com/DC_Developers/BA_Data_Query) job, which prevents Zuora from performing the query. This operation is only applicable if the status of the query job is `accepted` or `in_progress`.
      operationId: DELETE_DataQueryJob
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: |
            Internal identifier of the query job.
          in: path
          name: job-id
          required: true
          schema:
            format: uuid
            maxLength: 64
            minLength: 64
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    data:
                      id: 3a3e85c4-96e7-486b-ae02-827120104301
                      query: SELECT accountnumber, balance FROM Account WHERE Account.balance > 100
                      queryStatus: cancelled
                      remainingRetries: 3
                      updatedOn: 2018-08-17T13:22:16.965Z
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/DeleteDataQueryJobResponse"
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "400":
          content:
            application/json:
              examples:
                response:
                  value:
                    code: 1003
                    message: Query job c20a8ff4-3960-4c85-b067-d5259035f523 is not in accepted or in_progress status
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/DataQueryErrorResponse"
          description: Bad Request
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Cancel a data query job
      tags:
        - Data Queries
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/query/jobs/{job-id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/query/jobs/{job-id}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/query/jobs/{job-id}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/query/jobs/{job-id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/query/jobs/{job-id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/query/jobs/{job-id}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      description: |
        Retrieves a [data query](https://knowledgecenter.zuora.com/DC_Developers/BA_Data_Query) job. You can use this operation to track the status of the query job and obtain the URL of the query results.

        If you are an administrator, you can retrieve every query job in your tenant. 

        If you are a non-admin user and try to retrieve a query job that you are not the owner of, you will get a 403 response indicating that you are forbidden from viewing this job. As a non-admin user, you can only retrieve your own query job.
      operationId: GET_DataQueryJob
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: |
            Internal identifier of the query job.
          in: path
          name: job-id
          required: true
          schema:
            format: uuid
            maxLength: 36
            minLength: 36
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    data:
                      dataFile: https://example.s3.us-west-2.amazonaws.com/3a3e85c4-96e7-486b-ae02-827120104301_24921638725108715.json?X-Amz-Security-Token=...
                      id: 3a3e85c4-96e7-486b-ae02-827120104301
                      outputRows: 24516
                      processingTime: 9212
                      query: SELECT accountnumber, balance FROM Account WHERE Account.balance > 100
                      queryStatus: completed
                      remainingRetries: 3
                      updatedOn: 2018-08-17T13:14:19.17Z
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GetDataQueryJobResponse"
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "403":
          content:
            application/json:
              examples:
                response:
                  value:
                    code: 1009
                    message: Access denied for restricted job ea50af05-6163-47e1-bf9b-c8e10648d8a3
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/DataQueryErrorResponse"
          description: Forbidden
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    code: 1001
                    message: "No such query: 1e8e8586-5366-4cdf-a01d-fae3b2cf8427"
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/DataQueryErrorResponse"
          description: Not Found
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a data query job
      tags:
        - Data Queries
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/query/jobs/{job-id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/query/jobs/{job-id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/query/jobs/{job-id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/query/jobs/{job-id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/query/jobs/{job-id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/query/jobs/{job-id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  /settings/batch-requests:
    post:
      description: |
        Submit a batch of settings requests by this single API operation.

        By default, one batch settings request can contain a maximum of 100 single operation requests, including: 
        * All the single requests in the process batch settings request.
        * All the children requests of the single requests.

        This maximum value is configurable.
      operationId: POST_ProcessSettingsBatchRequest
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SettingsBatchRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    responses:
                      - children: []
                        id: "1"
                        method: GET
                        response:
                          body:
                            allowAutoPostBillRun: true
                            autoPostBillRunDefaultValue: true
                            availableToCreditValidationLevel: HeaderLevel
                            billToTermEndWhenAutoRenew: true
                            daysInMonth: UseActualDays
                            includeChildUsage: true
                            includeNegativeInvoice: true
                            invoicePastEndOfTerm: false
                            legalDocumentGeneratingRule: GroupByOriginalSRPC
                            notSendZeroItemsForTax: false
                            oneTimeCreditBack: false
                            preGenerateInvoicePdf: false
                            proratePeriodOfRecurringCharge: true
                            prorateRecurringMonthlyCharges: true
                            prorateRecurringWeeklyCharges: true
                            prorateUsageMonthlyCharges: true
                            prorateUsageWeeklyCharges: true
                            prorationUnit: ProrateByDay
                            rateUsageIndividually: true
                            recurringChargeStyle: Advanced
                            takeContactSnapshot: true
                            taxAddressOwner: SubscriptionOwner
                            taxInclusiveRoundingRule: RoundingNetAmount
                            taxRateChangeOption: OneTaxItem
                            timeOfDailyInvoice: 0
                            transactionOnSubscription: true
                            zuoraTaxRoundingDiffDispersion: false
                          status: 200 OK
                        url: /billing-rules
                      - children: []
                        id: "2"
                        method: GET
                        response:
                          body:
                            allowBlankAccountingCodes: true
                            allowCreationInClosedPeriod: true
                            allowRevenueScheduleNegativeAmounts: true
                            allowUsageInClosedPeriod: true
                            differentCurrencies: false
                          status: 200 OK
                        url: /accounting-rules
              schema:
                $ref: "#/components/schemas/SettingsBatchResponse"
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Submit settings requests
      tags:
        - Settings
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "requests": [
                    {
                        "id": "1", 
                        "method": "GET", 
                        "url": "/billing-rules"
                    }, 
                    {
                        "id": "2", 
                        "method": "GET", 
                        "url": "/accounting-rules"
                    }
                ]
            }' "https://rest.zuora.com/settings/batch-requests"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/settings/batch-requests');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "requests": [
                    {
                        "id": "1", 
                        "method": "GET", 
                        "url": "/billing-rules"
                    }, 
                    {
                        "id": "2", 
                        "method": "GET", 
                        "url": "/accounting-rules"
                    }
                ]
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"requests\": [\n        {\n            \"id\": \"1\", \n            \"method\": \"GET\", \n            \"url\": \"/billing-rules\"\n        }, \n        {\n            \"id\": \"2\", \n            \"method\": \"GET\", \n            \"url\": \"/accounting-rules\"\n        }\n    ]\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/settings/batch-requests")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"requests\": [\n        {\n            \"id\": \"1\", \n            \"method\": \"GET\", \n            \"url\": \"/billing-rules\"\n        }, \n        {\n            \"id\": \"2\", \n            \"method\": \"GET\", \n            \"url\": \"/accounting-rules\"\n        }\n    ]\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/settings/batch-requests", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/settings/batch-requests")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"requests\": [\n        {\n            \"id\": \"1\", \n            \"method\": \"GET\", \n            \"url\": \"/billing-rules\"\n        }, \n        {\n            \"id\": \"2\", \n            \"method\": \"GET\", \n            \"url\": \"/accounting-rules\"\n        }\n    ]\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/settings/batch-requests");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"requests\": [\n        {\n            \"id\": \"1\", \n            \"method\": \"GET\", \n            \"url\": \"/billing-rules\"\n        }, \n        {\n            \"id\": \"2\", \n            \"method\": \"GET\", \n            \"url\": \"/accounting-rules\"\n        }\n    ]\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /settings/listing:
    get:
      description: |
        Get a list of all available settings in your tenant. 

        The response message is by default in JSON format. If you want to receive all the availabe settings in csv format, include `Accept` in the header parameters and set it to `application/csv`.
                    
        See a [200 response sample in JSON format](https://assets.zuora.com/zuora-documentation/ListAllSettingsResponseSample.json).

        See a [200 response sample in CSV format](https://assets.zuora.com/zuora-documentation/ListAllSettingsResponseSample.csv).

        You can find a specific operate of an available setting item in your tenant from the 200 response body of this call. See the following tutorials of Settings API for how to operate on a specifc setting item.

         * Billing Rules:
           * [Get a specific setting - Billing Rules](https://knowledgecenter.zuora.com/DC_Developers/BB_C_Settings_API/Settings_API_tutorials/AA_Get_a_specific_setting_-_Billing_Rules)
           * [Update a specific setting - Billing Rules](https://knowledgecenter.zuora.com/DC_Developers/BB_C_Settings_API/Settings_API_tutorials/AB_Update_a_specific_setting_-_Billing_Rules)
         * Age Buckets:
           * [Get Age Buckets](https://knowledgecenter.zuora.com/DC_Developers/BB_C_Settings_API/Settings_API_tutorials/Get_Age_Buckets)
           * [Update Age Buckets](https://knowledgecenter.zuora.com/DC_Developers/BB_C_Settings_API/Settings_API_tutorials/Update_Age_Buckets)
         * Invoice Templates:
           * [Get a specific Invoice Template](https://knowledgecenter.zuora.com/DC_Developers/BB_C_Settings_API/Settings_API_tutorials/Get_a_specific_Invoice_Template)
           * [Get all Invoice Templates](https://knowledgecenter.zuora.com/DC_Developers/BB_C_Settings_API/Settings_API_tutorials/Get_all_Invoice_Templates)
           * [Create a new Invoice Template](https://knowledgecenter.zuora.com/DC_Developers/BB_C_Settings_API/Settings_API_tutorials/Create_a_new_Invoice_Template)
         * Communications Profiles:
           * [Get all Communication Profiles](https://knowledgecenter.zuora.com/DC_Developers/BB_C_Settings_API/Settings_API_tutorials/Get_all_Communication_Profiles)
           * [Create a new Communication Profile](https://knowledgecenter.zuora.com/DC_Developers/BB_C_Settings_API/Settings_API_tutorials/Create_a_new_Communication_Profile)
           * [Modify a Communication Profile](https://knowledgecenter.zuora.com/DC_Developers/BB_C_Settings_API/Settings_API_tutorials/Modify_a_Communication_Profile)
           * [Get all Notifications under a particular Communication Profile](https://knowledgecenter.zuora.com/DC_Developers/BB_C_Settings_API/Settings_API_tutorials/Get_all_Notifications_under_a_particular_Communication_Profile)
         * Chart of Accounts:
           * [Get Chart of Accounts](https://knowledgecenter.zuora.com/DC_Developers/BB_C_Settings_API/Settings_API_tutorials/Get_Chart_of_Accounts)
           * [Add a new Chart of Account](https://knowledgecenter.zuora.com/Central_Platform/API/BB_C_Settings_API/Settings_API_tutorials/Add_a_new_Chart_of_Account)
         * Quote Templates:
           * [Get all Quote Templates](https://knowledgecenter.zuora.com/Central_Platform/API/BB_C_Settings_API/Settings_API_tutorials/Get_all_Quote_Templates)
           * [Get a specific Quote Template](https://knowledgecenter.zuora.com/Central_Platform/API/BB_C_Settings_API/Settings_API_tutorials/Get_a_specific_Quote_Template)
           * [Create a new Quote Template](https://knowledgecenter.zuora.com/Central_Platform/API/BB_C_Settings_API/Settings_API_tutorials/Create_a_new_Quote_Template)
         * Custom Fields:
           * [View all custom fields](https://knowledgecenter.zuora.com/Central_Platform/API/BB_C_Settings_API/Settings_API_tutorials/View_all_custom_fields)
           * [View custom fields of a specific object](https://knowledgecenter.zuora.com/Central_Platform/API/BB_C_Settings_API/Settings_API_tutorials/View_custom_fields_of_a_specific_object)
           * [Update custom fields of a specific object](https://knowledgecenter.zuora.com/Central_Platform/API/BB_C_Settings_API/Settings_API_tutorials/Update_custom_fields_of_a_specific_object)
      operationId: GET_ListAllSettings
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: |
            Specifies response media type. If you omit the `Accept` header parameter, the response body is by default in JSON format. If you include `Accept` header parameter and set it to `application/csv`, the response body is in csv format.
          in: header
          name: Accept
          required: false
          schema:
            maxLength: 64
            type: string
      responses:
        "200":
          content:
            application/csv:
              schema:
                $ref: "#/components/schemas/ListAllSettingsResponse"
            application/json:
              examples:
                response:
                  value:
                    settings:
                      - context: Entity
                        description: Accounting Rules settings
                        httpOperations:
                          - method: GET
                            parameters: []
                            responseType: {}
                            url: /settings/accounting-rules
                          - method: PUT
                            parameters: []
                            requestType: {}
                            responseType: {}
                            url: /settings/accounting-rules
                        key: AccountingRules
                        pathPattern: /accounting-rules
              schema:
                $ref: "#/components/schemas/ListAllSettingsResponse"
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List all settings
      tags:
        - Settings
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/settings/listing"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/settings/listing');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/settings/listing")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/settings/listing", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/settings/listing")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/settings/listing");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  /v1/accounting-codes:
    get:
      description: This reference describes how to query all accounting codes in your chart of accounts through the REST API.
      operationId: GET_AllAccountingCodes
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize_finance_accounting"
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountingCodes:
                      - category: Assets
                        createdBy: e20b074746ec48f40147140f51e30a1a
                        createdOn: 2014-07-29 02:20:20
                        glAccountName: null
                        glAccountNumber: null
                        id: e20b0747478025a10147816ba1c20097
                        name: Accounts Receivable
                        notes: null
                        status: Active
                        type: AccountsReceivable
                        updatedBy: e20b074746ec48f40147140f51e30a1a
                        updatedOn: 2014-07-29 02:20:20
                      - category: Revenue
                        createdBy: e20b074746ec48f40147140f51e30a1a
                        createdOn: 2014-07-29 02:20:20
                        glAccountName: null
                        glAccountNumber: null
                        id: e20b0747478025a10147816ba21900a0
                        name: Discounts
                        notes: null
                        status: Inactive
                        type: SalesDiscounts
                        updatedBy: e20b074746ec48f40147140f51e30a1a
                        updatedOn: 2014-09-27 22:11:07
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETAccountingCodesType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List all accounting codes
      tags:
        - Accounting Codes
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/accounting-codes"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/accounting-codes');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/accounting-codes")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/accounting-codes", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/accounting-codes")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/accounting-codes");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    post:
      description: |
        This reference describes how to create a new accounting code through the REST API. 
        The accounting code will be active as soon as it has been created.

        ## Prerequisites
          If you have Zuora Finance enabled on your tenant, you must have the  Configure Accounting Codes permission. 
      operationId: POST_AccountingCode
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTAccountingCodeType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    id: 8a8081ae547aac1e01547efb61f20140
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTAccountingCodeResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Create an accounting code
      tags:
        - Accounting Codes
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "name": "CASH", 
                "type": "Cash"
            }' "https://rest.zuora.com/v1/accounting-codes"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/accounting-codes');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "name": "CASH", 
                "type": "Cash"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"name\": \"CASH\", \n    \"type\": \"Cash\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/accounting-codes")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"name\": \"CASH\", \n    \"type\": \"Cash\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/accounting-codes", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/accounting-codes")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"name\": \"CASH\", \n    \"type\": \"Cash\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/accounting-codes");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"name\": \"CASH\", \n    \"type\": \"Cash\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/accounting-codes/{ac-id}":
    delete:
      description: |
        This reference describes how to delete an accounting code through the REST API.
        ## Prerequisites
        If you have Zuora Finance enabled on your tenant, then you must have the Delete Unused Accounting Code permission.
        ## Limitations
        You can only delete accounting codes that have never been associated with any transactions. An accounting code must be deactivated before you can delete it.
      operationId: DELETE_AccountingCode
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: ID of the accounting code you want to delete.
          in: path
          name: ac-id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Delete an accounting code
      tags:
        - Accounting Codes
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/accounting-codes/{ac-id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/accounting-codes/{ac-id}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/accounting-codes/{ac-id}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/v1/accounting-codes/{ac-id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/accounting-codes/{ac-id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/accounting-codes/{ac-id}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      description: This reference describes how to query an accounting code through the REST API.
      operationId: GET_AccountingCode
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: ID of the accounting code you want to query.
          in: path
          name: ac-id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    category: Assets
                    createdBy: e20b074746ec48f40147140f51e30a1a
                    createdOn: 2016-05-04 01:23:07
                    glAccountName: null
                    glAccountNumber: null
                    id: 8a8081ae547aac1e01547efb61f20140
                    name: CASH
                    notes: null
                    status: Active
                    success: true
                    type: Cash
                    updatedBy: e20b074746ec48f40147140f51e30a1a
                    updatedOn: 2016-05-05 20:07:38
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETAccountingCodeItemType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve an accounting code
      tags:
        - Accounting Codes
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/accounting-codes/{ac-id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/accounting-codes/{ac-id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/accounting-codes/{ac-id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/accounting-codes/{ac-id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/accounting-codes/{ac-id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/accounting-codes/{ac-id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: |
        This reference describes how to update an existing accounting code through the REST API.
        ## Prerequisites
          If you have Zuora Finance enabled on your tenant, you must have the  Manage Accounting Code permission. 
        ## Limitations
        You can only update accounting codes that are not already associated with any transactions.
      operationId: PUT_AccountingCode
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: ID of the accounting code you want to update.
          in: path
          name: ac-id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTAccountingCodeType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Update an accounting code
      tags:
        - Accounting Codes
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "name": "CASH", 
                "type": "Cash"
            }' "https://rest.zuora.com/v1/accounting-codes/{ac-id}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/accounting-codes/{ac-id}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "name": "CASH", 
                "type": "Cash"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"name\": \"CASH\", \n    \"type\": \"Cash\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/accounting-codes/{ac-id}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"name\": \"CASH\", \n    \"type\": \"Cash\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/accounting-codes/{ac-id}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/accounting-codes/{ac-id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"name\": \"CASH\", \n    \"type\": \"Cash\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/accounting-codes/{ac-id}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"name\": \"CASH\", \n    \"type\": \"Cash\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/accounting-codes/{ac-id}/activate":
    put:
      description: |
        This reference describes how to activate an accounting code through the REST API.

        Prerequisites
        -------------
        If you have Zuora Finance enabled on your tenant, you must have the Manage Accounting Code permission. 
      operationId: PUT_ActivateAccountingCode
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: ID of the accounting code you want to activate.
          in: path
          name: ac-id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Activate an accounting code
      tags:
        - Accounting Codes
      x-code-samples:
        - lang: Curl
          source: "curl -X PUT -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" -d '{}' \"https://rest.zuora.com/v1/accounting-codes/{ac-id}/activate\""
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/accounting-codes/{ac-id}/activate');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/accounting-codes/{ac-id}/activate")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/accounting-codes/{ac-id}/activate", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/accounting-codes/{ac-id}/activate")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/accounting-codes/{ac-id}/activate");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/accounting-codes/{ac-id}/deactivate":
    put:
      description: |
        This reference describes how to deactivate an accounting code through the REST API.

        ## Prerequisites
        If you have Zuora Finance enabled on your tenant, you must have the Manage Accounting Code permission.
        ## Limitations
        You can only deactivate accounting codes that are not associated with any transactions. 
        You cannot disable accounting codes of type AccountsReceivable.
      operationId: PUT_DeactivateAccountingCode
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: ID of the accounting code you want to deactivate.
          in: path
          name: ac-id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Deactivate an accounting code
      tags:
        - Accounting Codes
      x-code-samples:
        - lang: Curl
          source: "curl -X PUT -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" -d '{}' \"https://rest.zuora.com/v1/accounting-codes/{ac-id}/deactivate\""
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/accounting-codes/{ac-id}/deactivate');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/accounting-codes/{ac-id}/deactivate")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/accounting-codes/{ac-id}/deactivate", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/accounting-codes/{ac-id}/deactivate")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/accounting-codes/{ac-id}/deactivate");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/accounting-periods:
    get:
      description: Retrieves all accounting periods on your tenant.
      operationId: GET_AllAccountingPeriods
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize_finance_accounting"
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountingPeriods:
                      - createdBy: e20b074746ec48f40147140f51e30a1a
                        createdOn: 2016-03-16 23:17:25
                        endDate: 2016-03-31
                        fileIds:
                          accountsReceivableAccountAgingDetailExportFileId: 8a8081ae5374904f01538340274a13f4
                          accountsReceivableInvoiceAgingDetailExportFileId: 8a8081ae5374904f01538340273013f3
                          arRollForwardDetailExportFileId: null
                          fxRealizedGainAndLossDetailExportFileId: null
                          fxUnrealizedGainAndLossDetailExportFileId: null
                          revenueDetailCsvFileId: 8a8081ae5374904f0153834033221418
                          revenueDetailExcelFileId: 8a8081ae5374904f0153834032e41417
                          unprocessedChargesFileId: null
                        fiscalYear: 2016
                        id: 8a8081ae5374904f01538338b66e1005
                        name: Mar 2016
                        notes: ""
                        runTrialBalanceEnd: null
                        runTrialBalanceErrorMessage: "Error creating the trial balance: exchange rate from USD to GBP on 08/03/2015 is not available.  Please import the rate and run trial balance again."
                        runTrialBalanceStart: 2016-03-16 23:25:22
                        runTrialBalanceStatus: Error
                        startDate: 2016-03-01
                        status: Open
                        updatedBy: e20b074746ec48f40147140f51e30a1a
                        updatedOn: 2016-03-16 23:25:22
                      - createdBy: e20b074746ec48f40147140f51e30a1a
                        createdOn: 2016-03-16 23:17:50
                        endDate: 2016-04-30
                        fileIds:
                          accountsReceivableAccountAgingDetailExportFileId: 8a8081ae5374904f0153833e9a7a1364
                          accountsReceivableInvoiceAgingDetailExportFileId: 8a8081ae5374904f0153833e9a651363
                          arRollForwardDetailExportFileId: null
                          fxRealizedGainAndLossDetailExportFileId: null
                          fxUnrealizedGainAndLossDetailExportFileId: null
                          revenueDetailCsvFileId: 8a8081ae5374904f0153833ea2d613af
                          revenueDetailExcelFileId: 8a8081ae5374904f0153833ea2c813ae
                          unprocessedChargesFileId: null
                        fiscalYear: 2016
                        id: 8a8081ae5374904f0153833918af1007
                        name: Apr 2016
                        notes: ""
                        runTrialBalanceEnd: null
                        runTrialBalanceErrorMessage: null
                        runTrialBalanceStart: 2016-03-16 23:23:40
                        runTrialBalanceStatus: Error
                        startDate: 2016-04-01
                        status: Open
                        updatedBy: e20b074746ec48f40147140f51e30a1a
                        updatedOn: 2016-03-16 23:23:40
                      - createdBy: e20b074746ec48f40147140f51e30a1a
                        createdOn: 2016-03-16 23:23:29
                        endDate: 2016-05-31
                        fileIds:
                          accountsReceivableAccountAgingDetailExportFileId: null
                          accountsReceivableInvoiceAgingDetailExportFileId: null
                          arRollForwardDetailExportFileId: null
                          fxRealizedGainAndLossDetailExportFileId: null
                          fxUnrealizedGainAndLossDetailExportFileId: null
                          revenueDetailCsvFileId: 8a8081ae54c2eabb0154c307e2920034
                          revenueDetailExcelFileId: 8a8081ae54c2eabb0154c307e27e0033
                          unprocessedChargesFileId: null
                        fiscalYear: 2016
                        id: 8a8081ae5374904f0153833e4590132d
                        name: May 2016
                        notes: ""
                        runTrialBalanceEnd: null
                        runTrialBalanceErrorMessage: null
                        runTrialBalanceStart: 2016-05-18 01:42:30
                        runTrialBalanceStatus: Error
                        startDate: 2016-05-01
                        status: Open
                        updatedBy: e20b074746ec48f40147140f51e30a1a
                        updatedOn: 2016-05-18 01:42:30
                      - createdBy: 402881e522cf4f9b0122cf5d82860002
                        createdOn: 2014-07-28 23:52:46
                        endDate: null
                        fileIds:
                          accountsReceivableAccountAgingDetailExportFileId: null
                          accountsReceivableInvoiceAgingDetailExportFileId: null
                          arRollForwardDetailExportFileId: null
                          fxRealizedGainAndLossDetailExportFileId: null
                          fxUnrealizedGainAndLossDetailExportFileId: null
                          revenueDetailCsvFileId: null
                          revenueDetailExcelFileId: null
                          unprocessedChargesFileId: null
                        fiscalYear: 0
                        id: e20b0747478025a1014780e489a60002
                        name: Open-Ended
                        notes: null
                        runTrialBalanceEnd: null
                        runTrialBalanceErrorMessage: null
                        runTrialBalanceStart: null
                        runTrialBalanceStatus: Pending
                        startDate: 2016-06-01
                        status: Open
                        updatedBy: e20b074746ec48f40147140f51e30a1a
                        updatedOn: 2016-03-16 23:23:29
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETAccountingPeriodsType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List all accounting periods
      tags:
        - Accounting Periods
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/accounting-periods"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/accounting-periods');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/accounting-periods")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/accounting-periods", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/accounting-periods")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/accounting-periods");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    post:
      description: |-
        Creates an accounting period.
        Prerequisites
        -------------
        * You must have Zuora Finance enabled on your tenant.
        * You must have the Create Accounting Period user permission.

        Limitations
        -----------
        * When creating the first accounting period on your tenant, the start date must be equal to or earlier than the date of the earliest transaction on the tenant.
        * Start and end dates of accounting periods must be contiguous. For example, if one accounting period ends on January 31, the next period must start on February 1.
        * If you have the Revenue Recognition Package and have enabled the "Monthly recognition over time" revenue recognition model, the accounting period start date and end date must be on the first day and last day of the month, respectively. Note that the start and end dates do not necessarily have to be in the same month.
      operationId: POST_AccountingPeriod
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTAccountingPeriodType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    id: 7b7181ae547aac1e01547efb61f20162
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTAccountingPeriodResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Create an accounting period
      tags:
        - Accounting Periods
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "endDate": "2016-06-30", 
                "fiscalYear": 2016, 
                "name": "Jun 2016", 
                "notes": "optional notes here", 
                "startDate": "2016-06-01"
            }' "https://rest.zuora.com/v1/accounting-periods"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/accounting-periods');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "endDate": "2016-06-30", 
                "fiscalYear": 2016, 
                "name": "Jun 2016", 
                "notes": "optional notes here", 
                "startDate": "2016-06-01"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"endDate\": \"2016-06-30\", \n    \"fiscalYear\": 2016, \n    \"name\": \"Jun 2016\", \n    \"notes\": \"optional notes here\", \n    \"startDate\": \"2016-06-01\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/accounting-periods")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"endDate\": \"2016-06-30\", \n    \"fiscalYear\": 2016, \n    \"name\": \"Jun 2016\", \n    \"notes\": \"optional notes here\", \n    \"startDate\": \"2016-06-01\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/accounting-periods", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/accounting-periods")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"endDate\": \"2016-06-30\", \n    \"fiscalYear\": 2016, \n    \"name\": \"Jun 2016\", \n    \"notes\": \"optional notes here\", \n    \"startDate\": \"2016-06-01\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/accounting-periods");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"endDate\": \"2016-06-30\", \n    \"fiscalYear\": 2016, \n    \"name\": \"Jun 2016\", \n    \"notes\": \"optional notes here\", \n    \"startDate\": \"2016-06-01\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/accounting-periods/{ap-id}":
    delete:
      description: |
        Deletes an accounting period.

        Prerequisites
        -------------

         * You must have Zuora Finance enabled on your tenant.

         * You must have the Delete Accounting Period user permission. See [Finance Roles](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/A_Administrator_Settings/User_Roles/f_Finance_Roles).


        Limitations
        -----------

        The accounting period to be deleted:

        * Must be the most recent accounting period

        * Must be an open accounting period

        * Must have no revenue distributed into it

        * Must not have any active journal entries

        * Must not be the open-ended accounting period

        * Must not be in the process of running a trial balance
      operationId: DELETE_AccountingPeriod
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: ID of the accounting period you want to delete.
          in: path
          name: ap-id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Delete an accounting period
      tags:
        - Accounting Periods
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/accounting-periods/{ap-id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/accounting-periods/{ap-id}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/accounting-periods/{ap-id}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/v1/accounting-periods/{ap-id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/accounting-periods/{ap-id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/accounting-periods/{ap-id}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      description: |
        Retrieves an accounting period.
        Prerequisites
        -------------

        You must have Zuora Finance enabled on your tenant.
      operationId: GET_AccountingPeriod
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: ID of the accounting period you want to get.
          in: path
          name: ap-id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    createdBy: e20b074746ec48f40147140f51e30a1a
                    createdOn: 2014-11-25 22:21:22
                    endDate: 2014-10-31
                    fileIds:
                      accountsReceivableAccountAgingDetailExportFileId: 8a8081ae5002967c015012f1230e0914
                      accountsReceivableInvoiceAgingDetailExportFileId: 8a8081ae5002967c015012f122f10913
                      arRollForwardDetailExportFileId: 8a8081ae5002967c015012f15d7b09e2
                      fxRealizedGainAndLossDetailExportFileId: 8a8081ae5002967c015012f151a609ba
                      fxUnrealizedGainAndLossDetailExportFileId: 8a8081ae5002967c015012f150b509b8
                      revenueDetailCsvFileId: 8a8081ae5002967c015012f129a10926
                      revenueDetailExcelFileId: 8a8081ae5002967c015012f129870925
                      unprocessedChargesFileId: null
                    fiscalYear: 2014
                    id: e20b074749d2a38b0149eac2e9550aa9
                    name: Oct 2014
                    notes: ""
                    runTrialBalanceEnd: 2015-09-28 00:53:36
                    runTrialBalanceErrorMessage: null
                    runTrialBalanceStart: 2015-09-28 00:53:13
                    runTrialBalanceStatus: Completed
                    startDate: 2014-10-01
                    status: Closed
                    success: true
                    updatedBy: e20b074746ec48f40147140f51e30a1a
                    updatedOn: 2015-09-28 00:53:13
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETAccountingPeriodType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve an accounting period
      tags:
        - Accounting Periods
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/accounting-periods/{ap-id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/accounting-periods/{ap-id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/accounting-periods/{ap-id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/accounting-periods/{ap-id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/accounting-periods/{ap-id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/accounting-periods/{ap-id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: |
        
        Updates an accounting period.

        Prerequisites
        -------------

        * You must have Zuora Finance enabled on your tenant.

        * You must have the Create Accounting Period user permission. See [Finance Roles](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/A_Administrator_Settings/User_Roles/f_Finance_Roles).

        Limitations
        -----------

        * You can update the start date of only the earliest accounting period on your tenant. You cannot update the start date of later periods.

        * If you update the earliest accounting period, the start date must be equal to or earlier than the date of the earliest transaction on the tenant.

        * Start and end dates of accounting periods must be contiguous. For example, if one accounting period ends on January 31, the next period must start on February 1.

        * If you have the Revenue Recognition Package and have enabled the "Monthly recognition over time" revenue recognition model, the accounting period start date and end date must be on the first day and last day of the month, respectively. Note that the start and end dates do not necessarily have to be in the same month.

        * You cannot update the start date or end date of an accounting period if:
          * Any revenue has been distributed into the period.
          * The period has any active journal entries.
      operationId: PUT_UpdateAccountingPeriod
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: ID of the accounting period you want to update.
          in: path
          name: ap-id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTAccountingPeriodType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Update an accounting period
      tags:
        - Accounting Periods
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "endDate": "2016-01-31", 
                "fiscalYear": 2016, 
                "name": "Jan 2016", 
                "startDate": "2016-01-01"
            }' "https://rest.zuora.com/v1/accounting-periods/{ap-id}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/accounting-periods/{ap-id}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "endDate": "2016-01-31", 
                "fiscalYear": 2016, 
                "name": "Jan 2016", 
                "startDate": "2016-01-01"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"endDate\": \"2016-01-31\", \n    \"fiscalYear\": 2016, \n    \"name\": \"Jan 2016\", \n    \"startDate\": \"2016-01-01\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/accounting-periods/{ap-id}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"endDate\": \"2016-01-31\", \n    \"fiscalYear\": 2016, \n    \"name\": \"Jan 2016\", \n    \"startDate\": \"2016-01-01\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/accounting-periods/{ap-id}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/accounting-periods/{ap-id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"endDate\": \"2016-01-31\", \n    \"fiscalYear\": 2016, \n    \"name\": \"Jan 2016\", \n    \"startDate\": \"2016-01-01\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/accounting-periods/{ap-id}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"endDate\": \"2016-01-31\", \n    \"fiscalYear\": 2016, \n    \"name\": \"Jan 2016\", \n    \"startDate\": \"2016-01-01\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/accounting-periods/{ap-id}/close":
    put:
      description: |-
        Close an accounting period by accounting period ID.

        Prerequisites
        -------------
        You must have Zuora Finance enabled on your tenant. You must have the Manage Close Process and Run Trial Balance user permissions.

        Limitations
        -----------
        * The accounting period cannot already be closed.
        * The accounting period cannot be in the process of running a trial balance.
        * All earlier accounting periods must be closed.
        * There must be no required action items for the accounting period. See Reconcile Transactions Before Closing an Accounting Period for more information.

        Notes
        -----
        When you close an accounting period in Zuora, a trial balance is automatically run for that period. A successful response means only that the accounting period is now closed, but does not mean that the trial balance has successfully completed.
      operationId: PUT_CloseAccountingPeriod
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: ID of the accounting period you want to close.
          in: path
          name: ap-id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Close an accounting period
      tags:
        - Accounting Periods
      x-code-samples:
        - lang: Curl
          source: "curl -X PUT -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" -d '{}' \"https://rest.zuora.com/v1/accounting-periods/{ap-id}/close\""
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/accounting-periods/{ap-id}/close');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/accounting-periods/{ap-id}/close")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/accounting-periods/{ap-id}/close", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/accounting-periods/{ap-id}/close")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/accounting-periods/{ap-id}/close");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/accounting-periods/{ap-id}/pending-close":
    put:
      description: |
        Sets an accounting period to pending close.


        Prerequisites
        -------------

        * You must have Zuora Finance enabled on your tenant.
        * You must have the Manage Close Process and Run Trial Balance user permissions.

                    
        Limitations 
         -----------
         
         * The accounting period cannot be closed or pending close.
         
         * The accounting period cannot be in the process of running a trial balance.
         
         * All earlier accounting periods must be closed.
         
         
        Notes
        -----
        When you set an accounting period to pending close in Zuora, a trial balance is automatically run for that period. A response of `{ "success": true }`  means only that the accounting period status is now pending close, but does not mean that the trial balance has successfully completed. You can use the Get Accounting Period REST API call to view details about the outcome of the trial balance.
      operationId: PUT_PendingCloseAccountingPeriod
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: ID of the accounting period you want to set to pending close.
          in: path
          name: ap-id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Set an accounting period to pending close
      tags:
        - Accounting Periods
      x-code-samples:
        - lang: Curl
          source: "curl -X PUT -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" -d '{}' \"https://rest.zuora.com/v1/accounting-periods/{ap-id}/pending-close\""
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/accounting-periods/{ap-id}/pending-close');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/accounting-periods/{ap-id}/pending-close")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/accounting-periods/{ap-id}/pending-close", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/accounting-periods/{ap-id}/pending-close")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/accounting-periods/{ap-id}/pending-close");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/accounting-periods/{ap-id}/reopen":
    put:
      description: |-
        Re-opens an accounting period.
        Prerequisites
        -------------
        * You must have Zuora Finance enabled on your tenant.
        * You must have the Manage Close Process and Run Trial Balance user permissions.

        Limitations
        -----------
        * The accounting period must be closed or pending close.
        * You can only re-open an accounting period that is immediately previous to an open period.
      operationId: PUT_ReopenAccountingPeriod
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: ID of the accounting period that you want to re-open.
          in: path
          name: ap-id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Reopen an accounting period
      tags:
        - Accounting Periods
      x-code-samples:
        - lang: Curl
          source: "curl -X PUT -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" -d '{}' \"https://rest.zuora.com/v1/accounting-periods/{ap-id}/reopen\""
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/accounting-periods/{ap-id}/reopen');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/accounting-periods/{ap-id}/reopen")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/accounting-periods/{ap-id}/reopen", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/accounting-periods/{ap-id}/reopen")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/accounting-periods/{ap-id}/reopen");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/accounting-periods/{ap-id}/run-trial-balance":
    put:
      description: |
        Runs the trial balance for an accounting period. 

        Prerequisites
        -------------

        * You must have Zuora Finance enabled on your tenant.

        * You must have the Manage Close Process and Run Trial Balance user permissions. See [Finance Roles](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/A_Administrator_Settings/User_Roles/f_Finance_Roles).

                  
        Limitations 
        -----------
         
         * The accounting period must be open.
         
         * The accounting period cannot already be in the process of running a trial balance.
         
        Notes
        -----
        The trial balance is run asynchronously. A response of `{ "success": true }` means only that the trial balance has started processing, but does not mean that the trial balance has successfully completed. You can use the [Get Accounting Period](https://www.zuora.com/developer/api-reference/#operation/GET_AccountingPeriod) REST API call to view details about the outcome of the trial balance.
      operationId: PUT_RunTrialBalance
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: ID of the accounting period for which you want to run a trial balance.
          in: path
          name: ap-id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Run trial balance
      tags:
        - Accounting Periods
      x-code-samples:
        - lang: Curl
          source: "curl -X PUT -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" -d '{}' \"https://rest.zuora.com/v1/accounting-periods/{ap-id}/run-trial-balance\""
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/accounting-periods/{ap-id}/run-trial-balance');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/accounting-periods/{ap-id}/run-trial-balance")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/accounting-periods/{ap-id}/run-trial-balance", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/accounting-periods/{ap-id}/run-trial-balance")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/accounting-periods/{ap-id}/run-trial-balance");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/accounts:
    post:
      description: |
        Creates a customer account with a payment method, a bill-to contact, and an optional sold-to contact. Request and response field descriptions and sample code are provided. Use this operation to optionally create a subscription, invoice for that subscription, and collect payment through the default payment method. The transaction is atomic; if any part fails for any reason, the entire transaction is rolled back.

        This operation is CORS Enabled, so you can use client-side Javascript to invoke the call. 

        ## Notes
        1. The account is created in active status.  
        2. If the `autoPay` field is set to `true` in the request, you must provide one of the `paymentMethod`, `creditCard`, or `hpmCreditCardPaymentMethodId` field, but not multiple. The one provided becomes the default payment method for this account. If the credit card information is declined or cannot be verified, no account is created.
        3. Customer accounts created with this call are automatically be set to Auto Pay.
        4. If either the `workEmail` or `personalEmail` field is specified, then the account's email delivery preference is automatically set to `true`. (In that case, emails go to the `workEmail` address, if it exists, or else the `personalEmail`.) If neither field is specified, the email delivery preference is automatically set to `false`.

        ## Defaults for customerAcceptanceDate and serviceActivationDate
        Default values for **customerAcceptanceDate** and **serviceActivationDate** are set as follows.

        |        | serviceActivationDate(SA) specified          | serviceActivationDate (SA) NOT specified  |
        | ------------- |:-------------:| -----:|
        | customerAcceptanceDate (CA) specified      | SA uses value in the request call; CA uses value in the request call| CA uses value in the request call;SA uses CE as default |
        | customerAcceptanceDate (CA) NOT specified      | SA uses value in the request call; CA uses SA as default |   SA and CA use CE as default |
      operationId: POST_Account
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The minor version of the Zuora REST API. 

            You only need to set this parameter if you use the following fields:
            * invoice
            * collect
            * runBilling
            * targetDate
          in: header
          name: zuora-version
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTAccountType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 402892c74c9193cd014c96bbe7c101f9
                    accountNumber: A00000004
                    billToContactId: 2c92c8fb68a28d180168a7ccedba1c4c
                    paymentMethodId: 402892c74c9193cd014c96bbe7d901fd
                    soldToContactId: 2c92c8fb68a28d180168a7ccedc61c4e
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTAccountResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Create an account
      tags:
        - Accounts
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "additionalEmailAddresses": [
                    "contact1@example.com", 
                    "contact2@example.com"
                ], 
                "autoPay": false, 
                "billCycleDay": 0, 
                "billToContact": {
                    "address1": "1051 E Hillsdale Blvd", 
                    "city": "Foster City", 
                    "country": "United States", 
                    "firstName": "John", 
                    "lastName": "Smith", 
                    "state": "CA", 
                    "workEmail": "smith@example.com", 
                    "zipCode": "94404"
                }, 
                "currency": "USD", 
                "hpmCreditCardPaymentMethodId": "2c92c0f93cf64d94013cfe2d20db61a7", 
                "invoiceDeliveryPrefsEmail": true, 
                "invoiceDeliveryPrefsPrint": false, 
                "name": "Zuora Test Account", 
                "notes": "This account is for demo purposes.", 
                "paymentTerm": "Due Upon Receipt", 
                "subscription": {
                    "autoRenew": true, 
                    "contractEffectiveDate": "2016-01-01", 
                    "initialTerm": 12, 
                    "notes": "This is a trial subscription for POST account demo.", 
                    "renewalTerm": 12, 
                    "subscribeToRatePlans": [
                        {
                            "chargeOverrides": [
                                {
                                    "price": 1000, 
                                    "productRatePlanChargeId": "2c92c0f94ac8307f014ae5d4a5156b28"
                                }, 
                                {
                                    "price": 1000, 
                                    "productRatePlanChargeId": "2c92c0f94ac8307f014ae5dbe2947851"
                                }
                            ], 
                            "productRatePlanId": "2c92c0f94ac8307f014ae5d3d1d469e2"
                        }, 
                        {
                            "chargeOverrides": [
                                {
                                    "price": 1000, 
                                    "productRatePlanChargeId": "2c92c0f83cf64298013d027725a67b7b"
                                }
                            ], 
                            "productRatePlanId": "2c92c0f93cf64d94013d027681560341"
                        }
                    ], 
                    "termType": "TERMED"
                }
            }' "https://rest.zuora.com/v1/accounts"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/accounts');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "additionalEmailAddresses": [
                    "contact1@example.com", 
                    "contact2@example.com"
                ], 
                "autoPay": false, 
                "billCycleDay": 0, 
                "billToContact": {
                    "address1": "1051 E Hillsdale Blvd", 
                    "city": "Foster City", 
                    "country": "United States", 
                    "firstName": "John", 
                    "lastName": "Smith", 
                    "state": "CA", 
                    "workEmail": "smith@example.com", 
                    "zipCode": "94404"
                }, 
                "currency": "USD", 
                "hpmCreditCardPaymentMethodId": "2c92c0f93cf64d94013cfe2d20db61a7", 
                "invoiceDeliveryPrefsEmail": true, 
                "invoiceDeliveryPrefsPrint": false, 
                "name": "Zuora Test Account", 
                "notes": "This account is for demo purposes.", 
                "paymentTerm": "Due Upon Receipt", 
                "subscription": {
                    "autoRenew": true, 
                    "contractEffectiveDate": "2016-01-01", 
                    "initialTerm": 12, 
                    "notes": "This is a trial subscription for POST account demo.", 
                    "renewalTerm": 12, 
                    "subscribeToRatePlans": [
                        {
                            "chargeOverrides": [
                                {
                                    "price": 1000, 
                                    "productRatePlanChargeId": "2c92c0f94ac8307f014ae5d4a5156b28"
                                }, 
                                {
                                    "price": 1000, 
                                    "productRatePlanChargeId": "2c92c0f94ac8307f014ae5dbe2947851"
                                }
                            ], 
                            "productRatePlanId": "2c92c0f94ac8307f014ae5d3d1d469e2"
                        }, 
                        {
                            "chargeOverrides": [
                                {
                                    "price": 1000, 
                                    "productRatePlanChargeId": "2c92c0f83cf64298013d027725a67b7b"
                                }
                            ], 
                            "productRatePlanId": "2c92c0f93cf64d94013d027681560341"
                        }
                    ], 
                    "termType": "TERMED"
                }
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"additionalEmailAddresses\": [\n        \"contact1@example.com\", \n        \"contact2@example.com\"\n    ], \n    \"autoPay\": false, \n    \"billCycleDay\": 0, \n    \"billToContact\": {\n        \"address1\": \"1051 E Hillsdale Blvd\", \n        \"city\": \"Foster City\", \n        \"country\": \"United States\", \n        \"firstName\": \"John\", \n        \"lastName\": \"Smith\", \n        \"state\": \"CA\", \n        \"workEmail\": \"smith@example.com\", \n        \"zipCode\": \"94404\"\n    }, \n    \"currency\": \"USD\", \n    \"hpmCreditCardPaymentMethodId\": \"2c92c0f93cf64d94013cfe2d20db61a7\", \n    \"invoiceDeliveryPrefsEmail\": true, \n    \"invoiceDeliveryPrefsPrint\": false, \n    \"name\": \"Zuora Test Account\", \n    \"notes\": \"This account is for demo purposes.\", \n    \"paymentTerm\": \"Due Upon Receipt\", \n    \"subscription\": {\n        \"autoRenew\": true, \n        \"contractEffectiveDate\": \"2016-01-01\", \n        \"initialTerm\": 12, \n        \"notes\": \"This is a trial subscription for POST account demo.\", \n        \"renewalTerm\": 12, \n        \"subscribeToRatePlans\": [\n            {\n                \"chargeOverrides\": [\n                    {\n                        \"price\": 1000, \n                        \"productRatePlanChargeId\": \"2c92c0f94ac8307f014ae5d4a5156b28\"\n                    }, \n                    {\n                        \"price\": 1000, \n                        \"productRatePlanChargeId\": \"2c92c0f94ac8307f014ae5dbe2947851\"\n                    }\n                ], \n                \"productRatePlanId\": \"2c92c0f94ac8307f014ae5d3d1d469e2\"\n            }, \n            {\n                \"chargeOverrides\": [\n                    {\n                        \"price\": 1000, \n                        \"productRatePlanChargeId\": \"2c92c0f83cf64298013d027725a67b7b\"\n                    }\n                ], \n                \"productRatePlanId\": \"2c92c0f93cf64d94013d027681560341\"\n            }\n        ], \n        \"termType\": \"TERMED\"\n    }\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/accounts")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"additionalEmailAddresses\": [\n        \"contact1@example.com\", \n        \"contact2@example.com\"\n    ], \n    \"autoPay\": false, \n    \"billCycleDay\": 0, \n    \"billToContact\": {\n        \"address1\": \"1051 E Hillsdale Blvd\", \n        \"city\": \"Foster City\", \n        \"country\": \"United States\", \n        \"firstName\": \"John\", \n        \"lastName\": \"Smith\", \n        \"state\": \"CA\", \n        \"workEmail\": \"smith@example.com\", \n        \"zipCode\": \"94404\"\n    }, \n    \"currency\": \"USD\", \n    \"hpmCreditCardPaymentMethodId\": \"2c92c0f93cf64d94013cfe2d20db61a7\", \n    \"invoiceDeliveryPrefsEmail\": true, \n    \"invoiceDeliveryPrefsPrint\": false, \n    \"name\": \"Zuora Test Account\", \n    \"notes\": \"This account is for demo purposes.\", \n    \"paymentTerm\": \"Due Upon Receipt\", \n    \"subscription\": {\n        \"autoRenew\": true, \n        \"contractEffectiveDate\": \"2016-01-01\", \n        \"initialTerm\": 12, \n        \"notes\": \"This is a trial subscription for POST account demo.\", \n        \"renewalTerm\": 12, \n        \"subscribeToRatePlans\": [\n            {\n                \"chargeOverrides\": [\n                    {\n                        \"price\": 1000, \n                        \"productRatePlanChargeId\": \"2c92c0f94ac8307f014ae5d4a5156b28\"\n                    }, \n                    {\n                        \"price\": 1000, \n                        \"productRatePlanChargeId\": \"2c92c0f94ac8307f014ae5dbe2947851\"\n                    }\n                ], \n                \"productRatePlanId\": \"2c92c0f94ac8307f014ae5d3d1d469e2\"\n            }, \n            {\n                \"chargeOverrides\": [\n                    {\n                        \"price\": 1000, \n                        \"productRatePlanChargeId\": \"2c92c0f83cf64298013d027725a67b7b\"\n                    }\n                ], \n                \"productRatePlanId\": \"2c92c0f93cf64d94013d027681560341\"\n            }\n        ], \n        \"termType\": \"TERMED\"\n    }\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/accounts", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/accounts")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"additionalEmailAddresses\": [\n        \"contact1@example.com\", \n        \"contact2@example.com\"\n    ], \n    \"autoPay\": false, \n    \"billCycleDay\": 0, \n    \"billToContact\": {\n        \"address1\": \"1051 E Hillsdale Blvd\", \n        \"city\": \"Foster City\", \n        \"country\": \"United States\", \n        \"firstName\": \"John\", \n        \"lastName\": \"Smith\", \n        \"state\": \"CA\", \n        \"workEmail\": \"smith@example.com\", \n        \"zipCode\": \"94404\"\n    }, \n    \"currency\": \"USD\", \n    \"hpmCreditCardPaymentMethodId\": \"2c92c0f93cf64d94013cfe2d20db61a7\", \n    \"invoiceDeliveryPrefsEmail\": true, \n    \"invoiceDeliveryPrefsPrint\": false, \n    \"name\": \"Zuora Test Account\", \n    \"notes\": \"This account is for demo purposes.\", \n    \"paymentTerm\": \"Due Upon Receipt\", \n    \"subscription\": {\n        \"autoRenew\": true, \n        \"contractEffectiveDate\": \"2016-01-01\", \n        \"initialTerm\": 12, \n        \"notes\": \"This is a trial subscription for POST account demo.\", \n        \"renewalTerm\": 12, \n        \"subscribeToRatePlans\": [\n            {\n                \"chargeOverrides\": [\n                    {\n                        \"price\": 1000, \n                        \"productRatePlanChargeId\": \"2c92c0f94ac8307f014ae5d4a5156b28\"\n                    }, \n                    {\n                        \"price\": 1000, \n                        \"productRatePlanChargeId\": \"2c92c0f94ac8307f014ae5dbe2947851\"\n                    }\n                ], \n                \"productRatePlanId\": \"2c92c0f94ac8307f014ae5d3d1d469e2\"\n            }, \n            {\n                \"chargeOverrides\": [\n                    {\n                        \"price\": 1000, \n                        \"productRatePlanChargeId\": \"2c92c0f83cf64298013d027725a67b7b\"\n                    }\n                ], \n                \"productRatePlanId\": \"2c92c0f93cf64d94013d027681560341\"\n            }\n        ], \n        \"termType\": \"TERMED\"\n    }\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/accounts");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"additionalEmailAddresses\": [\n        \"contact1@example.com\", \n        \"contact2@example.com\"\n    ], \n    \"autoPay\": false, \n    \"billCycleDay\": 0, \n    \"billToContact\": {\n        \"address1\": \"1051 E Hillsdale Blvd\", \n        \"city\": \"Foster City\", \n        \"country\": \"United States\", \n        \"firstName\": \"John\", \n        \"lastName\": \"Smith\", \n        \"state\": \"CA\", \n        \"workEmail\": \"smith@example.com\", \n        \"zipCode\": \"94404\"\n    }, \n    \"currency\": \"USD\", \n    \"hpmCreditCardPaymentMethodId\": \"2c92c0f93cf64d94013cfe2d20db61a7\", \n    \"invoiceDeliveryPrefsEmail\": true, \n    \"invoiceDeliveryPrefsPrint\": false, \n    \"name\": \"Zuora Test Account\", \n    \"notes\": \"This account is for demo purposes.\", \n    \"paymentTerm\": \"Due Upon Receipt\", \n    \"subscription\": {\n        \"autoRenew\": true, \n        \"contractEffectiveDate\": \"2016-01-01\", \n        \"initialTerm\": 12, \n        \"notes\": \"This is a trial subscription for POST account demo.\", \n        \"renewalTerm\": 12, \n        \"subscribeToRatePlans\": [\n            {\n                \"chargeOverrides\": [\n                    {\n                        \"price\": 1000, \n                        \"productRatePlanChargeId\": \"2c92c0f94ac8307f014ae5d4a5156b28\"\n                    }, \n                    {\n                        \"price\": 1000, \n                        \"productRatePlanChargeId\": \"2c92c0f94ac8307f014ae5dbe2947851\"\n                    }\n                ], \n                \"productRatePlanId\": \"2c92c0f94ac8307f014ae5d3d1d469e2\"\n            }, \n            {\n                \"chargeOverrides\": [\n                    {\n                        \"price\": 1000, \n                        \"productRatePlanChargeId\": \"2c92c0f83cf64298013d027725a67b7b\"\n                    }\n                ], \n                \"productRatePlanId\": \"2c92c0f93cf64d94013d027681560341\"\n            }\n        ], \n        \"termType\": \"TERMED\"\n    }\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/accounts/billing-documents/files/deletion-jobs:
    post:
      description: |
        Creates an asynchronous job to permanently delete all billing document PDF files for specific accounts. 

        After the deletion job is completed, all billing document PDF files are permanently deleted. To retrieve the status of a deletion job, call [Retrieve a job of hard deleting billing document files](https://www.zuora.com/developer/api-reference/#operation/GET_BillingDocumentFilesDeletionJob).

        **Note**: This operation can be used only if you have the Billing user permission "Hard Delete Billing Document Files" enabled. 
      operationId: POST_BillingDocumentFilesDeletionJob
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTBillingDocumentFilesDeletionJobRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    id: 2c92c8f83dc4f752013dc72c24ee016c
                    status: Pending
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTBillingDocumentFilesDeletionJobResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Create a job to hard delete billing document files
      tags:
        - Billing Documents
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "accountIds": [
                    "4028905558b483220158b48983dd0015", 
                    "6028905558b483220158b68983dd0016"
                ]
            }' "https://rest.zuora.com/v1/accounts/billing-documents/files/deletion-jobs"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/accounts/billing-documents/files/deletion-jobs');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "accountIds": [
                    "4028905558b483220158b48983dd0015", 
                    "6028905558b483220158b68983dd0016"
                ]
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"accountIds\": [\n        \"4028905558b483220158b48983dd0015\", \n        \"6028905558b483220158b68983dd0016\"\n    ]\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/accounts/billing-documents/files/deletion-jobs")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"accountIds\": [\n        \"4028905558b483220158b48983dd0015\", \n        \"6028905558b483220158b68983dd0016\"\n    ]\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/accounts/billing-documents/files/deletion-jobs", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/accounts/billing-documents/files/deletion-jobs")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"accountIds\": [\n        \"4028905558b483220158b48983dd0015\", \n        \"6028905558b483220158b68983dd0016\"\n    ]\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/accounts/billing-documents/files/deletion-jobs");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"accountIds\": [\n        \"4028905558b483220158b48983dd0015\", \n        \"6028905558b483220158b68983dd0016\"\n    ]\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/accounts/billing-documents/files/deletion-jobs/{jobId}":
    get:
      description: |
        Retrieves information about an asynchronous job of permanently deleting all billing document PDF files for specific accounts.

        **Note**: This operation can be used only if you have the Billing user permission "Hard Delete Billing Document Files" enabled. 
      operationId: GET_BillingDocumentFilesDeletionJob
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: The unique ID of a billing document file deletion job. For example, 2c92c8f83dc4f752013dc72c24ee016c.
          in: path
          name: jobId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    id: 2c92c8f83dc4f752013dc72c24ee016c
                    status: Pending
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETBillingDocumentFilesDeletionJobResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a job of hard deleting billing document files
      tags:
        - Billing Documents
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/accounts/billing-documents/files/deletion-jobs/{jobId}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/accounts/billing-documents/files/deletion-jobs/{jobId}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/accounts/billing-documents/files/deletion-jobs/{jobId}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/accounts/billing-documents/files/deletion-jobs/{jobId}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/accounts/billing-documents/files/deletion-jobs/{jobId}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/accounts/billing-documents/files/deletion-jobs/{jobId}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/accounts/{account-key}":
    get:
      description: |
        Retrieves basic information about a customer account.

        This operation is a quick retrieval that doesn't include the account's subscriptions, invoices, payments, or usage details. Use Get account summary to get more detailed information about an account.
      operationId: GET_Account
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: Account number or account ID.
          in: path
          name: account-key
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    basicInfo:
                      accountNumber: A00000001
                      batch: Batch1
                      communicationProfileId: 303d186840e611df817c002185d714e1
                      crmId: ""
                      id: 402892c74c9193cd014c91d35b0a0132
                      invoiceTemplateId: null
                      name: Test
                      notes: ""
                      salesRep: ""
                      sequenceSetId: null
                      status: Active
                    billToContact:
                      address1: ""
                      address2: ""
                      city: ""
                      country: null
                      county: null
                      fax: ""
                      firstName: Test
                      homePhone: ""
                      lastName: Test
                      mobilePhone: ""
                      nickname: ""
                      otherPhone: ""
                      otherPhoneType: null
                      personalEmail: ""
                      state: ""
                      taxRegion: null
                      workEmail: contact@example.com
                      workPhone: ""
                      zipCode: ""
                    billingAndPayment:
                      additionalEmailAddresses:
                        - contact1@example.com
                        - contact2@example.com
                      billCycleDay: 1
                      currency: USD
                      invoiceDeliveryPrefsEmail: true
                      invoiceDeliveryPrefsPrint: false
                      paymentGateway: TestGateway
                      paymentTerm: Net 30
                    metrics:
                      balance: 0
                      contractedMrr: -900
                      creditBalance: 0
                      totalInvoiceBalance: 0
                    soldToContact:
                      address1: ""
                      address2: ""
                      city: ""
                      country: null
                      county: null
                      fax: ""
                      firstName: Test
                      homePhone: ""
                      lastName: Test
                      mobilePhone: ""
                      nickname: ""
                      otherPhone: ""
                      otherPhoneType: null
                      personalEmail: ""
                      state: ""
                      taxRegion: null
                      workEmail: contact@example.com
                      workPhone: ""
                      zipCode: ""
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETAccountType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve an account
      tags:
        - Accounts
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/accounts/{account-key}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/accounts/{account-key}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/accounts/{account-key}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/accounts/{account-key}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/accounts/{account-key}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/accounts/{account-key}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: |
        Updates a customer account by specifying the account-key.

        ## Notes
        1. Only the fields to be changed should be specified.  Any field that is not included in the request body will not be changed.
        2. If an empty field is submitted with this operation, the corresponding field in the account is emptied.
        3. Email addresses: If no email addresses are specified, no change is made to the email addresses on file or to the email delivery preference. If either the **personalEmail** or **workEmail** is specified (or both), the system updates the corresponding email address(es) on file and the email delivery preference is set to `true`. (In that case, emails go to the **workEmail** address, if it exists, or else the **personalEmail**.) On the other hand, if as a result of this call both of the email addresses for the account are empty, the email delivery preference is set to `false`.
        4. The bill-to and sold-to contacts are separate data entities. If you select the **Same as Bill To Contact** check box during account creation, both the Bill To and Sold To contacts are updated upon updating either one because they point to the same contact record. In this case, if you want to update only one of them, you have to first create another contact and update the Bill To or Sold To contact of the customer account to be the newly created one.

        For a use case of this operation, see [Configure payment methods](https://www.zuora.com/developer/api-guides/#Configure-payment-methods).
      operationId: PUT_Account
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: Account number or account ID.
          in: path
          name: account-key
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTAccountType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Update an account
      tags:
        - Accounts
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "additionalEmailAddresses": [
                    "contact3@example.com", 
                    "contact4@example.com"
                ], 
                "paymentGateway": "TestGateway"
            }' "https://rest.zuora.com/v1/accounts/{account-key}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/accounts/{account-key}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "additionalEmailAddresses": [
                    "contact3@example.com", 
                    "contact4@example.com"
                ], 
                "paymentGateway": "TestGateway"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"additionalEmailAddresses\": [\n        \"contact3@example.com\", \n        \"contact4@example.com\"\n    ], \n    \"paymentGateway\": \"TestGateway\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/accounts/{account-key}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"additionalEmailAddresses\": [\n        \"contact3@example.com\", \n        \"contact4@example.com\"\n    ], \n    \"paymentGateway\": \"TestGateway\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/accounts/{account-key}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/accounts/{account-key}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"additionalEmailAddresses\": [\n        \"contact3@example.com\", \n        \"contact4@example.com\"\n    ], \n    \"paymentGateway\": \"TestGateway\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/accounts/{account-key}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"additionalEmailAddresses\": [\n        \"contact3@example.com\", \n        \"contact4@example.com\"\n    ], \n    \"paymentGateway\": \"TestGateway\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/accounts/{account-key}/summary":
    get:
      description: |
        Retrieves detailed information about the specified customer account.

        The response includes the account information and a summary of the account’s subscriptions, invoices, payments, and usages for the last six recently updated subscriptions.

        ## Notes 
        Returns only the six most recent subscriptions based on the subscription updatedDate. Within those subscriptions, there may be many rate plans and many rate plan charges. These items are subject to the maximum limit on the array size. 
      operationId: GET_AccountSummary
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: Account number or account ID.
          in: path
          name: account-key
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    basicInfo:
                      accountNumber: A00001115
                      additionalEmailAddresses:
                        - contact1@example.com
                        - contact2@example.com
                      balance: 0
                      billCycleDay: 1
                      currency: USD
                      defaultPaymentMethod:
                        creditCardExpirationMonth: 10
                        creditCardExpirationYear: 2020
                        creditCardNumber: "************1111"
                        creditCardType: Visa
                        id: 2c92c8f83dabf9cf013daef12dd303b0
                        paymentMethodType: CreditCard
                      id: 2c92a0f9391832b10139183e277a0042
                      invoiceDeliveryPrefsEmail: true
                      invoiceDeliveryPrefsPrint: false
                      lastInvoiceDate: 2013-02-11
                      lastPaymentAmount: 150248.1
                      lastPaymentDate: 2013-03-27
                      name: subscribeCallYan_1
                      status: Active
                    billToContact:
                      address1: 1400 Bridge Pkwy
                      address2: ""
                      city: San Jose
                      country: United States
                      county: ""
                      fax: ""
                      firstName: Cheng
                      id: 2c92a0f9391832b10139183e27940043
                      lastName: Zou
                      state: California
                      taxRegion: ""
                      workEmail: contact@example.com
                      workPhone: "5555551212"
                      zipCode: "95135"
                    invoices:
                      - amount: 139722.1
                        balance: 0
                        dueDate: 2013-02-11
                        id: 2c92a0953a3fa95d013a407c10a60100
                        invoiceDate: 2013-02-11
                        invoiceNumber: INV00000323
                        status: Posted
                      - amount: 10521
                        balance: 0
                        dueDate: 2012-08-11
                        id: 2c92a09739190dc60139194bcf1b0098
                        invoiceDate: 2012-08-11
                        invoiceNumber: INV00000160
                        status: Posted
                      - amount: 10
                        balance: 0
                        dueDate: 2012-08-11
                        id: 2c92a09539190dbe0139190f42780012
                        invoiceDate: 2012-08-11
                        invoiceNumber: INV00000159
                        status: Posted
                    payments:
                      - effectiveDate: 2013-03-27
                        id: 2c92c8f83dabf9cf013daf3bfa0305a6
                        paidInvoices:
                          - appliedPaymentAmount: 5
                            invoiceId: 2c92a09539190dbe0139190f42780012
                            invoiceNumber: INV00000159
                          - appliedPaymentAmount: 139722.1
                            invoiceId: 2c92a0953a3fa95d013a407c10a60100
                            invoiceNumber: INV00000323
                          - appliedPaymentAmount: 10521
                            invoiceId: 2c92a09739190dc60139194bcf1b0098
                            invoiceNumber: INV00000160
                        paymentNumber: P-00000075
                        paymentType: Electronic
                        status: Processed
                      - effectiveDate: 2012-08-11
                        id: 2c92a0f9391832b101391922ad5f049d
                        paidInvoices:
                          - appliedPaymentAmount: 5
                            invoiceId: 2c92a09539190dbe0139190f42780012
                            invoiceNumber: INV00000159
                        paymentNumber: P-00000056
                        paymentType: Electronic
                        status: Processed
                    soldToContact:
                      address1: 278 Bridgeton Circle
                      address2: ""
                      city: San Jose
                      country: United States
                      county: ""
                      fax: ""
                      firstName: Bill
                      id: 2c92a0f9391832b10139183e27940043
                      lastName: Cho
                      state: California
                      taxRegion: ""
                      workEmail: contact@example.com
                      workPhone: "5555551212"
                      zipCode: "95135"
                    subscriptions:
                      - autoRenew: true
                        id: 2c92c8f83dc4f752013dc72c24ee016d
                        initialTerm: 12
                        ratePlans:
                          - productName: Recurring Charge
                            ratePlanName: QSF_Tier
                        renewalTerm: 3
                        status: Active
                        subscriptionNumber: A-S00001081
                        subscriptionStartDate: 2013-02-01
                        termEndDate: 2014-02-01
                        termStartDate: 2013-02-01
                        termType: TERMED
                      - autoRenew: true
                        id: 2c92c8f83dc4f752013dc72bb85c0127
                        initialTerm: 12
                        ratePlans:
                          - productName: Recurring Charge
                            ratePlanName: QSF_Tier
                        renewalTerm: 3
                        status: Active
                        subscriptionNumber: A-S00001080
                        subscriptionStartDate: 2013-02-01
                        termEndDate: 2014-02-01
                        termStartDate: 2013-02-01
                        termType: TERMED
                      - autoRenew: false
                        id: 2c92c8f83dc4f752013dc723fdab00d4
                        initialTerm: 10
                        ratePlans:
                          - productName: Recurring Charge
                            ratePlanName: QSF_Tier
                        renewalTerm: 4
                        status: Cancelled
                        subscriptionNumber: A-S00001079
                        subscriptionStartDate: 2013-02-01
                        termEndDate: 2014-04-01
                        termStartDate: 2013-12-01
                        termType: TERMED
                      - autoRenew: false
                        id: 2c92c8f83db0b4b4013db4717ad000ec
                        initialTerm: 12
                        ratePlans:
                          - productName: Recurring Charge
                            ratePlanName: Month_PerUnit
                          - productName: Recurring Charge
                            ratePlanName: Month_PerUnit
                        renewalTerm: 3
                        status: Active
                        subscriptionNumber: A-S00001076
                        subscriptionStartDate: 2011-02-11
                        termEndDate: 2012-02-11
                        termStartDate: 2011-02-11
                        termType: TERMED
                      - autoRenew: false
                        id: 2c92c8f83db0b4b4013db3ab6a4d00bc
                        initialTerm: 12
                        ratePlans:
                          - productName: Recurring Charge
                            ratePlanName: Month_PerUnit
                          - productName: Recurring Charge
                            ratePlanName: Month_PerUnit
                        renewalTerm: 3
                        status: Active
                        subscriptionNumber: A-S00001075
                        subscriptionStartDate: 2011-02-11
                        termEndDate: 2012-02-11
                        termStartDate: 2011-02-11
                        termType: TERMED
                      - autoRenew: false
                        id: 2c92c8f83db0b4b4013db3aa9fbd0090
                        initialTerm: 12
                        ratePlans:
                          - productName: Recurring Charge
                            ratePlanName: Month_PerUnit
                        renewalTerm: 3
                        status: Active
                        subscriptionNumber: A-S00001074
                        subscriptionStartDate: 2011-02-11
                        termEndDate: 2012-02-11
                        termStartDate: 2011-02-11
                        termType: TERMED
                    success: true
                    usage:
                      - quantity: 10
                        startDate: 2012-02
                        unitOfMeasure: UOM
                      - quantity: 10
                        startDate: 2012-01
                        unitOfMeasure: UOM
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETAccountSummaryType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve an account summary
      tags:
        - Accounts
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/accounts/{account-key}/summary"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/accounts/{account-key}/summary');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/accounts/{account-key}/summary")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/accounts/{account-key}/summary", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/accounts/{account-key}/summary")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/accounts/{account-key}/summary");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/accounts/{id}/billing-documents/generate":
    post:
      description: |
        Generates draft or posted billing documents for a specified account. You can also generate billing documents for specified subscriptions of a specified account. The billing documents contain invoices and credit memos. To generate credit memos, you must have the Invoice Settlement feature enabled.

        **Note**: You cannot generate billing documents for cancelled or suspended subscriptions.
      operationId: POST_GenerateBillingDocuments
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The ID of the customer account that billing documents are generated for. For example, 8a8082e65b27f6c3015ba3e326b26419.
          in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PostGenerateBillingDocumentType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    creditMemos:
                      - id: 402890555c33b44b015c33bfe947003c
                      - id: 402890555c33b44b015c33bfe93c003a
                    invoices:
                      - id: 402890555c33b44b015c33bfe9c70044
                      - id: 402890555c33b44b015c33bfe9d70046
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GenerateBillingDocumentResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Generate billing documents by account ID
      tags:
        - Billing Documents
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "autoPost": false, 
                "effectiveDate": "2017-05-23", 
                "subscriptionIds": [
                    "4028905558b483220158b48983dd0015", 
                    "6028905558b483220158b68983dd0016"
                ], 
                "targetDate": "2017-08-23"
            }' "https://rest.zuora.com/v1/accounts/{id}/billing-documents/generate"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/accounts/{id}/billing-documents/generate');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "autoPost": false, 
                "effectiveDate": "2017-05-23", 
                "subscriptionIds": [
                    "4028905558b483220158b48983dd0015", 
                    "6028905558b483220158b68983dd0016"
                ], 
                "targetDate": "2017-08-23"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"autoPost\": false, \n    \"effectiveDate\": \"2017-05-23\", \n    \"subscriptionIds\": [\n        \"4028905558b483220158b48983dd0015\", \n        \"6028905558b483220158b68983dd0016\"\n    ], \n    \"targetDate\": \"2017-08-23\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/accounts/{id}/billing-documents/generate")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"autoPost\": false, \n    \"effectiveDate\": \"2017-05-23\", \n    \"subscriptionIds\": [\n        \"4028905558b483220158b48983dd0015\", \n        \"6028905558b483220158b68983dd0016\"\n    ], \n    \"targetDate\": \"2017-08-23\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/accounts/{id}/billing-documents/generate", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/accounts/{id}/billing-documents/generate")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"autoPost\": false, \n    \"effectiveDate\": \"2017-05-23\", \n    \"subscriptionIds\": [\n        \"4028905558b483220158b48983dd0015\", \n        \"6028905558b483220158b68983dd0016\"\n    ], \n    \"targetDate\": \"2017-08-23\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/accounts/{id}/billing-documents/generate");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"autoPost\": false, \n    \"effectiveDate\": \"2017-05-23\", \n    \"subscriptionIds\": [\n        \"4028905558b483220158b48983dd0015\", \n        \"6028905558b483220158b68983dd0016\"\n    ], \n    \"targetDate\": \"2017-08-23\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/action/amend:
    post:
      description: |
        Modifies a subscription by creating Amendment objects. However, to modify a subscription, Zuora recommends that you use [Update subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_Subscription) instead of this action. 

        The Amend action cannot modify the custom fields on the Subscription object. You must use [Update subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_Subscription) or [Update subscription custom fields of a specified subscription version](https://www.zuora.com/developer/api-reference/#operation/PUT_UpdateSubscriptionCustomFieldsOfASpecifiedVersion) to modify the custom fields on the Subscription object.

        You can use this action to create up to 10 Amendment objects. 

        You must specify the following fields for each Amendment object:

        * `ContractEffectiveDate`
        * `Name`
        * `SubscriptionId`
        * `Type`

        Additionally, the value of `SubscriptionId` must be the same for each Amendment object. You cannot use this operation to update multiple subscriptions.

        **Note:** When you call this operation, Zuora modifies the subscription in the order that you specify Amendment objects in the request body.

        If Zuora is unable to create an Amendment object when you call this operation, the entire call fails.
      operationId: Action_POSTamend
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_X_Zuora_WSDL_Version"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyActionamendRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    results:
                      - AmendmentIds:
                          - 2c93808457d787030157e02e27781ea0
                        SubscriptionId: 2c93808457d787030157e02e27e21eaa
                        Success: true
                        TotalDeltaMrr: 30
                        TotalDeltaTcv: 360
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyActionamendResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Amend
      tags:
        - Actions
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "requests": [
                    {
                        "Amendments": [
                            {
                                "ContractEffectiveDate": "2018-07-20", 
                                "Description": "100 seats of product and flat fee for phone support", 
                                "Name": "Add premium product", 
                                "RatePlanData": {
                                    "RatePlan": {
                                        "ProductRatePlanId": "2c92c0f957034698015707751d7e20b9"
                                    }, 
                                    "RatePlanChargeData": [
                                        {
                                            "RatePlanCharge": {
                                                "ProductRatePlanChargeId": "2c92c0f957034698015707751dff20ce", 
                                                "Quantity": 100
                                            }
                                        }, 
                                        {
                                            "RatePlanCharge": {
                                                "ProductRatePlanChargeId": "2c92c0f857033a46015707a16c9e0274"
                                            }
                                        }
                                    ]
                                }, 
                                "Status": "Completed", 
                                "SubscriptionId": "2c92c0f9647e2f5001647e51728d7995", 
                                "Type": "NewProduct"
                            }
                        ], 
                        "PreviewOptions": {
                            "EnablePreviewMode": false
                        }
                    }
                ]
            }' "https://rest.zuora.com/v1/action/amend"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/action/amend');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "requests": [
                    {
                        "Amendments": [
                            {
                                "ContractEffectiveDate": "2018-07-20", 
                                "Description": "100 seats of product and flat fee for phone support", 
                                "Name": "Add premium product", 
                                "RatePlanData": {
                                    "RatePlan": {
                                        "ProductRatePlanId": "2c92c0f957034698015707751d7e20b9"
                                    }, 
                                    "RatePlanChargeData": [
                                        {
                                            "RatePlanCharge": {
                                                "ProductRatePlanChargeId": "2c92c0f957034698015707751dff20ce", 
                                                "Quantity": 100
                                            }
                                        }, 
                                        {
                                            "RatePlanCharge": {
                                                "ProductRatePlanChargeId": "2c92c0f857033a46015707a16c9e0274"
                                            }
                                        }
                                    ]
                                }, 
                                "Status": "Completed", 
                                "SubscriptionId": "2c92c0f9647e2f5001647e51728d7995", 
                                "Type": "NewProduct"
                            }
                        ], 
                        "PreviewOptions": {
                            "EnablePreviewMode": false
                        }
                    }
                ]
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"requests\": [\n        {\n            \"Amendments\": [\n                {\n                    \"ContractEffectiveDate\": \"2018-07-20\", \n                    \"Description\": \"100 seats of product and flat fee for phone support\", \n                    \"Name\": \"Add premium product\", \n                    \"RatePlanData\": {\n                        \"RatePlan\": {\n                            \"ProductRatePlanId\": \"2c92c0f957034698015707751d7e20b9\"\n                        }, \n                        \"RatePlanChargeData\": [\n                            {\n                                \"RatePlanCharge\": {\n                                    \"ProductRatePlanChargeId\": \"2c92c0f957034698015707751dff20ce\", \n                                    \"Quantity\": 100\n                                }\n                            }, \n                            {\n                                \"RatePlanCharge\": {\n                                    \"ProductRatePlanChargeId\": \"2c92c0f857033a46015707a16c9e0274\"\n                                }\n                            }\n                        ]\n                    }, \n                    \"Status\": \"Completed\", \n                    \"SubscriptionId\": \"2c92c0f9647e2f5001647e51728d7995\", \n                    \"Type\": \"NewProduct\"\n                }\n            ], \n            \"PreviewOptions\": {\n                \"EnablePreviewMode\": false\n            }\n        }\n    ]\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/action/amend")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"requests\": [\n        {\n            \"Amendments\": [\n                {\n                    \"ContractEffectiveDate\": \"2018-07-20\", \n                    \"Description\": \"100 seats of product and flat fee for phone support\", \n                    \"Name\": \"Add premium product\", \n                    \"RatePlanData\": {\n                        \"RatePlan\": {\n                            \"ProductRatePlanId\": \"2c92c0f957034698015707751d7e20b9\"\n                        }, \n                        \"RatePlanChargeData\": [\n                            {\n                                \"RatePlanCharge\": {\n                                    \"ProductRatePlanChargeId\": \"2c92c0f957034698015707751dff20ce\", \n                                    \"Quantity\": 100\n                                }\n                            }, \n                            {\n                                \"RatePlanCharge\": {\n                                    \"ProductRatePlanChargeId\": \"2c92c0f857033a46015707a16c9e0274\"\n                                }\n                            }\n                        ]\n                    }, \n                    \"Status\": \"Completed\", \n                    \"SubscriptionId\": \"2c92c0f9647e2f5001647e51728d7995\", \n                    \"Type\": \"NewProduct\"\n                }\n            ], \n            \"PreviewOptions\": {\n                \"EnablePreviewMode\": false\n            }\n        }\n    ]\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/action/amend", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/action/amend")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"requests\": [\n        {\n            \"Amendments\": [\n                {\n                    \"ContractEffectiveDate\": \"2018-07-20\", \n                    \"Description\": \"100 seats of product and flat fee for phone support\", \n                    \"Name\": \"Add premium product\", \n                    \"RatePlanData\": {\n                        \"RatePlan\": {\n                            \"ProductRatePlanId\": \"2c92c0f957034698015707751d7e20b9\"\n                        }, \n                        \"RatePlanChargeData\": [\n                            {\n                                \"RatePlanCharge\": {\n                                    \"ProductRatePlanChargeId\": \"2c92c0f957034698015707751dff20ce\", \n                                    \"Quantity\": 100\n                                }\n                            }, \n                            {\n                                \"RatePlanCharge\": {\n                                    \"ProductRatePlanChargeId\": \"2c92c0f857033a46015707a16c9e0274\"\n                                }\n                            }\n                        ]\n                    }, \n                    \"Status\": \"Completed\", \n                    \"SubscriptionId\": \"2c92c0f9647e2f5001647e51728d7995\", \n                    \"Type\": \"NewProduct\"\n                }\n            ], \n            \"PreviewOptions\": {\n                \"EnablePreviewMode\": false\n            }\n        }\n    ]\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/action/amend");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"requests\": [\n        {\n            \"Amendments\": [\n                {\n                    \"ContractEffectiveDate\": \"2018-07-20\", \n                    \"Description\": \"100 seats of product and flat fee for phone support\", \n                    \"Name\": \"Add premium product\", \n                    \"RatePlanData\": {\n                        \"RatePlan\": {\n                            \"ProductRatePlanId\": \"2c92c0f957034698015707751d7e20b9\"\n                        }, \n                        \"RatePlanChargeData\": [\n                            {\n                                \"RatePlanCharge\": {\n                                    \"ProductRatePlanChargeId\": \"2c92c0f957034698015707751dff20ce\", \n                                    \"Quantity\": 100\n                                }\n                            }, \n                            {\n                                \"RatePlanCharge\": {\n                                    \"ProductRatePlanChargeId\": \"2c92c0f857033a46015707a16c9e0274\"\n                                }\n                            }\n                        ]\n                    }, \n                    \"Status\": \"Completed\", \n                    \"SubscriptionId\": \"2c92c0f9647e2f5001647e51728d7995\", \n                    \"Type\": \"NewProduct\"\n                }\n            ], \n            \"PreviewOptions\": {\n                \"EnablePreviewMode\": false\n            }\n        }\n    ]\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/action/create:
    post:
      description: |
        Use the create call to create one or more objects of a specific type. You can specify different types in different create calls, but each create call must apply to only one type of object.

        ## Limitations 

        This call has the following limitations:

        * A maximum of 50 objects are supported in a single call.
        * The Invoice Settlement feature is not supported. This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement.
        * The default WSDL version for Actions is 79. To create objects according to a different WSDL version, set the `X-Zuora-WSDL-Version` header. To find out in which WSDL version a particular object or field was introduced, see [Zuora SOAP API Version History](https://knowledgecenter.zuora.com/DC_Developers/G_SOAP_API/Zuora_SOAP_API_Version_History).


        ## How to Use this Call

        You can call create on an array of one or more zObjects. It returns an array of SaveResults, indicating the success or failure of creating each object. The following information applies to this call:

        * You cannot pass in null zObjects.
        * You can pass in a maximum of 50 zObjects at a time.
        * All objects must be of the same type.

        For a use case of this call, see [Upload usage records](https://www.zuora.com/developer/api-guides/#Upload-usage-records).

        ### Using Create and Subscribe Calls 
        Both the create and subscribe calls will create a new account. However, there are differences between the calls.

        Use the create call to create an account independent of a subscription.

        Use the subscribe call to create the account with the subscription and the initial payment information.
      operationId: Action_POSTcreate
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_X_Zuora_WSDL_Version"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyActioncreateRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    - Id: 2c93808457d787030157e0324aea5158
                      Success: true
            application/json; charset=utf-8:
              schema:
                description: ""
                items:
                  $ref: "#/components/schemas/SaveResult"
                type: array
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Create
      tags:
        - Actions
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "objects": [
                    {
                        "AccountingCode": "Accounts Receivable", 
                        "AdjustmentDate": "2016-10-20", 
                        "Amount": 1.2, 
                        "Comment": "this is comments", 
                        "InvoiceId": "2c93808457d787030157e03248c75142", 
                        "InvoiceNumber": "INV00000001", 
                        "ReferenceId": "refid-1476935174845", 
                        "SourceId": "2c93808457d787030157e03248c95144", 
                        "SourceType": "InvoiceDetail", 
                        "Type": "Credit"
                    }
                ], 
                "type": "InvoiceItemAdjustment"
            }' "https://rest.zuora.com/v1/action/create"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/action/create');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "objects": [
                    {
                        "AccountingCode": "Accounts Receivable", 
                        "AdjustmentDate": "2016-10-20", 
                        "Amount": 1.2, 
                        "Comment": "this is comments", 
                        "InvoiceId": "2c93808457d787030157e03248c75142", 
                        "InvoiceNumber": "INV00000001", 
                        "ReferenceId": "refid-1476935174845", 
                        "SourceId": "2c93808457d787030157e03248c95144", 
                        "SourceType": "InvoiceDetail", 
                        "Type": "Credit"
                    }
                ], 
                "type": "InvoiceItemAdjustment"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"objects\": [\n        {\n            \"AccountingCode\": \"Accounts Receivable\", \n            \"AdjustmentDate\": \"2016-10-20\", \n            \"Amount\": 1.2, \n            \"Comment\": \"this is comments\", \n            \"InvoiceId\": \"2c93808457d787030157e03248c75142\", \n            \"InvoiceNumber\": \"INV00000001\", \n            \"ReferenceId\": \"refid-1476935174845\", \n            \"SourceId\": \"2c93808457d787030157e03248c95144\", \n            \"SourceType\": \"InvoiceDetail\", \n            \"Type\": \"Credit\"\n        }\n    ], \n    \"type\": \"InvoiceItemAdjustment\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/action/create")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"objects\": [\n        {\n            \"AccountingCode\": \"Accounts Receivable\", \n            \"AdjustmentDate\": \"2016-10-20\", \n            \"Amount\": 1.2, \n            \"Comment\": \"this is comments\", \n            \"InvoiceId\": \"2c93808457d787030157e03248c75142\", \n            \"InvoiceNumber\": \"INV00000001\", \n            \"ReferenceId\": \"refid-1476935174845\", \n            \"SourceId\": \"2c93808457d787030157e03248c95144\", \n            \"SourceType\": \"InvoiceDetail\", \n            \"Type\": \"Credit\"\n        }\n    ], \n    \"type\": \"InvoiceItemAdjustment\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/action/create", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/action/create")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"objects\": [\n        {\n            \"AccountingCode\": \"Accounts Receivable\", \n            \"AdjustmentDate\": \"2016-10-20\", \n            \"Amount\": 1.2, \n            \"Comment\": \"this is comments\", \n            \"InvoiceId\": \"2c93808457d787030157e03248c75142\", \n            \"InvoiceNumber\": \"INV00000001\", \n            \"ReferenceId\": \"refid-1476935174845\", \n            \"SourceId\": \"2c93808457d787030157e03248c95144\", \n            \"SourceType\": \"InvoiceDetail\", \n            \"Type\": \"Credit\"\n        }\n    ], \n    \"type\": \"InvoiceItemAdjustment\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/action/create");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"objects\": [\n        {\n            \"AccountingCode\": \"Accounts Receivable\", \n            \"AdjustmentDate\": \"2016-10-20\", \n            \"Amount\": 1.2, \n            \"Comment\": \"this is comments\", \n            \"InvoiceId\": \"2c93808457d787030157e03248c75142\", \n            \"InvoiceNumber\": \"INV00000001\", \n            \"ReferenceId\": \"refid-1476935174845\", \n            \"SourceId\": \"2c93808457d787030157e03248c95144\", \n            \"SourceType\": \"InvoiceDetail\", \n            \"Type\": \"Credit\"\n        }\n    ], \n    \"type\": \"InvoiceItemAdjustment\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/action/delete:
    post:
      description: |
        Deletes one or more objects of the same type. You can specify different types in different delete calls, but each delete call must apply only to one type of object.

        The following information applies to this call:

        * You will need to first determine the IDs for the objects you wish to delete.
        * You cannot pass in any null IDs.
        * All objects in a specific delete call must be of the same type.


        ### Objects per Call
        50 objects are supported in a single call.
      operationId: Action_POSTdelete
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_X_Zuora_WSDL_Version"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyActiondeleteRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    - id: 2c93808457d787030157e031fcd34e19
                      success: true
            application/json; charset=utf-8:
              schema:
                description: ""
                items:
                  $ref: "#/components/schemas/DeleteResult"
                type: array
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Delete
      tags:
        - Actions
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "ids": [
                    "2c93808457d787030157e031fcd34e19"
                ], 
                "type": "ProductRatePlanCharge"
            }' "https://rest.zuora.com/v1/action/delete"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/action/delete');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "ids": [
                    "2c93808457d787030157e031fcd34e19"
                ], 
                "type": "ProductRatePlanCharge"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"ids\": [\n        \"2c93808457d787030157e031fcd34e19\"\n    ], \n    \"type\": \"ProductRatePlanCharge\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/action/delete")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"ids\": [\n        \"2c93808457d787030157e031fcd34e19\"\n    ], \n    \"type\": \"ProductRatePlanCharge\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/action/delete", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/action/delete")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"ids\": [\n        \"2c93808457d787030157e031fcd34e19\"\n    ], \n    \"type\": \"ProductRatePlanCharge\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/action/delete");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"ids\": [\n        \"2c93808457d787030157e031fcd34e19\"\n    ], \n    \"type\": \"ProductRatePlanCharge\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/action/execute:
    post:
      description: |
        Use the execute call to execute a process to split an invoice into multiple invoices. The original invoice must be in draft status. The resulting invoices are called split invoices.

        **Note:** This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com). 

        To split a draft invoice into multiple split invoices:

        1. Use the create call to create a separate InvoiceSplitItem object for each split invoice that you want to create from the original draft invoice.
        2. Use the create call to create a single InvoiceSplit object to collect all of the InvoiceSplitItem objects.
        3. Use the execute call to split the draft invoice into multiple split invoices.

        You need to create InvoiceSplitItem objects and an InvoiceSplit object before you can use the execute call. 

        * Supported objects: InvoiceSplit
        * Asynchronous process: yes
      operationId: Action_POSTexecute
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_X_Zuora_WSDL_Version"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyActionexecuteRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    - Id: 2c93808457d787030157e031d5844c53
                      Success: true
            application/json; charset=utf-8:
              schema:
                description: ""
                items:
                  $ref: "#/components/schemas/ExecuteResult"
                type: array
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Execute
      tags:
        - Actions
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "ids": [
                    "2c93808457d787030157e031d5844c53"
                ], 
                "synchronous": false, 
                "type": "InvoiceSplit"
            }' "https://rest.zuora.com/v1/action/execute"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/action/execute');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "ids": [
                    "2c93808457d787030157e031d5844c53"
                ], 
                "synchronous": false, 
                "type": "InvoiceSplit"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"ids\": [\n        \"2c93808457d787030157e031d5844c53\"\n    ], \n    \"synchronous\": false, \n    \"type\": \"InvoiceSplit\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/action/execute")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"ids\": [\n        \"2c93808457d787030157e031d5844c53\"\n    ], \n    \"synchronous\": false, \n    \"type\": \"InvoiceSplit\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/action/execute", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/action/execute")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"ids\": [\n        \"2c93808457d787030157e031d5844c53\"\n    ], \n    \"synchronous\": false, \n    \"type\": \"InvoiceSplit\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/action/execute");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"ids\": [\n        \"2c93808457d787030157e031d5844c53\"\n    ], \n    \"synchronous\": false, \n    \"type\": \"InvoiceSplit\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/action/generate:
    post:
      description: |
        Generates an on-demand invoice for a specific customer. This is similar to creating an ad-hoc bill run for a specific customer account in the Zuora UI.

        * Supported objects: Invoice
        * Asynchronous process: yes

        The ID of the generated invoice is returned in the response. If multiple invoices are generated, only the id of the first invoice generated is returned. This occurs when an account has multiple subscriptions with the [invoice subscription separately](https://knowledgecenter.zuora.com/BC_Subscription_Management/Subscriptions/B_Creating_Subscriptions/Invoicing_Subscriptions_Separately) option enabled.
      operationId: Action_POSTgenerate
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_X_Zuora_WSDL_Version"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyActiongenerateRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    - Id: 2c93808457d787030157e0306cd13a86
                      Success: true
            application/json; charset=utf-8:
              schema:
                description: ""
                items:
                  $ref: "#/components/schemas/SaveResult"
                type: array
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Generate
      tags:
        - Actions
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "objects": [
                    {
                        "AccountId": "2c93808457d787030157e0306be53a75", 
                        "InvoiceDate": "2016-10-20", 
                        "TargetDate": "2016-10-20"
                    }
                ], 
                "type": "Invoice"
            }' "https://rest.zuora.com/v1/action/generate"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/action/generate');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "objects": [
                    {
                        "AccountId": "2c93808457d787030157e0306be53a75", 
                        "InvoiceDate": "2016-10-20", 
                        "TargetDate": "2016-10-20"
                    }
                ], 
                "type": "Invoice"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"objects\": [\n        {\n            \"AccountId\": \"2c93808457d787030157e0306be53a75\", \n            \"InvoiceDate\": \"2016-10-20\", \n            \"TargetDate\": \"2016-10-20\"\n        }\n    ], \n    \"type\": \"Invoice\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/action/generate")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"objects\": [\n        {\n            \"AccountId\": \"2c93808457d787030157e0306be53a75\", \n            \"InvoiceDate\": \"2016-10-20\", \n            \"TargetDate\": \"2016-10-20\"\n        }\n    ], \n    \"type\": \"Invoice\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/action/generate", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/action/generate")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"objects\": [\n        {\n            \"AccountId\": \"2c93808457d787030157e0306be53a75\", \n            \"InvoiceDate\": \"2016-10-20\", \n            \"TargetDate\": \"2016-10-20\"\n        }\n    ], \n    \"type\": \"Invoice\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/action/generate");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"objects\": [\n        {\n            \"AccountId\": \"2c93808457d787030157e0306be53a75\", \n            \"InvoiceDate\": \"2016-10-20\", \n            \"TargetDate\": \"2016-10-20\"\n        }\n    ], \n    \"type\": \"Invoice\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/action/query:
    post:
      description: |
        The query call sends a query expression by specifying the object to query, the fields to retrieve from that object, and any filters to determine whether a given object should be queried.


        You can use [Zuora Object Query Language](https://knowledgecenter.zuora.com/DC_Developers/K_Zuora_Object_Query_Language) (ZOQL) to construct those queries, passing them through the `queryString`.


        Once the call is made, the API executes the query against the specified object and returns a query response object to your application. Your application can then iterate through rows in the query response to retrieve information.

        ## Limitations 

        This call has the following limitations:

        * All ZOQL keywords must be in lower case.
        * The number of records returned is limited to 2000 records
        * The Invoice Settlement feature is not supported. This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement.
        * The default WSDL version for Actions is 79. To query objects or fields according to a different WSDL version, set the `X-Zuora-WSDL-Version` header. To find out in which WSDL version a particular object or field was introduced, see [Zuora SOAP API Version History](https://knowledgecenter.zuora.com/DC_Developers/G_SOAP_API/Zuora_SOAP_API_Version_History).
      operationId: Action_POSTquery
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_X_Zuora_WSDL_Version"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyActionqueryRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    done: true
                    records:
                      - AccountId: 2c93808457d787030157e032485b5131
                        AccountingCode: Accounts Receivable
                        AdjustmentDate: 2016-10-20
                        AdjustmentNumber: IIA-00000001
                        Amount: 1.2
                        Comment: this is comments
                        CreatedById: 2c93808457d787030157e032283c4fb2
                        CreatedDate: 2016-10-20T05:46:14.000+02:00
                        Id: 2c93808457d787030157e0324aea5158
                        InvoiceId: 2c93808457d787030157e03248c75142
                        InvoiceItemName: OneTime_Flat Fee Pricing1476935174089
                        InvoiceNumber: INV00000001
                        ReasonCode: Standard Adjustment
                        ReferenceId: refid-1476935174845
                        ServiceEndDate: 2016-10-20
                        ServiceStartDate: 2016-10-20
                        SourceId: 2c93808457d787030157e03248c95144
                        SourceType: InvoiceDetail
                        Status: Processed
                        Type: Credit
                        UpdatedById: 2c93808457d787030157e032283c4fb2
                        UpdatedDate: 2016-10-20T05:46:14.000+02:00
                    size: 1
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyActionqueryResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Query
      tags:
        - Actions
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "queryString": "select AccountId, AccountingCode, AdjustmentDate, AdjustmentNumber, Amount, CancelledById, CancelledDate, Comment, CreatedById, CreatedDate, InvoiceId, InvoiceItemName, InvoiceNumber, ReferenceId, ServiceEndDate, ServiceStartDate, SourceId, SourceType, Status, TransferredToAccounting, Type, UpdatedById, UpdatedDate, ReasonCode from InvoiceItemAdjustment where Id = '\''2c93808457d787030157e0324aea5158'\''"
            }' "https://rest.zuora.com/v1/action/query"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/action/query');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "queryString": "select AccountId, AccountingCode, AdjustmentDate, AdjustmentNumber, Amount, CancelledById, CancelledDate, Comment, CreatedById, CreatedDate, InvoiceId, InvoiceItemName, InvoiceNumber, ReferenceId, ServiceEndDate, ServiceStartDate, SourceId, SourceType, Status, TransferredToAccounting, Type, UpdatedById, UpdatedDate, ReasonCode from InvoiceItemAdjustment where Id = \'2c93808457d787030157e0324aea5158\'"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"queryString\": \"select AccountId, AccountingCode, AdjustmentDate, AdjustmentNumber, Amount, CancelledById, CancelledDate, Comment, CreatedById, CreatedDate, InvoiceId, InvoiceItemName, InvoiceNumber, ReferenceId, ServiceEndDate, ServiceStartDate, SourceId, SourceType, Status, TransferredToAccounting, Type, UpdatedById, UpdatedDate, ReasonCode from InvoiceItemAdjustment where Id = '2c93808457d787030157e0324aea5158'\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/action/query")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"queryString\": \"select AccountId, AccountingCode, AdjustmentDate, AdjustmentNumber, Amount, CancelledById, CancelledDate, Comment, CreatedById, CreatedDate, InvoiceId, InvoiceItemName, InvoiceNumber, ReferenceId, ServiceEndDate, ServiceStartDate, SourceId, SourceType, Status, TransferredToAccounting, Type, UpdatedById, UpdatedDate, ReasonCode from InvoiceItemAdjustment where Id = '2c93808457d787030157e0324aea5158'\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/action/query", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/action/query")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"queryString\": \"select AccountId, AccountingCode, AdjustmentDate, AdjustmentNumber, Amount, CancelledById, CancelledDate, Comment, CreatedById, CreatedDate, InvoiceId, InvoiceItemName, InvoiceNumber, ReferenceId, ServiceEndDate, ServiceStartDate, SourceId, SourceType, Status, TransferredToAccounting, Type, UpdatedById, UpdatedDate, ReasonCode from InvoiceItemAdjustment where Id = '2c93808457d787030157e0324aea5158'\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/action/query");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"queryString\": \"select AccountId, AccountingCode, AdjustmentDate, AdjustmentNumber, Amount, CancelledById, CancelledDate, Comment, CreatedById, CreatedDate, InvoiceId, InvoiceItemName, InvoiceNumber, ReferenceId, ServiceEndDate, ServiceStartDate, SourceId, SourceType, Status, TransferredToAccounting, Type, UpdatedById, UpdatedDate, ReasonCode from InvoiceItemAdjustment where Id = '2c93808457d787030157e0324aea5158'\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/action/queryMore:
    post:
      description: |
        Use queryMore to request additional results from a previous query call. If your initial query call returns more than 2000 results, you can use queryMore to query for the additional results.


        Any `queryLocator` results greater than 2,000, will only be stored by Zuora for 5 days before it is deleted.


         This call sends a request for additional results from an initial query call. If the initial query call returns more than 2000 results, you can use the `queryLocator` returned from query to request the next set of results.


        **Note:** Zuora expires queryMore cursors after 15 minutes of activity.


        To use queryMore, you first construct a query call. By default, the query call will return up to 2000 results. If there are more than 2000 results, query will return a boolean `done`, which will be marked as `false`, and a `queryLocator`, which is a marker you will pass to queryMore to get the next set of results.
      operationId: Action_POSTqueryMore
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_X_Zuora_WSDL_Version"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyActionqueryMoreRequest"
        required: true
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyActionqueryMoreResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: QueryMore
      tags:
        - Actions
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "queryLocator": "2c92c0f9602fb240016049ac7e0b47e7-2000"
            }' "https://rest.zuora.com/v1/action/queryMore"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/action/queryMore');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "queryLocator": "2c92c0f9602fb240016049ac7e0b47e7-2000"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"queryLocator\": \"2c92c0f9602fb240016049ac7e0b47e7-2000\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/action/queryMore")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"queryLocator\": \"2c92c0f9602fb240016049ac7e0b47e7-2000\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/action/queryMore", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/action/queryMore")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"queryLocator\": \"2c92c0f9602fb240016049ac7e0b47e7-2000\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/action/queryMore");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"queryLocator\": \"2c92c0f9602fb240016049ac7e0b47e7-2000\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/action/subscribe:
    post:
      description: |
        This call performs many actions.  Use the subscribe call to bundle information required to create at least one new subscription.

        The call takes in an array of SubscribeRequests. Because it takes an array, you can submit a batch of subscription requests at once. You can create up to 50 different subscriptions in a single subscribe call.

        This is a combined call that you can use to perform all of the following tasks in a single call:

        * Create accounts
        * Create contacts
        * Create payment methods, including external payment options
        * Create an invoice for the subscription
        * Apply the first payment to a subscription

        ## Object Limits 
        50 objects are supported in a single call.



        ## Effective Date
        If the effective date is in the future, the invoices will not be generated, and there will be no invoice number.

        ## Subscription Name, Number, and ID 
        ### Subscription Name and Number 
        The subscription name is a unique identifier for the subscription. If you do not specify a value for the name, Zuora will create one automatically. The automatically generated value is known as the subscription number, such as `A-S00000080`. You cannot change the subscription name or number after creating the subscription. 

        * **Subscription name**: The name that you set for the subscription.
        * **Subscription number**: The value generated by Zuora automatically if you do not specify a subscription name. 

        Both the subscription name and number must be unique. If they are not, an error will occur.

        ### Subscription ID 
        The subscription ID is a 32-digit ID in the format 4028xxxx. This is also the unique identifier for a subscription. This value is automatically generated by the system and cannot be edited or updated, but it can be queried. One subscription can have only one subscription name or number, but it can have multiple IDs: Each version of a subscription has a different ID.

        The Subscription object contains the fields `OriginalId` and `PreviousSubscriptionId`. `OriginalId` is the ID for the first version of a subscription. `PreviousSubscriptionId` is the ID of the version created immediately prior to the current version.

        ## Subscription Preview 
        You can preview invoices that would be generated by the subscribe call. 

        When previewing invoices with the subscribe call, the correspondinig Contract Effective, Service Activation, or Customer Acceptance date is required if the subscription contains a charge with its trigger event being set as `ContractEffectiveDate`, `ServiceActivationDate`, or `CustomerAcceptanceDate`.


        ## Invoice Subscriptions Separately
        If you have enabled the invoice subscriptions separately feature, a subscribe call will generate an invoice for each subscription for every subscription where the field `IsInvoiceSeparate` is set to `true`.

        If the invoice subscriptions separately feature is disabled, a subscribe call will generate a single invoice for all subscriptions.

        See [Invoicing Subscriptions Separately](https://knowledgecenter.zuora.com/BC_Subscription_Management/Subscriptions/B_Creating_Subscriptions/Invoicing_Subscriptions_Separately) for more information.

        ## Subscriptions and Draft Invoices 
        If a draft invoice that includes charges exists in a customer account, using the subscribe call to create a new subscription and generate an invoice will cause the new subscription to be added to the existing draft invoice. Zuora will then post the invoice. 

        ## When to Use Subscribe and Create Calls 
        You can use either the subscribe call or the create call to create the objects associated with a subscription (accounts, contacts, and so on). There are differences between these calls, however, and some situations are better for one or the other.

        ### Use the Subscribe Call 
        The subscribe call bundles up all the information you need for a subscription. Use the subscribe call to create new subscriptions when you have all the information you need.

        Subscribe calls cannot update BillTo, SoldTo, and Account objects. Payment information objects cannot be updated if there is an existing account ID in the call. These objects are not supported in a subscribe call.

        ### Use the Create Call 
        The create call is more useful when you want to develop in stages. For example, if you want to first create an account, then a contact, and so on. If you do not have all information available, use the create call. To create a subscription, you must activate the account from Draft status to Active by calling the subscribe call.
      operationId: Action_POSTsubscribe
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_X_Zuora_WSDL_Version"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyActionsubscribeRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    - AccountId: 2c92c0f968e566ad0168ef36f27d057c
                      AccountNumber: A00000085
                      InvoiceId: 2c92c0f968e566ad0168ef36f33a0591
                      InvoiceNumber: INV00000536
                      InvoiceResult:
                        Invoice:
                          - Id: 2c92c0f968e566ad0168ef36f33a0591
                            InvoiceNumber: INV00000536
                      SubscriptionId: 2c92c0f968e566ad0168ef36f29a057f
                      SubscriptionNumber: A-S00000213
                      Success: true
                      TotalMrr: 0
                      TotalTcv: 100
            application/json; charset=utf-8:
              schema:
                description: ""
                items:
                  $ref: "#/components/schemas/SubscribeResult"
                type: array
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Subscribe
      tags:
        - Actions
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "subscribes": [
                    {
                        "Account": {
                            "AccountNumber": "A00000085", 
                            "AutoPay": false, 
                            "Batch": "Batch1", 
                            "BillCycleDay": 1, 
                            "Currency": "USD", 
                            "Name": "West Corporation", 
                            "PaymentTerm": "Due Upon Receipt"
                        }, 
                        "BillToContact": {
                            "Address1": "312 2nd Ave W", 
                            "City": "Seattle", 
                            "Country": "United States", 
                            "FirstName": "Sarah", 
                            "LastName": "Smith", 
                            "PostalCode": "98119", 
                            "State": "Washington", 
                            "WorkEmail": "sarah@example.com"
                        }, 
                        "PaymentMethod": {
                            "CreditCardAddress1": "312 2nd Ave W", 
                            "CreditCardCity": "Seattle", 
                            "CreditCardCountry": "United States", 
                            "CreditCardExpirationMonth": 12, 
                            "CreditCardExpirationYear": 2020, 
                            "CreditCardHolderName": "Ms Sarah Smith", 
                            "CreditCardNumber": "4111111111111111", 
                            "CreditCardPostalCode": "98119", 
                            "CreditCardState": "Washington", 
                            "CreditCardType": "Visa", 
                            "Type": "CreditCard"
                        }, 
                        "SubscribeOptions": {
                            "GenerateInvoice": true, 
                            "ProcessPayments": false
                        }, 
                        "SubscriptionData": {
                            "RatePlanData": [
                                {
                                    "RatePlan": {
                                        "ProductRatePlanId": "2c92c0f966537bf001666218919620cc"
                                    }, 
                                    "RatePlanChargeData": [
                                        {
                                            "RatePlanCharge": {
                                                "ChargeModel": "Discount-Percentage", 
                                                "DiscountPercentage": "6.75", 
                                                "ProductRatePlanChargeId": "2c92c0f866536da301666222643809b4", 
                                                "Quantity": 200
                                            }
                                        }
                                    ]
                                }
                            ], 
                            "Subscription": {
                                "AutoRenew": true, 
                                "ContractAcceptanceDate": "2019-02-15", 
                                "ContractEffectiveDate": "2019-02-15", 
                                "InitialTerm": 12, 
                                "RenewalTerm": 6, 
                                "ServiceActivationDate": "2019-02-15", 
                                "TermType": "TERMED"
                            }
                        }
                    }
                ]
            }' "https://rest.zuora.com/v1/action/subscribe"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/action/subscribe');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "subscribes": [
                    {
                        "Account": {
                            "AccountNumber": "A00000085", 
                            "AutoPay": false, 
                            "Batch": "Batch1", 
                            "BillCycleDay": 1, 
                            "Currency": "USD", 
                            "Name": "West Corporation", 
                            "PaymentTerm": "Due Upon Receipt"
                        }, 
                        "BillToContact": {
                            "Address1": "312 2nd Ave W", 
                            "City": "Seattle", 
                            "Country": "United States", 
                            "FirstName": "Sarah", 
                            "LastName": "Smith", 
                            "PostalCode": "98119", 
                            "State": "Washington", 
                            "WorkEmail": "sarah@example.com"
                        }, 
                        "PaymentMethod": {
                            "CreditCardAddress1": "312 2nd Ave W", 
                            "CreditCardCity": "Seattle", 
                            "CreditCardCountry": "United States", 
                            "CreditCardExpirationMonth": 12, 
                            "CreditCardExpirationYear": 2020, 
                            "CreditCardHolderName": "Ms Sarah Smith", 
                            "CreditCardNumber": "4111111111111111", 
                            "CreditCardPostalCode": "98119", 
                            "CreditCardState": "Washington", 
                            "CreditCardType": "Visa", 
                            "Type": "CreditCard"
                        }, 
                        "SubscribeOptions": {
                            "GenerateInvoice": true, 
                            "ProcessPayments": false
                        }, 
                        "SubscriptionData": {
                            "RatePlanData": [
                                {
                                    "RatePlan": {
                                        "ProductRatePlanId": "2c92c0f966537bf001666218919620cc"
                                    }, 
                                    "RatePlanChargeData": [
                                        {
                                            "RatePlanCharge": {
                                                "ChargeModel": "Discount-Percentage", 
                                                "DiscountPercentage": "6.75", 
                                                "ProductRatePlanChargeId": "2c92c0f866536da301666222643809b4", 
                                                "Quantity": 200
                                            }
                                        }
                                    ]
                                }
                            ], 
                            "Subscription": {
                                "AutoRenew": true, 
                                "ContractAcceptanceDate": "2019-02-15", 
                                "ContractEffectiveDate": "2019-02-15", 
                                "InitialTerm": 12, 
                                "RenewalTerm": 6, 
                                "ServiceActivationDate": "2019-02-15", 
                                "TermType": "TERMED"
                            }
                        }
                    }
                ]
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"subscribes\": [\n        {\n            \"Account\": {\n                \"AccountNumber\": \"A00000085\", \n                \"AutoPay\": false, \n                \"Batch\": \"Batch1\", \n                \"BillCycleDay\": 1, \n                \"Currency\": \"USD\", \n                \"Name\": \"West Corporation\", \n                \"PaymentTerm\": \"Due Upon Receipt\"\n            }, \n            \"BillToContact\": {\n                \"Address1\": \"312 2nd Ave W\", \n                \"City\": \"Seattle\", \n                \"Country\": \"United States\", \n                \"FirstName\": \"Sarah\", \n                \"LastName\": \"Smith\", \n                \"PostalCode\": \"98119\", \n                \"State\": \"Washington\", \n                \"WorkEmail\": \"sarah@example.com\"\n            }, \n            \"PaymentMethod\": {\n                \"CreditCardAddress1\": \"312 2nd Ave W\", \n                \"CreditCardCity\": \"Seattle\", \n                \"CreditCardCountry\": \"United States\", \n                \"CreditCardExpirationMonth\": 12, \n                \"CreditCardExpirationYear\": 2020, \n                \"CreditCardHolderName\": \"Ms Sarah Smith\", \n                \"CreditCardNumber\": \"4111111111111111\", \n                \"CreditCardPostalCode\": \"98119\", \n                \"CreditCardState\": \"Washington\", \n                \"CreditCardType\": \"Visa\", \n                \"Type\": \"CreditCard\"\n            }, \n            \"SubscribeOptions\": {\n                \"GenerateInvoice\": true, \n                \"ProcessPayments\": false\n            }, \n            \"SubscriptionData\": {\n                \"RatePlanData\": [\n                    {\n                        \"RatePlan\": {\n                            \"ProductRatePlanId\": \"2c92c0f966537bf001666218919620cc\"\n                        }, \n                        \"RatePlanChargeData\": [\n                            {\n                                \"RatePlanCharge\": {\n                                    \"ChargeModel\": \"Discount-Percentage\", \n                                    \"DiscountPercentage\": \"6.75\", \n                                    \"ProductRatePlanChargeId\": \"2c92c0f866536da301666222643809b4\", \n                                    \"Quantity\": 200\n                                }\n                            }\n                        ]\n                    }\n                ], \n                \"Subscription\": {\n                    \"AutoRenew\": true, \n                    \"ContractAcceptanceDate\": \"2019-02-15\", \n                    \"ContractEffectiveDate\": \"2019-02-15\", \n                    \"InitialTerm\": 12, \n                    \"RenewalTerm\": 6, \n                    \"ServiceActivationDate\": \"2019-02-15\", \n                    \"TermType\": \"TERMED\"\n                }\n            }\n        }\n    ]\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/action/subscribe")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"subscribes\": [\n        {\n            \"Account\": {\n                \"AccountNumber\": \"A00000085\", \n                \"AutoPay\": false, \n                \"Batch\": \"Batch1\", \n                \"BillCycleDay\": 1, \n                \"Currency\": \"USD\", \n                \"Name\": \"West Corporation\", \n                \"PaymentTerm\": \"Due Upon Receipt\"\n            }, \n            \"BillToContact\": {\n                \"Address1\": \"312 2nd Ave W\", \n                \"City\": \"Seattle\", \n                \"Country\": \"United States\", \n                \"FirstName\": \"Sarah\", \n                \"LastName\": \"Smith\", \n                \"PostalCode\": \"98119\", \n                \"State\": \"Washington\", \n                \"WorkEmail\": \"sarah@example.com\"\n            }, \n            \"PaymentMethod\": {\n                \"CreditCardAddress1\": \"312 2nd Ave W\", \n                \"CreditCardCity\": \"Seattle\", \n                \"CreditCardCountry\": \"United States\", \n                \"CreditCardExpirationMonth\": 12, \n                \"CreditCardExpirationYear\": 2020, \n                \"CreditCardHolderName\": \"Ms Sarah Smith\", \n                \"CreditCardNumber\": \"4111111111111111\", \n                \"CreditCardPostalCode\": \"98119\", \n                \"CreditCardState\": \"Washington\", \n                \"CreditCardType\": \"Visa\", \n                \"Type\": \"CreditCard\"\n            }, \n            \"SubscribeOptions\": {\n                \"GenerateInvoice\": true, \n                \"ProcessPayments\": false\n            }, \n            \"SubscriptionData\": {\n                \"RatePlanData\": [\n                    {\n                        \"RatePlan\": {\n                            \"ProductRatePlanId\": \"2c92c0f966537bf001666218919620cc\"\n                        }, \n                        \"RatePlanChargeData\": [\n                            {\n                                \"RatePlanCharge\": {\n                                    \"ChargeModel\": \"Discount-Percentage\", \n                                    \"DiscountPercentage\": \"6.75\", \n                                    \"ProductRatePlanChargeId\": \"2c92c0f866536da301666222643809b4\", \n                                    \"Quantity\": 200\n                                }\n                            }\n                        ]\n                    }\n                ], \n                \"Subscription\": {\n                    \"AutoRenew\": true, \n                    \"ContractAcceptanceDate\": \"2019-02-15\", \n                    \"ContractEffectiveDate\": \"2019-02-15\", \n                    \"InitialTerm\": 12, \n                    \"RenewalTerm\": 6, \n                    \"ServiceActivationDate\": \"2019-02-15\", \n                    \"TermType\": \"TERMED\"\n                }\n            }\n        }\n    ]\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/action/subscribe", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/action/subscribe")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"subscribes\": [\n        {\n            \"Account\": {\n                \"AccountNumber\": \"A00000085\", \n                \"AutoPay\": false, \n                \"Batch\": \"Batch1\", \n                \"BillCycleDay\": 1, \n                \"Currency\": \"USD\", \n                \"Name\": \"West Corporation\", \n                \"PaymentTerm\": \"Due Upon Receipt\"\n            }, \n            \"BillToContact\": {\n                \"Address1\": \"312 2nd Ave W\", \n                \"City\": \"Seattle\", \n                \"Country\": \"United States\", \n                \"FirstName\": \"Sarah\", \n                \"LastName\": \"Smith\", \n                \"PostalCode\": \"98119\", \n                \"State\": \"Washington\", \n                \"WorkEmail\": \"sarah@example.com\"\n            }, \n            \"PaymentMethod\": {\n                \"CreditCardAddress1\": \"312 2nd Ave W\", \n                \"CreditCardCity\": \"Seattle\", \n                \"CreditCardCountry\": \"United States\", \n                \"CreditCardExpirationMonth\": 12, \n                \"CreditCardExpirationYear\": 2020, \n                \"CreditCardHolderName\": \"Ms Sarah Smith\", \n                \"CreditCardNumber\": \"4111111111111111\", \n                \"CreditCardPostalCode\": \"98119\", \n                \"CreditCardState\": \"Washington\", \n                \"CreditCardType\": \"Visa\", \n                \"Type\": \"CreditCard\"\n            }, \n            \"SubscribeOptions\": {\n                \"GenerateInvoice\": true, \n                \"ProcessPayments\": false\n            }, \n            \"SubscriptionData\": {\n                \"RatePlanData\": [\n                    {\n                        \"RatePlan\": {\n                            \"ProductRatePlanId\": \"2c92c0f966537bf001666218919620cc\"\n                        }, \n                        \"RatePlanChargeData\": [\n                            {\n                                \"RatePlanCharge\": {\n                                    \"ChargeModel\": \"Discount-Percentage\", \n                                    \"DiscountPercentage\": \"6.75\", \n                                    \"ProductRatePlanChargeId\": \"2c92c0f866536da301666222643809b4\", \n                                    \"Quantity\": 200\n                                }\n                            }\n                        ]\n                    }\n                ], \n                \"Subscription\": {\n                    \"AutoRenew\": true, \n                    \"ContractAcceptanceDate\": \"2019-02-15\", \n                    \"ContractEffectiveDate\": \"2019-02-15\", \n                    \"InitialTerm\": 12, \n                    \"RenewalTerm\": 6, \n                    \"ServiceActivationDate\": \"2019-02-15\", \n                    \"TermType\": \"TERMED\"\n                }\n            }\n        }\n    ]\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/action/subscribe");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"subscribes\": [\n        {\n            \"Account\": {\n                \"AccountNumber\": \"A00000085\", \n                \"AutoPay\": false, \n                \"Batch\": \"Batch1\", \n                \"BillCycleDay\": 1, \n                \"Currency\": \"USD\", \n                \"Name\": \"West Corporation\", \n                \"PaymentTerm\": \"Due Upon Receipt\"\n            }, \n            \"BillToContact\": {\n                \"Address1\": \"312 2nd Ave W\", \n                \"City\": \"Seattle\", \n                \"Country\": \"United States\", \n                \"FirstName\": \"Sarah\", \n                \"LastName\": \"Smith\", \n                \"PostalCode\": \"98119\", \n                \"State\": \"Washington\", \n                \"WorkEmail\": \"sarah@example.com\"\n            }, \n            \"PaymentMethod\": {\n                \"CreditCardAddress1\": \"312 2nd Ave W\", \n                \"CreditCardCity\": \"Seattle\", \n                \"CreditCardCountry\": \"United States\", \n                \"CreditCardExpirationMonth\": 12, \n                \"CreditCardExpirationYear\": 2020, \n                \"CreditCardHolderName\": \"Ms Sarah Smith\", \n                \"CreditCardNumber\": \"4111111111111111\", \n                \"CreditCardPostalCode\": \"98119\", \n                \"CreditCardState\": \"Washington\", \n                \"CreditCardType\": \"Visa\", \n                \"Type\": \"CreditCard\"\n            }, \n            \"SubscribeOptions\": {\n                \"GenerateInvoice\": true, \n                \"ProcessPayments\": false\n            }, \n            \"SubscriptionData\": {\n                \"RatePlanData\": [\n                    {\n                        \"RatePlan\": {\n                            \"ProductRatePlanId\": \"2c92c0f966537bf001666218919620cc\"\n                        }, \n                        \"RatePlanChargeData\": [\n                            {\n                                \"RatePlanCharge\": {\n                                    \"ChargeModel\": \"Discount-Percentage\", \n                                    \"DiscountPercentage\": \"6.75\", \n                                    \"ProductRatePlanChargeId\": \"2c92c0f866536da301666222643809b4\", \n                                    \"Quantity\": 200\n                                }\n                            }\n                        ]\n                    }\n                ], \n                \"Subscription\": {\n                    \"AutoRenew\": true, \n                    \"ContractAcceptanceDate\": \"2019-02-15\", \n                    \"ContractEffectiveDate\": \"2019-02-15\", \n                    \"InitialTerm\": 12, \n                    \"RenewalTerm\": 6, \n                    \"ServiceActivationDate\": \"2019-02-15\", \n                    \"TermType\": \"TERMED\"\n                }\n            }\n        }\n    ]\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/action/update:
    post:
      description: |
        
        Updates the information in one or more objects of the same type. You can specify different types of objects in different update calls, but each specific update call must apply to only one type of object.

        You can update an array of one or more zObjects. It returns an array of SaveResults, indicating the success or failure of updating each object. The following information applies to this call:

        * You cannot pass in null zObjects.
        * You can pass in a maximum of 50 zObjects at a time.
        * All objects must be of the same type.
        * For each field in each object, you must determine that object's ID. Then populate the fields that you want update with the new information.
        * Zuora ignores unrecognized fields in update calls. For example, if an optional field is spelled incorrectly or a field that does not exist is specified, Zuora ignores the field and continues to process the call. No error message is returned for unrecognized fields.

        ## Limitations 

        This call has the following limitations:

        * A maximum of 50 objects are supported in a single call.
        * The Invoice Settlement feature is not supported. This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement.
        * The default WSDL version for Actions is 79. To update objects or fields according to a different WSDL version, set the `X-Zuora-WSDL-Version` header. To find out in which WSDL version a particular object or field was introduced, see [Zuora SOAP API Version History](https://knowledgecenter.zuora.com/DC_Developers/G_SOAP_API/Zuora_SOAP_API_Version_History).
      operationId: Action_POSTupdate
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_X_Zuora_WSDL_Version"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyActionupdateRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    - Id: 2c93808457d787030157e0321fdf4fab
                      Success: true
            application/json; charset=utf-8:
              schema:
                description: ""
                items:
                  $ref: "#/components/schemas/SaveResult"
                type: array
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Update
      tags:
        - Actions
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "objects": [
                    {
                        "AccountNumber": "AN_1476935163869", 
                        "AutoPay": true, 
                        "Batch": "Batch1", 
                        "BillCycleDay": 1, 
                        "BillToId": "2c93808457d787030157e03220684fac", 
                        "CrmId": "crmid", 
                        "Currency": "USD", 
                        "DefaultPaymentMethodId": "2c93808457d787030157e03220ec4fad", 
                        "Id": "2c93808457d787030157e0321fdf4fab", 
                        "InvoiceTemplateId": "2c93808457d787030157e03208864f97", 
                        "Name": "AC_1476935163869", 
                        "Notes": "this is notes", 
                        "PaymentTerm": "Due Upon Receipt", 
                        "SoldToId": "2c93808457d787030157e03220684fac", 
                        "Status": "Active"
                    }
                ], 
                "type": "Account"
            }' "https://rest.zuora.com/v1/action/update"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/action/update');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "objects": [
                    {
                        "AccountNumber": "AN_1476935163869", 
                        "AutoPay": true, 
                        "Batch": "Batch1", 
                        "BillCycleDay": 1, 
                        "BillToId": "2c93808457d787030157e03220684fac", 
                        "CrmId": "crmid", 
                        "Currency": "USD", 
                        "DefaultPaymentMethodId": "2c93808457d787030157e03220ec4fad", 
                        "Id": "2c93808457d787030157e0321fdf4fab", 
                        "InvoiceTemplateId": "2c93808457d787030157e03208864f97", 
                        "Name": "AC_1476935163869", 
                        "Notes": "this is notes", 
                        "PaymentTerm": "Due Upon Receipt", 
                        "SoldToId": "2c93808457d787030157e03220684fac", 
                        "Status": "Active"
                    }
                ], 
                "type": "Account"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"objects\": [\n        {\n            \"AccountNumber\": \"AN_1476935163869\", \n            \"AutoPay\": true, \n            \"Batch\": \"Batch1\", \n            \"BillCycleDay\": 1, \n            \"BillToId\": \"2c93808457d787030157e03220684fac\", \n            \"CrmId\": \"crmid\", \n            \"Currency\": \"USD\", \n            \"DefaultPaymentMethodId\": \"2c93808457d787030157e03220ec4fad\", \n            \"Id\": \"2c93808457d787030157e0321fdf4fab\", \n            \"InvoiceTemplateId\": \"2c93808457d787030157e03208864f97\", \n            \"Name\": \"AC_1476935163869\", \n            \"Notes\": \"this is notes\", \n            \"PaymentTerm\": \"Due Upon Receipt\", \n            \"SoldToId\": \"2c93808457d787030157e03220684fac\", \n            \"Status\": \"Active\"\n        }\n    ], \n    \"type\": \"Account\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/action/update")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"objects\": [\n        {\n            \"AccountNumber\": \"AN_1476935163869\", \n            \"AutoPay\": true, \n            \"Batch\": \"Batch1\", \n            \"BillCycleDay\": 1, \n            \"BillToId\": \"2c93808457d787030157e03220684fac\", \n            \"CrmId\": \"crmid\", \n            \"Currency\": \"USD\", \n            \"DefaultPaymentMethodId\": \"2c93808457d787030157e03220ec4fad\", \n            \"Id\": \"2c93808457d787030157e0321fdf4fab\", \n            \"InvoiceTemplateId\": \"2c93808457d787030157e03208864f97\", \n            \"Name\": \"AC_1476935163869\", \n            \"Notes\": \"this is notes\", \n            \"PaymentTerm\": \"Due Upon Receipt\", \n            \"SoldToId\": \"2c93808457d787030157e03220684fac\", \n            \"Status\": \"Active\"\n        }\n    ], \n    \"type\": \"Account\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/action/update", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/action/update")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"objects\": [\n        {\n            \"AccountNumber\": \"AN_1476935163869\", \n            \"AutoPay\": true, \n            \"Batch\": \"Batch1\", \n            \"BillCycleDay\": 1, \n            \"BillToId\": \"2c93808457d787030157e03220684fac\", \n            \"CrmId\": \"crmid\", \n            \"Currency\": \"USD\", \n            \"DefaultPaymentMethodId\": \"2c93808457d787030157e03220ec4fad\", \n            \"Id\": \"2c93808457d787030157e0321fdf4fab\", \n            \"InvoiceTemplateId\": \"2c93808457d787030157e03208864f97\", \n            \"Name\": \"AC_1476935163869\", \n            \"Notes\": \"this is notes\", \n            \"PaymentTerm\": \"Due Upon Receipt\", \n            \"SoldToId\": \"2c93808457d787030157e03220684fac\", \n            \"Status\": \"Active\"\n        }\n    ], \n    \"type\": \"Account\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/action/update");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"objects\": [\n        {\n            \"AccountNumber\": \"AN_1476935163869\", \n            \"AutoPay\": true, \n            \"Batch\": \"Batch1\", \n            \"BillCycleDay\": 1, \n            \"BillToId\": \"2c93808457d787030157e03220684fac\", \n            \"CrmId\": \"crmid\", \n            \"Currency\": \"USD\", \n            \"DefaultPaymentMethodId\": \"2c93808457d787030157e03220ec4fad\", \n            \"Id\": \"2c93808457d787030157e0321fdf4fab\", \n            \"InvoiceTemplateId\": \"2c93808457d787030157e03208864f97\", \n            \"Name\": \"AC_1476935163869\", \n            \"Notes\": \"this is notes\", \n            \"PaymentTerm\": \"Due Upon Receipt\", \n            \"SoldToId\": \"2c93808457d787030157e03220684fac\", \n            \"Status\": \"Active\"\n        }\n    ], \n    \"type\": \"Account\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/amendments/subscriptions/{subscription-id}":
    get:
      description: Retrieves detailed information about the amendment with the specified subscription.
      operationId: GET_AmendmentsBySubscriptionID
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: The ID of the subscription whose amendment changes you want to retrieve.
          in: path
          name: subscription-id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    autoRenew: false
                    baseRatePlanId: null
                    baseSubscriptionId: 402896a9529c100a01529c2f2cc30010
                    code: A-AM00000002
                    contractEffectiveDate: 2016-02-01
                    currentTerm: 2
                    currentTermPeriodType: Month
                    customerAcceptanceDate: 2016-02-01
                    description: just for test
                    destinationAccountId: 402896a9529bc3dc01529bcba7120023
                    destinationInvoiceOwnerId: 402896a9529bc3dc01529bcba7120023
                    effectiveDate: 2016-02-01
                    id: 402896a9529c100a01529c30e26a0018
                    name: testAmendment
                    newRatePlanId: null
                    newSubscriptionId: 402896a9529c100a01529c311930001d
                    renewalSetting: RENEW_WITH_SPECIFIC_TERM
                    renewalTerm: 1
                    renewalTermPeriodType: Month
                    serviceActivationDate: 2016-02-01
                    specificUpdateDate: null
                    status: Completed
                    success: true
                    termStartDate: 2015-12-31
                    termType: TERMED
                    type: TermsAndConditions
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETAmendmentType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List all amendments of a subscription
      tags:
        - Amendments
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/amendments/subscriptions/{subscription-id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/amendments/subscriptions/{subscription-id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/amendments/subscriptions/{subscription-id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/amendments/subscriptions/{subscription-id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/amendments/subscriptions/{subscription-id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/amendments/subscriptions/{subscription-id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/amendments/{amendment-key}":
    get:
      description: Retrieves detailed information about the specified subscription amendment.
      operationId: GET_AmendmentsByKey
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: Can be the amendment ID or the amendment code.
          in: path
          name: amendment-key
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    autoRenew: false
                    baseRatePlanId: null
                    baseSubscriptionId: 402896a9529c100a01529c2f2cc30010
                    code: A-AM00000002
                    contractEffectiveDate: 2016-02-01
                    currentTerm: 2
                    currentTermPeriodType: Month
                    customerAcceptanceDate: 2016-02-01
                    description: just for test
                    destinationAccountId: 402896a9529bc3dc01529bcba7120023
                    destinationInvoiceOwnerId: 402896a9529bc3dc01529bcba7120023
                    effectiveDate: 2016-02-01
                    id: 402896a9529c100a01529c30e26a0018
                    name: testAmendment
                    newRatePlanId: null
                    newSubscriptionId: 402896a9529c100a01529c311930001d
                    renewalSetting: RENEW_WITH_SPECIFIC_TERM
                    renewalTerm: 1
                    renewalTermPeriodType: Month
                    serviceActivationDate: 2016-02-01
                    specificUpdateDate: null
                    status: Completed
                    success: true
                    termStartDate: 2015-12-31
                    termType: TERMED
                    type: TermsAndConditions
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETAmendmentType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve an amendment
      tags:
        - Amendments
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/amendments/{amendment-key}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/amendments/{amendment-key}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/amendments/{amendment-key}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/amendments/{amendment-key}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/amendments/{amendment-key}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/amendments/{amendment-key}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/async-jobs/{jobId}":
    get:
      description: |
        **Note:** This operation is only available if you have the [Orders](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AA_Overview_of_Orders#Orders) feature enabled. Orders is now generally available as of Zuora Billing Release 284 (August 2020). If you are an existing Zuora Subscribe and Amend customer and want to adopt Orders, see [What is Orders Harmonization](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Orders_Harmonization/Orders_Harmonization#What_is_Orders_Harmonization.3F) and join the [Orders Harmonization community group](https://community.zuora.com/t5/Orders-Harmonization/gp-p/Orders-Harmonization) for more information. If you want to enable Orders, submit a request at [Zuora Global Support](https://support.zuora.com/).

        **Note:** The [Order Line Items](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Line_Items/AA_Overview_of_Order_Line_Items) feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. If you want to join this early adopter program, submit a request at [Zuora Global Support](https://support.zuora.com/).

        Get the status and response of an asynchronous job. Currently, an asynchronous job created by "Create an order asynchronously" or "Preview an order asynchronously" is supported.
      operationId: GET_JobStatusAndResponse
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: UUID of the asynchronous job created by an asynchronous API operation.
          in: path
          name: jobId
          required: true
          schema:
            format: UUID
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    errors: null
                    result:
                      accountNumber: A00000001
                      invoiceNumbers:
                        - INV00000001
                      orderLineItems:
                        - id: bd78c052-2adf-42c2-aa0f-ccacc997fa20
                          itemNumber: "116"
                      orderNumber: OM-00002
                      paidAmount: 300
                      paymentNumber: P-00000002
                      status: Pending
                      subscriptions:
                        - status: Pending Activation
                          subscriptionNumber: SM-00001
                        - status: Pending Acceptance
                          subscriptionNumber: SM-00002
                        - status: Active
                          subscriptionNumber: SM-00003
                        - status: Pending Acceptance
                          subscriptionNumber: SM-00004
                      success: true
                    status: Completed
                    success: true
            application/json; charset=utf-8:
              schema:
                properties:
                  errors:
                    description: Error messages returned if the job failed.
                    type: string
                  result:
                    $ref: "#/components/schemas/JobResult"
                  status:
                    description: Type of job status.
                    enum:
                      - Processing
                      - Failed
                      - Completed
                    type: string
                  success:
                    description: Indicates whether the operation call succeeded.
                    type: boolean
                type: object
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve the status and response of a job
      tags:
        - Orders
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/async-jobs/{jobId}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/async-jobs/{jobId}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/async-jobs/{jobId}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/async-jobs/{jobId}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/async-jobs/{jobId}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/async-jobs/{jobId}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  /v1/async/orders:
    post:
      description: |
        **Note:** This operation is only available if you have the [Orders](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AA_Overview_of_Orders#Orders) feature enabled. Orders is now generally available as of Zuora Billing Release 284 (August 2020). If you are an existing Zuora Subscribe and Amend customer and want to adopt Orders, see [What is Orders Harmonization](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Orders_Harmonization/Orders_Harmonization#What_is_Orders_Harmonization.3F) and join the [Orders Harmonization community group](https://community.zuora.com/t5/Orders-Harmonization/gp-p/Orders-Harmonization) for more information. If you want to enable Orders, submit a request at [Zuora Global Support](https://support.zuora.com/).

        **Note:** The [Order Line Items](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Line_Items/AA_Overview_of_Order_Line_Items) feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. If you want to join this early adopter program, submit a request at [Zuora Global Support](https://support.zuora.com/).


        In the case where a normal "Create an order" operation call will time out, use this operation instead to create an order asynchronously. A job will be creating the order in the back end; the job ID will be returned for tracking the job status and result. 

        The limit of orders allowed on a subscription is 1000.

        The limit of order line items allowed in an order is 100.

        Zuora has the following limits on the Orders synchronous API to prevent performance degradation: 
        * Up to 50 subscriptions are allowed in a single [Create an order](https://www.zuora.com/developer/api-reference/#operation/POST_Order) or [Preview an order](https://www.zuora.com/developer/api-reference/#operation/POST_PreviewOrder) operation call.
        * Up to 50 order actions are allowed in a single [Create an order](https://www.zuora.com/developer/api-reference/#operation/POST_Order) or [Preview an order](https://www.zuora.com/developer/api-reference/#operation/POST_PreviewOrder) operation call.
        * Up to 50 order actions are allowed on a single subscription in a [Create an order](https://www.zuora.com/developer/api-reference/#operation/POST_Order) or [Preview an order](https://www.zuora.com/developer/api-reference/#operation/POST_PreviewOrder) operation call.

        If you have an Order that exceeds any limits of the above, Zuora recommends you use the following asynchronous API operations:
        * [Create an order asynchronously](https://www.zuora.com/developer/api-reference/#operation/POST_CreateOrderAsynchronously)
        * [Preview an order asynchronously](https://www.zuora.com/developer/api-reference/#operation/POST_PreviewOrderAsynchronously)

        Zuora has the following limits on the Orders asynchronous API operations to prevent performance degradation:
        * Up to 300 subscriptions are allowed in a single [Create an order asynchronously](https://www.zuora.com/developer/api-reference/#operation/POST_CreateOrderAsynchronously) or [Preview an order asynchronously](https://www.zuora.com/developer/api-reference/#operation/POST_PreviewOrderAsynchronously) operation call.
        * Up to 300 order actions are allowed in a single [Create an order asynchronously](https://www.zuora.com/developer/api-reference/#operation/POST_CreateOrderAsynchronously) or [Preview an order asynchronously](https://www.zuora.com/developer/api-reference/#operation/POST_PreviewOrderAsynchronously) operation call.
        * Up to 300 order actions are allowed on a single subscription in a [Create an order asynchronously](https://www.zuora.com/developer/api-reference/#operation/POST_CreateOrderAsynchronously) or [Preview an order asynchronously](https://www.zuora.com/developer/api-reference/#operation/POST_PreviewOrderAsynchronously) operation call.

        If you have a need for a large order that exceeds any limits of the above, you can request a limit increase for the Orders asynchronous API by submitting a request at [Zuora Global Support](https://support.zuora.com).
      operationId: POST_CreateOrderAsynchronously
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            Specify whether to return IDs for the [Get job status and response](https://www.zuora.com/developer/api-reference/#operation/GET_JobStatusAndResponse) operation. If you set this query parameter to `true`, the corresponding IDs, which are associated with the numbers returned in this operation, can be returned in the "Get job status and response" response body.
          in: query
          name: returnIds
          required: false
          schema:
            default: false
            type: boolean
        - description: |
            
            The minor version of the Zuora REST API. 

            You need to set this parameter if you want to use the following fields:
            * subscriptions
            * subscriptionNumbers
            * subscriptionIds (when the `returnId` query parameter is set to `true`)
          in: header
          name: zuora-version
          required: false
          schema:
            type: string
      requestBody:
        $ref: "#/components/requestBodies/POSTOrderRequestType"
      responses:
        "202":
          content:
            application/json:
              examples:
                response:
                  value:
                    jobId: 1bc24f315d7b48d3a20245bfe73bdceb
                    success: "true"
            application/json; charset=utf-8:
              schema:
                properties:
                  jobId:
                    description: The ID of an asynchronous job that will be returned for tracking the status and result of the job.
                    format: UUID
                    type: string
                  success:
                    description: Indicates whether the operation call succeeded.
                    type: boolean
                type: object
          description: Accepted
          headers:
            Location:
              description: URL for accessing the job result, in the format of `/async-jobs/{jobId}`. For example, `/async-jobs/1bc24f315d7b48d3a20245bfe73bdceb`
              schema:
                type: string
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Create an order asynchronously
      tags:
        - Orders
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "description": "This is a description for the Order.", 
                "existingAccountNumber": "A00000001", 
                "orderDate": "2017-01-01", 
                "orderLineItems": [
                    {
                        "billingTrigger": "BillImmediately", 
                        "chargeAmountPerUnit": 50, 
                        "customFields": {
                            "someField__c": "some string"
                        }, 
                        "deferredRevenueAccountingCode": "Unearned Revenues", 
                        "description": "With Dual Stereo Microphones, HD 1080p, Black", 
                        "itemName": "webcam", 
                        "itemType": "Product", 
                        "listPricePerUnit": 59, 
                        "productCode": "C9201", 
                        "purchaseOrderNumber": "960-000764", 
                        "quantity": 2, 
                        "recognizedRevenueAccountingCode": "Earned Revenues", 
                        "revenueRecognitionRule": "recognized upon invoice", 
                        "taxCode": "8018", 
                        "taxMode": "TaxInclusive", 
                        "transactionDate": "2021-02-01"
                    }
                ], 
                "orderNumber": "OM-00001", 
                "processingOptions": {
                    "applyCreditBalance": true, 
                    "billingOptions": {
                        "targetDate": "2017-08-01"
                    }, 
                    "collectPayment": true, 
                    "runBilling": true
                }, 
                "subscriptions": [
                    {
                        "orderActions": [
                            {
                                "createSubscription": {
                                    "subscribeToRatePlans": [
                                        {
                                            "productRatePlanId": "efbff07e6290dfb8016291003bd00dda"
                                        }
                                    ], 
                                    "subscriptionNumber": "SM-00001", 
                                    "terms": {
                                        "autoRenew": true, 
                                        "initialTerm": {
                                            "period": 12, 
                                            "periodType": "Month", 
                                            "startDate": "2017-01-01", 
                                            "termType": "TERMED"
                                        }, 
                                        "renewalSetting": "RENEW_WITH_SPECIFIC_TERM", 
                                        "renewalTerms": [
                                            {
                                                "period": 12, 
                                                "periodType": "Month"
                                            }
                                        ]
                                    }
                                }, 
                                "triggerDates": [
                                    {
                                        "name": "ContractEffective", 
                                        "triggerDate": "2017-01-01"
                                    }
                                ], 
                                "type": "CreateSubscription"
                            }
                        ]
                    }, 
                    {
                        "orderActions": [
                            {
                                "createSubscription": {
                                    "subscribeToRatePlans": [
                                        {
                                            "productRatePlanId": "efbff07e6290dfb8016291003bd00dda"
                                        }
                                    ], 
                                    "subscriptionNumber": "SM-00002", 
                                    "terms": {
                                        "autoRenew": true, 
                                        "initialTerm": {
                                            "period": 12, 
                                            "periodType": "Month", 
                                            "startDate": "2017-02-01", 
                                            "termType": "TERMED"
                                        }, 
                                        "renewalSetting": "RENEW_WITH_SPECIFIC_TERM", 
                                        "renewalTerms": [
                                            {
                                                "period": 12, 
                                                "periodType": "Month"
                                            }
                                        ]
                                    }
                                }, 
                                "triggerDates": [
                                    {
                                        "name": "ServiceActivation", 
                                        "triggerDate": "2017-02-01"
                                    }
                                ], 
                                "type": "CreateSubscription"
                            }
                        ]
                    }, 
                    {
                        "orderActions": [
                            {
                                "createSubscription": {
                                    "subscribeToRatePlans": [
                                        {
                                            "productRatePlanId": "efbff07e6290dfb80162910024c80dd5"
                                        }
                                    ], 
                                    "subscriptionNumber": "SM-00003", 
                                    "terms": {
                                        "autoRenew": true, 
                                        "initialTerm": {
                                            "period": 12, 
                                            "periodType": "Month", 
                                            "startDate": "2017-01-01", 
                                            "termType": "TERMED"
                                        }, 
                                        "renewalSetting": "RENEW_WITH_SPECIFIC_TERM", 
                                        "renewalTerms": [
                                            {
                                                "period": 12, 
                                                "periodType": "Month"
                                            }
                                        ]
                                    }
                                }, 
                                "triggerDates": [
                                    {
                                        "name": "ServiceActivation", 
                                        "triggerDate": "2017-03-01"
                                    }, 
                                    {
                                        "name": "CustomerAcceptance", 
                                        "triggerDate": "2017-04-01"
                                    }
                                ], 
                                "type": "CreateSubscription"
                            }
                        ]
                    }, 
                    {
                        "orderActions": [
                            {
                                "createSubscription": {
                                    "subscribeToRatePlans": [
                                        {
                                            "chargeOverrides": [
                                                {
                                                    "productRatePlanChargeId": "efbff07e6290dfb80162910024d80dd7", 
                                                    "startDate": {
                                                        "triggerEvent": "SpecificDate"
                                                    }
                                                }
                                            ], 
                                            "productRatePlanId": "efbff07e6290dfb80162910024c80dd5", 
                                            "uniqueToken": "Sugar-free Monthly"
                                        }
                                    ], 
                                    "subscriptionNumber": "SM-00004", 
                                    "terms": {
                                        "autoRenew": true, 
                                        "initialTerm": {
                                            "period": 12, 
                                            "periodType": "Month", 
                                            "startDate": "2017-01-01", 
                                            "termType": "TERMED"
                                        }, 
                                        "renewalSetting": "RENEW_WITH_SPECIFIC_TERM", 
                                        "renewalTerms": [
                                            {
                                                "period": 12, 
                                                "periodType": "Month"
                                            }
                                        ]
                                    }
                                }, 
                                "triggerDates": [
                                    {
                                        "name": "ServiceActivation", 
                                        "triggerDate": "2017-03-01"
                                    }, 
                                    {
                                        "name": "CustomerAcceptance", 
                                        "triggerDate": "2017-04-01"
                                    }
                                ], 
                                "type": "CreateSubscription"
                            }
                        ]
                    }, 
                    {
                        "orderActions": [
                            {
                                "suspend": {
                                    "suspendPeriods": 2, 
                                    "suspendPeriodsType": "Week", 
                                    "suspendPolicy": "FixedPeriodsFromToday"
                                }, 
                                "triggerDates": [
                                    {
                                        "name": "ContractEffective", 
                                        "triggerDate": "2018-01-01"
                                    }, 
                                    {
                                        "name": "ServiceActivation", 
                                        "triggerDate": "2018-01-01"
                                    }, 
                                    {
                                        "name": "CustomerAcceptance", 
                                        "triggerDate": "2018-01-01"
                                    }
                                ], 
                                "type": "Suspend"
                            }
                        ], 
                        "subscriptionNumber": "SM-00005"
                    }, 
                    {
                        "orderActions": [
                            {
                                "resume": {
                                    "extendsTerm": true, 
                                    "resumePolicy": "SpecificDate", 
                                    "resumeSpecificDate": "2018-10-01"
                                }, 
                                "triggerDates": [
                                    {
                                        "name": "ContractEffective", 
                                        "triggerDate": "2018-01-01"
                                    }, 
                                    {
                                        "name": "ServiceActivation", 
                                        "triggerDate": "2018-01-01"
                                    }, 
                                    {
                                        "name": "CustomerAcceptance", 
                                        "triggerDate": "2018-01-01"
                                    }
                                ], 
                                "type": "Resume"
                            }
                        ], 
                        "subscriptionNumber": "SM-00006"
                    }
                ]
            }' "https://rest.zuora.com/v1/async/orders"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/async/orders');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "description": "This is a description for the Order.", 
                "existingAccountNumber": "A00000001", 
                "orderDate": "2017-01-01", 
                "orderLineItems": [
                    {
                        "billingTrigger": "BillImmediately", 
                        "chargeAmountPerUnit": 50, 
                        "customFields": {
                            "someField__c": "some string"
                        }, 
                        "deferredRevenueAccountingCode": "Unearned Revenues", 
                        "description": "With Dual Stereo Microphones, HD 1080p, Black", 
                        "itemName": "webcam", 
                        "itemType": "Product", 
                        "listPricePerUnit": 59, 
                        "productCode": "C9201", 
                        "purchaseOrderNumber": "960-000764", 
                        "quantity": 2, 
                        "recognizedRevenueAccountingCode": "Earned Revenues", 
                        "revenueRecognitionRule": "recognized upon invoice", 
                        "taxCode": "8018", 
                        "taxMode": "TaxInclusive", 
                        "transactionDate": "2021-02-01"
                    }
                ], 
                "orderNumber": "OM-00001", 
                "processingOptions": {
                    "applyCreditBalance": true, 
                    "billingOptions": {
                        "targetDate": "2017-08-01"
                    }, 
                    "collectPayment": true, 
                    "runBilling": true
                }, 
                "subscriptions": [
                    {
                        "orderActions": [
                            {
                                "createSubscription": {
                                    "subscribeToRatePlans": [
                                        {
                                            "productRatePlanId": "efbff07e6290dfb8016291003bd00dda"
                                        }
                                    ], 
                                    "subscriptionNumber": "SM-00001", 
                                    "terms": {
                                        "autoRenew": true, 
                                        "initialTerm": {
                                            "period": 12, 
                                            "periodType": "Month", 
                                            "startDate": "2017-01-01", 
                                            "termType": "TERMED"
                                        }, 
                                        "renewalSetting": "RENEW_WITH_SPECIFIC_TERM", 
                                        "renewalTerms": [
                                            {
                                                "period": 12, 
                                                "periodType": "Month"
                                            }
                                        ]
                                    }
                                }, 
                                "triggerDates": [
                                    {
                                        "name": "ContractEffective", 
                                        "triggerDate": "2017-01-01"
                                    }
                                ], 
                                "type": "CreateSubscription"
                            }
                        ]
                    }, 
                    {
                        "orderActions": [
                            {
                                "createSubscription": {
                                    "subscribeToRatePlans": [
                                        {
                                            "productRatePlanId": "efbff07e6290dfb8016291003bd00dda"
                                        }
                                    ], 
                                    "subscriptionNumber": "SM-00002", 
                                    "terms": {
                                        "autoRenew": true, 
                                        "initialTerm": {
                                            "period": 12, 
                                            "periodType": "Month", 
                                            "startDate": "2017-02-01", 
                                            "termType": "TERMED"
                                        }, 
                                        "renewalSetting": "RENEW_WITH_SPECIFIC_TERM", 
                                        "renewalTerms": [
                                            {
                                                "period": 12, 
                                                "periodType": "Month"
                                            }
                                        ]
                                    }
                                }, 
                                "triggerDates": [
                                    {
                                        "name": "ServiceActivation", 
                                        "triggerDate": "2017-02-01"
                                    }
                                ], 
                                "type": "CreateSubscription"
                            }
                        ]
                    }, 
                    {
                        "orderActions": [
                            {
                                "createSubscription": {
                                    "subscribeToRatePlans": [
                                        {
                                            "productRatePlanId": "efbff07e6290dfb80162910024c80dd5"
                                        }
                                    ], 
                                    "subscriptionNumber": "SM-00003", 
                                    "terms": {
                                        "autoRenew": true, 
                                        "initialTerm": {
                                            "period": 12, 
                                            "periodType": "Month", 
                                            "startDate": "2017-01-01", 
                                            "termType": "TERMED"
                                        }, 
                                        "renewalSetting": "RENEW_WITH_SPECIFIC_TERM", 
                                        "renewalTerms": [
                                            {
                                                "period": 12, 
                                                "periodType": "Month"
                                            }
                                        ]
                                    }
                                }, 
                                "triggerDates": [
                                    {
                                        "name": "ServiceActivation", 
                                        "triggerDate": "2017-03-01"
                                    }, 
                                    {
                                        "name": "CustomerAcceptance", 
                                        "triggerDate": "2017-04-01"
                                    }
                                ], 
                                "type": "CreateSubscription"
                            }
                        ]
                    }, 
                    {
                        "orderActions": [
                            {
                                "createSubscription": {
                                    "subscribeToRatePlans": [
                                        {
                                            "chargeOverrides": [
                                                {
                                                    "productRatePlanChargeId": "efbff07e6290dfb80162910024d80dd7", 
                                                    "startDate": {
                                                        "triggerEvent": "SpecificDate"
                                                    }
                                                }
                                            ], 
                                            "productRatePlanId": "efbff07e6290dfb80162910024c80dd5", 
                                            "uniqueToken": "Sugar-free Monthly"
                                        }
                                    ], 
                                    "subscriptionNumber": "SM-00004", 
                                    "terms": {
                                        "autoRenew": true, 
                                        "initialTerm": {
                                            "period": 12, 
                                            "periodType": "Month", 
                                            "startDate": "2017-01-01", 
                                            "termType": "TERMED"
                                        }, 
                                        "renewalSetting": "RENEW_WITH_SPECIFIC_TERM", 
                                        "renewalTerms": [
                                            {
                                                "period": 12, 
                                                "periodType": "Month"
                                            }
                                        ]
                                    }
                                }, 
                                "triggerDates": [
                                    {
                                        "name": "ServiceActivation", 
                                        "triggerDate": "2017-03-01"
                                    }, 
                                    {
                                        "name": "CustomerAcceptance", 
                                        "triggerDate": "2017-04-01"
                                    }
                                ], 
                                "type": "CreateSubscription"
                            }
                        ]
                    }, 
                    {
                        "orderActions": [
                            {
                                "suspend": {
                                    "suspendPeriods": 2, 
                                    "suspendPeriodsType": "Week", 
                                    "suspendPolicy": "FixedPeriodsFromToday"
                                }, 
                                "triggerDates": [
                                    {
                                        "name": "ContractEffective", 
                                        "triggerDate": "2018-01-01"
                                    }, 
                                    {
                                        "name": "ServiceActivation", 
                                        "triggerDate": "2018-01-01"
                                    }, 
                                    {
                                        "name": "CustomerAcceptance", 
                                        "triggerDate": "2018-01-01"
                                    }
                                ], 
                                "type": "Suspend"
                            }
                        ], 
                        "subscriptionNumber": "SM-00005"
                    }, 
                    {
                        "orderActions": [
                            {
                                "resume": {
                                    "extendsTerm": true, 
                                    "resumePolicy": "SpecificDate", 
                                    "resumeSpecificDate": "2018-10-01"
                                }, 
                                "triggerDates": [
                                    {
                                        "name": "ContractEffective", 
                                        "triggerDate": "2018-01-01"
                                    }, 
                                    {
                                        "name": "ServiceActivation", 
                                        "triggerDate": "2018-01-01"
                                    }, 
                                    {
                                        "name": "CustomerAcceptance", 
                                        "triggerDate": "2018-01-01"
                                    }
                                ], 
                                "type": "Resume"
                            }
                        ], 
                        "subscriptionNumber": "SM-00006"
                    }
                ]
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"description\": \"This is a description for the Order.\", \n    \"existingAccountNumber\": \"A00000001\", \n    \"orderDate\": \"2017-01-01\", \n    \"orderLineItems\": [\n        {\n            \"billingTrigger\": \"BillImmediately\", \n            \"chargeAmountPerUnit\": 50, \n            \"customFields\": {\n                \"someField__c\": \"some string\"\n            }, \n            \"deferredRevenueAccountingCode\": \"Unearned Revenues\", \n            \"description\": \"With Dual Stereo Microphones, HD 1080p, Black\", \n            \"itemName\": \"webcam\", \n            \"itemType\": \"Product\", \n            \"listPricePerUnit\": 59, \n            \"productCode\": \"C9201\", \n            \"purchaseOrderNumber\": \"960-000764\", \n            \"quantity\": 2, \n            \"recognizedRevenueAccountingCode\": \"Earned Revenues\", \n            \"revenueRecognitionRule\": \"recognized upon invoice\", \n            \"taxCode\": \"8018\", \n            \"taxMode\": \"TaxInclusive\", \n            \"transactionDate\": \"2021-02-01\"\n        }\n    ], \n    \"orderNumber\": \"OM-00001\", \n    \"processingOptions\": {\n        \"applyCreditBalance\": true, \n        \"billingOptions\": {\n            \"targetDate\": \"2017-08-01\"\n        }, \n        \"collectPayment\": true, \n        \"runBilling\": true\n    }, \n    \"subscriptions\": [\n        {\n            \"orderActions\": [\n                {\n                    \"createSubscription\": {\n                        \"subscribeToRatePlans\": [\n                            {\n                                \"productRatePlanId\": \"efbff07e6290dfb8016291003bd00dda\"\n                            }\n                        ], \n                        \"subscriptionNumber\": \"SM-00001\", \n                        \"terms\": {\n                            \"autoRenew\": true, \n                            \"initialTerm\": {\n                                \"period\": 12, \n                                \"periodType\": \"Month\", \n                                \"startDate\": \"2017-01-01\", \n                                \"termType\": \"TERMED\"\n                            }, \n                            \"renewalSetting\": \"RENEW_WITH_SPECIFIC_TERM\", \n                            \"renewalTerms\": [\n                                {\n                                    \"period\": 12, \n                                    \"periodType\": \"Month\"\n                                }\n                            ]\n                        }\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2017-01-01\"\n                        }\n                    ], \n                    \"type\": \"CreateSubscription\"\n                }\n            ]\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"createSubscription\": {\n                        \"subscribeToRatePlans\": [\n                            {\n                                \"productRatePlanId\": \"efbff07e6290dfb8016291003bd00dda\"\n                            }\n                        ], \n                        \"subscriptionNumber\": \"SM-00002\", \n                        \"terms\": {\n                            \"autoRenew\": true, \n                            \"initialTerm\": {\n                                \"period\": 12, \n                                \"periodType\": \"Month\", \n                                \"startDate\": \"2017-02-01\", \n                                \"termType\": \"TERMED\"\n                            }, \n                            \"renewalSetting\": \"RENEW_WITH_SPECIFIC_TERM\", \n                            \"renewalTerms\": [\n                                {\n                                    \"period\": 12, \n                                    \"periodType\": \"Month\"\n                                }\n                            ]\n                        }\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2017-02-01\"\n                        }\n                    ], \n                    \"type\": \"CreateSubscription\"\n                }\n            ]\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"createSubscription\": {\n                        \"subscribeToRatePlans\": [\n                            {\n                                \"productRatePlanId\": \"efbff07e6290dfb80162910024c80dd5\"\n                            }\n                        ], \n                        \"subscriptionNumber\": \"SM-00003\", \n                        \"terms\": {\n                            \"autoRenew\": true, \n                            \"initialTerm\": {\n                                \"period\": 12, \n                                \"periodType\": \"Month\", \n                                \"startDate\": \"2017-01-01\", \n                                \"termType\": \"TERMED\"\n                            }, \n                            \"renewalSetting\": \"RENEW_WITH_SPECIFIC_TERM\", \n                            \"renewalTerms\": [\n                                {\n                                    \"period\": 12, \n                                    \"periodType\": \"Month\"\n                                }\n                            ]\n                        }\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2017-03-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2017-04-01\"\n                        }\n                    ], \n                    \"type\": \"CreateSubscription\"\n                }\n            ]\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"createSubscription\": {\n                        \"subscribeToRatePlans\": [\n                            {\n                                \"chargeOverrides\": [\n                                    {\n                                        \"productRatePlanChargeId\": \"efbff07e6290dfb80162910024d80dd7\", \n                                        \"startDate\": {\n                                            \"triggerEvent\": \"SpecificDate\"\n                                        }\n                                    }\n                                ], \n                                \"productRatePlanId\": \"efbff07e6290dfb80162910024c80dd5\", \n                                \"uniqueToken\": \"Sugar-free Monthly\"\n                            }\n                        ], \n                        \"subscriptionNumber\": \"SM-00004\", \n                        \"terms\": {\n                            \"autoRenew\": true, \n                            \"initialTerm\": {\n                                \"period\": 12, \n                                \"periodType\": \"Month\", \n                                \"startDate\": \"2017-01-01\", \n                                \"termType\": \"TERMED\"\n                            }, \n                            \"renewalSetting\": \"RENEW_WITH_SPECIFIC_TERM\", \n                            \"renewalTerms\": [\n                                {\n                                    \"period\": 12, \n                                    \"periodType\": \"Month\"\n                                }\n                            ]\n                        }\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2017-03-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2017-04-01\"\n                        }\n                    ], \n                    \"type\": \"CreateSubscription\"\n                }\n            ]\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"suspend\": {\n                        \"suspendPeriods\": 2, \n                        \"suspendPeriodsType\": \"Week\", \n                        \"suspendPolicy\": \"FixedPeriodsFromToday\"\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }, \n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }\n                    ], \n                    \"type\": \"Suspend\"\n                }\n            ], \n            \"subscriptionNumber\": \"SM-00005\"\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"resume\": {\n                        \"extendsTerm\": true, \n                        \"resumePolicy\": \"SpecificDate\", \n                        \"resumeSpecificDate\": \"2018-10-01\"\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }, \n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }\n                    ], \n                    \"type\": \"Resume\"\n                }\n            ], \n            \"subscriptionNumber\": \"SM-00006\"\n        }\n    ]\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/async/orders")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"description\": \"This is a description for the Order.\", \n    \"existingAccountNumber\": \"A00000001\", \n    \"orderDate\": \"2017-01-01\", \n    \"orderLineItems\": [\n        {\n            \"billingTrigger\": \"BillImmediately\", \n            \"chargeAmountPerUnit\": 50, \n            \"customFields\": {\n                \"someField__c\": \"some string\"\n            }, \n            \"deferredRevenueAccountingCode\": \"Unearned Revenues\", \n            \"description\": \"With Dual Stereo Microphones, HD 1080p, Black\", \n            \"itemName\": \"webcam\", \n            \"itemType\": \"Product\", \n            \"listPricePerUnit\": 59, \n            \"productCode\": \"C9201\", \n            \"purchaseOrderNumber\": \"960-000764\", \n            \"quantity\": 2, \n            \"recognizedRevenueAccountingCode\": \"Earned Revenues\", \n            \"revenueRecognitionRule\": \"recognized upon invoice\", \n            \"taxCode\": \"8018\", \n            \"taxMode\": \"TaxInclusive\", \n            \"transactionDate\": \"2021-02-01\"\n        }\n    ], \n    \"orderNumber\": \"OM-00001\", \n    \"processingOptions\": {\n        \"applyCreditBalance\": true, \n        \"billingOptions\": {\n            \"targetDate\": \"2017-08-01\"\n        }, \n        \"collectPayment\": true, \n        \"runBilling\": true\n    }, \n    \"subscriptions\": [\n        {\n            \"orderActions\": [\n                {\n                    \"createSubscription\": {\n                        \"subscribeToRatePlans\": [\n                            {\n                                \"productRatePlanId\": \"efbff07e6290dfb8016291003bd00dda\"\n                            }\n                        ], \n                        \"subscriptionNumber\": \"SM-00001\", \n                        \"terms\": {\n                            \"autoRenew\": true, \n                            \"initialTerm\": {\n                                \"period\": 12, \n                                \"periodType\": \"Month\", \n                                \"startDate\": \"2017-01-01\", \n                                \"termType\": \"TERMED\"\n                            }, \n                            \"renewalSetting\": \"RENEW_WITH_SPECIFIC_TERM\", \n                            \"renewalTerms\": [\n                                {\n                                    \"period\": 12, \n                                    \"periodType\": \"Month\"\n                                }\n                            ]\n                        }\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2017-01-01\"\n                        }\n                    ], \n                    \"type\": \"CreateSubscription\"\n                }\n            ]\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"createSubscription\": {\n                        \"subscribeToRatePlans\": [\n                            {\n                                \"productRatePlanId\": \"efbff07e6290dfb8016291003bd00dda\"\n                            }\n                        ], \n                        \"subscriptionNumber\": \"SM-00002\", \n                        \"terms\": {\n                            \"autoRenew\": true, \n                            \"initialTerm\": {\n                                \"period\": 12, \n                                \"periodType\": \"Month\", \n                                \"startDate\": \"2017-02-01\", \n                                \"termType\": \"TERMED\"\n                            }, \n                            \"renewalSetting\": \"RENEW_WITH_SPECIFIC_TERM\", \n                            \"renewalTerms\": [\n                                {\n                                    \"period\": 12, \n                                    \"periodType\": \"Month\"\n                                }\n                            ]\n                        }\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2017-02-01\"\n                        }\n                    ], \n                    \"type\": \"CreateSubscription\"\n                }\n            ]\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"createSubscription\": {\n                        \"subscribeToRatePlans\": [\n                            {\n                                \"productRatePlanId\": \"efbff07e6290dfb80162910024c80dd5\"\n                            }\n                        ], \n                        \"subscriptionNumber\": \"SM-00003\", \n                        \"terms\": {\n                            \"autoRenew\": true, \n                            \"initialTerm\": {\n                                \"period\": 12, \n                                \"periodType\": \"Month\", \n                                \"startDate\": \"2017-01-01\", \n                                \"termType\": \"TERMED\"\n                            }, \n                            \"renewalSetting\": \"RENEW_WITH_SPECIFIC_TERM\", \n                            \"renewalTerms\": [\n                                {\n                                    \"period\": 12, \n                                    \"periodType\": \"Month\"\n                                }\n                            ]\n                        }\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2017-03-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2017-04-01\"\n                        }\n                    ], \n                    \"type\": \"CreateSubscription\"\n                }\n            ]\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"createSubscription\": {\n                        \"subscribeToRatePlans\": [\n                            {\n                                \"chargeOverrides\": [\n                                    {\n                                        \"productRatePlanChargeId\": \"efbff07e6290dfb80162910024d80dd7\", \n                                        \"startDate\": {\n                                            \"triggerEvent\": \"SpecificDate\"\n                                        }\n                                    }\n                                ], \n                                \"productRatePlanId\": \"efbff07e6290dfb80162910024c80dd5\", \n                                \"uniqueToken\": \"Sugar-free Monthly\"\n                            }\n                        ], \n                        \"subscriptionNumber\": \"SM-00004\", \n                        \"terms\": {\n                            \"autoRenew\": true, \n                            \"initialTerm\": {\n                                \"period\": 12, \n                                \"periodType\": \"Month\", \n                                \"startDate\": \"2017-01-01\", \n                                \"termType\": \"TERMED\"\n                            }, \n                            \"renewalSetting\": \"RENEW_WITH_SPECIFIC_TERM\", \n                            \"renewalTerms\": [\n                                {\n                                    \"period\": 12, \n                                    \"periodType\": \"Month\"\n                                }\n                            ]\n                        }\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2017-03-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2017-04-01\"\n                        }\n                    ], \n                    \"type\": \"CreateSubscription\"\n                }\n            ]\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"suspend\": {\n                        \"suspendPeriods\": 2, \n                        \"suspendPeriodsType\": \"Week\", \n                        \"suspendPolicy\": \"FixedPeriodsFromToday\"\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }, \n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }\n                    ], \n                    \"type\": \"Suspend\"\n                }\n            ], \n            \"subscriptionNumber\": \"SM-00005\"\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"resume\": {\n                        \"extendsTerm\": true, \n                        \"resumePolicy\": \"SpecificDate\", \n                        \"resumeSpecificDate\": \"2018-10-01\"\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }, \n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }\n                    ], \n                    \"type\": \"Resume\"\n                }\n            ], \n            \"subscriptionNumber\": \"SM-00006\"\n        }\n    ]\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/async/orders", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/async/orders")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"description\": \"This is a description for the Order.\", \n    \"existingAccountNumber\": \"A00000001\", \n    \"orderDate\": \"2017-01-01\", \n    \"orderLineItems\": [\n        {\n            \"billingTrigger\": \"BillImmediately\", \n            \"chargeAmountPerUnit\": 50, \n            \"customFields\": {\n                \"someField__c\": \"some string\"\n            }, \n            \"deferredRevenueAccountingCode\": \"Unearned Revenues\", \n            \"description\": \"With Dual Stereo Microphones, HD 1080p, Black\", \n            \"itemName\": \"webcam\", \n            \"itemType\": \"Product\", \n            \"listPricePerUnit\": 59, \n            \"productCode\": \"C9201\", \n            \"purchaseOrderNumber\": \"960-000764\", \n            \"quantity\": 2, \n            \"recognizedRevenueAccountingCode\": \"Earned Revenues\", \n            \"revenueRecognitionRule\": \"recognized upon invoice\", \n            \"taxCode\": \"8018\", \n            \"taxMode\": \"TaxInclusive\", \n            \"transactionDate\": \"2021-02-01\"\n        }\n    ], \n    \"orderNumber\": \"OM-00001\", \n    \"processingOptions\": {\n        \"applyCreditBalance\": true, \n        \"billingOptions\": {\n            \"targetDate\": \"2017-08-01\"\n        }, \n        \"collectPayment\": true, \n        \"runBilling\": true\n    }, \n    \"subscriptions\": [\n        {\n            \"orderActions\": [\n                {\n                    \"createSubscription\": {\n                        \"subscribeToRatePlans\": [\n                            {\n                                \"productRatePlanId\": \"efbff07e6290dfb8016291003bd00dda\"\n                            }\n                        ], \n                        \"subscriptionNumber\": \"SM-00001\", \n                        \"terms\": {\n                            \"autoRenew\": true, \n                            \"initialTerm\": {\n                                \"period\": 12, \n                                \"periodType\": \"Month\", \n                                \"startDate\": \"2017-01-01\", \n                                \"termType\": \"TERMED\"\n                            }, \n                            \"renewalSetting\": \"RENEW_WITH_SPECIFIC_TERM\", \n                            \"renewalTerms\": [\n                                {\n                                    \"period\": 12, \n                                    \"periodType\": \"Month\"\n                                }\n                            ]\n                        }\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2017-01-01\"\n                        }\n                    ], \n                    \"type\": \"CreateSubscription\"\n                }\n            ]\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"createSubscription\": {\n                        \"subscribeToRatePlans\": [\n                            {\n                                \"productRatePlanId\": \"efbff07e6290dfb8016291003bd00dda\"\n                            }\n                        ], \n                        \"subscriptionNumber\": \"SM-00002\", \n                        \"terms\": {\n                            \"autoRenew\": true, \n                            \"initialTerm\": {\n                                \"period\": 12, \n                                \"periodType\": \"Month\", \n                                \"startDate\": \"2017-02-01\", \n                                \"termType\": \"TERMED\"\n                            }, \n                            \"renewalSetting\": \"RENEW_WITH_SPECIFIC_TERM\", \n                            \"renewalTerms\": [\n                                {\n                                    \"period\": 12, \n                                    \"periodType\": \"Month\"\n                                }\n                            ]\n                        }\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2017-02-01\"\n                        }\n                    ], \n                    \"type\": \"CreateSubscription\"\n                }\n            ]\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"createSubscription\": {\n                        \"subscribeToRatePlans\": [\n                            {\n                                \"productRatePlanId\": \"efbff07e6290dfb80162910024c80dd5\"\n                            }\n                        ], \n                        \"subscriptionNumber\": \"SM-00003\", \n                        \"terms\": {\n                            \"autoRenew\": true, \n                            \"initialTerm\": {\n                                \"period\": 12, \n                                \"periodType\": \"Month\", \n                                \"startDate\": \"2017-01-01\", \n                                \"termType\": \"TERMED\"\n                            }, \n                            \"renewalSetting\": \"RENEW_WITH_SPECIFIC_TERM\", \n                            \"renewalTerms\": [\n                                {\n                                    \"period\": 12, \n                                    \"periodType\": \"Month\"\n                                }\n                            ]\n                        }\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2017-03-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2017-04-01\"\n                        }\n                    ], \n                    \"type\": \"CreateSubscription\"\n                }\n            ]\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"createSubscription\": {\n                        \"subscribeToRatePlans\": [\n                            {\n                                \"chargeOverrides\": [\n                                    {\n                                        \"productRatePlanChargeId\": \"efbff07e6290dfb80162910024d80dd7\", \n                                        \"startDate\": {\n                                            \"triggerEvent\": \"SpecificDate\"\n                                        }\n                                    }\n                                ], \n                                \"productRatePlanId\": \"efbff07e6290dfb80162910024c80dd5\", \n                                \"uniqueToken\": \"Sugar-free Monthly\"\n                            }\n                        ], \n                        \"subscriptionNumber\": \"SM-00004\", \n                        \"terms\": {\n                            \"autoRenew\": true, \n                            \"initialTerm\": {\n                                \"period\": 12, \n                                \"periodType\": \"Month\", \n                                \"startDate\": \"2017-01-01\", \n                                \"termType\": \"TERMED\"\n                            }, \n                            \"renewalSetting\": \"RENEW_WITH_SPECIFIC_TERM\", \n                            \"renewalTerms\": [\n                                {\n                                    \"period\": 12, \n                                    \"periodType\": \"Month\"\n                                }\n                            ]\n                        }\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2017-03-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2017-04-01\"\n                        }\n                    ], \n                    \"type\": \"CreateSubscription\"\n                }\n            ]\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"suspend\": {\n                        \"suspendPeriods\": 2, \n                        \"suspendPeriodsType\": \"Week\", \n                        \"suspendPolicy\": \"FixedPeriodsFromToday\"\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }, \n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }\n                    ], \n                    \"type\": \"Suspend\"\n                }\n            ], \n            \"subscriptionNumber\": \"SM-00005\"\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"resume\": {\n                        \"extendsTerm\": true, \n                        \"resumePolicy\": \"SpecificDate\", \n                        \"resumeSpecificDate\": \"2018-10-01\"\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }, \n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }\n                    ], \n                    \"type\": \"Resume\"\n                }\n            ], \n            \"subscriptionNumber\": \"SM-00006\"\n        }\n    ]\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/async/orders");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"description\": \"This is a description for the Order.\", \n    \"existingAccountNumber\": \"A00000001\", \n    \"orderDate\": \"2017-01-01\", \n    \"orderLineItems\": [\n        {\n            \"billingTrigger\": \"BillImmediately\", \n            \"chargeAmountPerUnit\": 50, \n            \"customFields\": {\n                \"someField__c\": \"some string\"\n            }, \n            \"deferredRevenueAccountingCode\": \"Unearned Revenues\", \n            \"description\": \"With Dual Stereo Microphones, HD 1080p, Black\", \n            \"itemName\": \"webcam\", \n            \"itemType\": \"Product\", \n            \"listPricePerUnit\": 59, \n            \"productCode\": \"C9201\", \n            \"purchaseOrderNumber\": \"960-000764\", \n            \"quantity\": 2, \n            \"recognizedRevenueAccountingCode\": \"Earned Revenues\", \n            \"revenueRecognitionRule\": \"recognized upon invoice\", \n            \"taxCode\": \"8018\", \n            \"taxMode\": \"TaxInclusive\", \n            \"transactionDate\": \"2021-02-01\"\n        }\n    ], \n    \"orderNumber\": \"OM-00001\", \n    \"processingOptions\": {\n        \"applyCreditBalance\": true, \n        \"billingOptions\": {\n            \"targetDate\": \"2017-08-01\"\n        }, \n        \"collectPayment\": true, \n        \"runBilling\": true\n    }, \n    \"subscriptions\": [\n        {\n            \"orderActions\": [\n                {\n                    \"createSubscription\": {\n                        \"subscribeToRatePlans\": [\n                            {\n                                \"productRatePlanId\": \"efbff07e6290dfb8016291003bd00dda\"\n                            }\n                        ], \n                        \"subscriptionNumber\": \"SM-00001\", \n                        \"terms\": {\n                            \"autoRenew\": true, \n                            \"initialTerm\": {\n                                \"period\": 12, \n                                \"periodType\": \"Month\", \n                                \"startDate\": \"2017-01-01\", \n                                \"termType\": \"TERMED\"\n                            }, \n                            \"renewalSetting\": \"RENEW_WITH_SPECIFIC_TERM\", \n                            \"renewalTerms\": [\n                                {\n                                    \"period\": 12, \n                                    \"periodType\": \"Month\"\n                                }\n                            ]\n                        }\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2017-01-01\"\n                        }\n                    ], \n                    \"type\": \"CreateSubscription\"\n                }\n            ]\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"createSubscription\": {\n                        \"subscribeToRatePlans\": [\n                            {\n                                \"productRatePlanId\": \"efbff07e6290dfb8016291003bd00dda\"\n                            }\n                        ], \n                        \"subscriptionNumber\": \"SM-00002\", \n                        \"terms\": {\n                            \"autoRenew\": true, \n                            \"initialTerm\": {\n                                \"period\": 12, \n                                \"periodType\": \"Month\", \n                                \"startDate\": \"2017-02-01\", \n                                \"termType\": \"TERMED\"\n                            }, \n                            \"renewalSetting\": \"RENEW_WITH_SPECIFIC_TERM\", \n                            \"renewalTerms\": [\n                                {\n                                    \"period\": 12, \n                                    \"periodType\": \"Month\"\n                                }\n                            ]\n                        }\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2017-02-01\"\n                        }\n                    ], \n                    \"type\": \"CreateSubscription\"\n                }\n            ]\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"createSubscription\": {\n                        \"subscribeToRatePlans\": [\n                            {\n                                \"productRatePlanId\": \"efbff07e6290dfb80162910024c80dd5\"\n                            }\n                        ], \n                        \"subscriptionNumber\": \"SM-00003\", \n                        \"terms\": {\n                            \"autoRenew\": true, \n                            \"initialTerm\": {\n                                \"period\": 12, \n                                \"periodType\": \"Month\", \n                                \"startDate\": \"2017-01-01\", \n                                \"termType\": \"TERMED\"\n                            }, \n                            \"renewalSetting\": \"RENEW_WITH_SPECIFIC_TERM\", \n                            \"renewalTerms\": [\n                                {\n                                    \"period\": 12, \n                                    \"periodType\": \"Month\"\n                                }\n                            ]\n                        }\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2017-03-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2017-04-01\"\n                        }\n                    ], \n                    \"type\": \"CreateSubscription\"\n                }\n            ]\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"createSubscription\": {\n                        \"subscribeToRatePlans\": [\n                            {\n                                \"chargeOverrides\": [\n                                    {\n                                        \"productRatePlanChargeId\": \"efbff07e6290dfb80162910024d80dd7\", \n                                        \"startDate\": {\n                                            \"triggerEvent\": \"SpecificDate\"\n                                        }\n                                    }\n                                ], \n                                \"productRatePlanId\": \"efbff07e6290dfb80162910024c80dd5\", \n                                \"uniqueToken\": \"Sugar-free Monthly\"\n                            }\n                        ], \n                        \"subscriptionNumber\": \"SM-00004\", \n                        \"terms\": {\n                            \"autoRenew\": true, \n                            \"initialTerm\": {\n                                \"period\": 12, \n                                \"periodType\": \"Month\", \n                                \"startDate\": \"2017-01-01\", \n                                \"termType\": \"TERMED\"\n                            }, \n                            \"renewalSetting\": \"RENEW_WITH_SPECIFIC_TERM\", \n                            \"renewalTerms\": [\n                                {\n                                    \"period\": 12, \n                                    \"periodType\": \"Month\"\n                                }\n                            ]\n                        }\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2017-03-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2017-04-01\"\n                        }\n                    ], \n                    \"type\": \"CreateSubscription\"\n                }\n            ]\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"suspend\": {\n                        \"suspendPeriods\": 2, \n                        \"suspendPeriodsType\": \"Week\", \n                        \"suspendPolicy\": \"FixedPeriodsFromToday\"\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }, \n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }\n                    ], \n                    \"type\": \"Suspend\"\n                }\n            ], \n            \"subscriptionNumber\": \"SM-00005\"\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"resume\": {\n                        \"extendsTerm\": true, \n                        \"resumePolicy\": \"SpecificDate\", \n                        \"resumeSpecificDate\": \"2018-10-01\"\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }, \n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }\n                    ], \n                    \"type\": \"Resume\"\n                }\n            ], \n            \"subscriptionNumber\": \"SM-00006\"\n        }\n    ]\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/async/orders/preview:
    post:
      description: |
        **Note:** This operation is only available if you have the [Orders](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AA_Overview_of_Orders#Orders) feature enabled. Orders is now generally available as of Zuora Billing Release 284 (August 2020). If you are an existing Zuora Subscribe and Amend customer and want to adopt Orders, see [What is Orders Harmonization](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Orders_Harmonization/Orders_Harmonization#What_is_Orders_Harmonization.3F) and join the [Orders Harmonization community group](https://community.zuora.com/t5/Orders-Harmonization/gp-p/Orders-Harmonization) for more information. If you want to enable Orders, submit a request at [Zuora Global Support](https://support.zuora.com/).

        **Note:** The [Order Line Items](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Line_Items/AA_Overview_of_Order_Line_Items) feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. If you want to join this early adopter program, submit a request at [Zuora Global Support](https://support.zuora.com/).       

        In the case where a normal "Preview an order" operation call will time out, use this operation instead to preview an order asynchronously. A job will be previewing the order in the back end; the job ID will be returned for tracking the job status and result.

        The limit of orders allowed on a subscription is 1000.

        The limit of order line items allowed in an order is 100.

        Zuora has the following limits on the Orders synchronous API to prevent performance degradation: 
        * Up to 50 subscriptions are allowed in a single [Create an order](https://www.zuora.com/developer/api-reference/#operation/POST_Order) or [Preview an order](https://www.zuora.com/developer/api-reference/#operation/POST_PreviewOrder) operation call.
        * Up to 50 order actions are allowed in a single [Create an order](https://www.zuora.com/developer/api-reference/#operation/POST_Order) or [Preview an order](https://www.zuora.com/developer/api-reference/#operation/POST_PreviewOrder) operation call.
        * Up to 50 order actions are allowed on a single subscription in a [Create an order](https://www.zuora.com/developer/api-reference/#operation/POST_Order) or [Preview an order](https://www.zuora.com/developer/api-reference/#operation/POST_PreviewOrder) operation call.

        If you have an Order that exceeds any limits of the above, Zuora recommends you use the following asynchronous API operations:
        * [Create an order asynchronously](https://www.zuora.com/developer/api-reference/#operation/POST_CreateOrderAsynchronously)
        * [Preview an order asynchronously](https://www.zuora.com/developer/api-reference/#operation/POST_PreviewOrderAsynchronously)

        Zuora has the following limits on the Orders asynchronous API operations to prevent performance degradation:
        * Up to 300 subscriptions are allowed in a single [Create an order asynchronously](https://www.zuora.com/developer/api-reference/#operation/POST_CreateOrderAsynchronously) or [Preview an order asynchronously](https://www.zuora.com/developer/api-reference/#operation/POST_PreviewOrderAsynchronously) operation call.
        * Up to 300 order actions are allowed in a single [Create an order asynchronously](https://www.zuora.com/developer/api-reference/#operation/POST_CreateOrderAsynchronously) or [Preview an order asynchronously](https://www.zuora.com/developer/api-reference/#operation/POST_PreviewOrderAsynchronously) operation call.
        * Up to 300 order actions are allowed on a single subscription in a [Create an order asynchronously](https://www.zuora.com/developer/api-reference/#operation/POST_CreateOrderAsynchronously) or [Preview an order asynchronously](https://www.zuora.com/developer/api-reference/#operation/POST_PreviewOrderAsynchronously) operation call.

        If you have a need for a large order that exceeds any limits of the above, you can request a limit increase for the Orders asynchronous API by submitting a request at [Zuora Global Support](https://support.zuora.com).
      operationId: POST_PreviewOrderAsynchronously
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
      requestBody:
        $ref: "#/components/requestBodies/POSTOrderPreviewRequestType"
      responses:
        "202":
          content:
            application/json:
              examples:
                response:
                  value:
                    jobId: 2c90a02d676688200167770ce20601b6
            application/json; charset=utf-8:
              schema:
                properties:
                  jobId:
                    description: The ID of an asynchronous job that will be returned for tracking the status and result of the job.
                    format: UUID
                    type: string
                type: object
          description: Accepted
          headers:
            Location:
              description: URL for accessing the job result, in the format of `/async-jobs/{jobId}`. For example, `/async-jobs/2c90a02d676688200167770ce20601b6`
              schema:
                type: string
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Preview an order asynchronously
      tags:
        - Orders
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "customFields": {}, 
                "description": "This is a description for the Order.", 
                "existingAccountNumber": "A00000101", 
                "orderDate": "2018-10-01", 
                "orderLineItems": [
                    {
                        "amountPerUnit": 50, 
                        "billingTrigger": "BillImmediately", 
                        "customFields": {
                            "someField__c": "some string"
                        }, 
                        "deferredRevenueAccountingCode": "Unearned Revenues", 
                        "description": "With Dual Stereo Microphones, HD 1080p, Black", 
                        "itemName": "webcam", 
                        "itemType": "Product", 
                        "listPricePerUnit": 59, 
                        "productCode": "C9201", 
                        "purchaseOrderNumber": "960-000764", 
                        "quantity": 2, 
                        "recognizedRevenueAccountingCode": "Earned Revenues", 
                        "revenueRecognitionRule": "recognized upon invoice", 
                        "taxCode": "8018", 
                        "taxMode": "TaxInclusive", 
                        "transactionDate": "2021-02-01"
                    }
                ], 
                "previewOptions": {
                    "previewThruType": "SpecificDate", 
                    "previewTypes": [
                        "OrderMetrics", 
                        "BillingDocs", 
                        "ChargeMetrics"
                    ], 
                    "specificPreviewThruDate": "2019-01-01"
                }, 
                "subscriptions": [
                    {
                        "orderActions": [
                            {
                                "triggerDates": [
                                    {
                                        "name": "ContractEffective", 
                                        "triggerDate": "2018-12-01"
                                    }, 
                                    {
                                        "name": "ServiceActivation", 
                                        "triggerDate": "2018-12-01"
                                    }, 
                                    {
                                        "name": "CustomerAcceptance", 
                                        "triggerDate": "2018-12-01"
                                    }
                                ], 
                                "type": "UpdateProduct", 
                                "updateProduct": {
                                    "chargeUpdates": [
                                        {
                                            "chargeNumber": "C-00000210", 
                                            "pricing": {
                                                "recurringPerUnit": {
                                                    "listPrice": 20
                                                }
                                            }
                                        }
                                    ], 
                                    "ratePlanId": "2c98919c67a5ae9d0167a68f8eb20262"
                                }
                            }
                        ], 
                        "subscriptionNumber": "A-S00000100"
                    }, 
                    {
                        "orderActions": [
                            {
                                "suspend": {
                                    "suspendPolicy": "Today"
                                }, 
                                "triggerDates": [
                                    {
                                        "name": "ContractEffective", 
                                        "triggerDate": "2018-12-01"
                                    }, 
                                    {
                                        "name": "ServiceActivation", 
                                        "triggerDate": "2018-12-01"
                                    }, 
                                    {
                                        "name": "CustomerAcceptance", 
                                        "triggerDate": "2018-12-01"
                                    }
                                ], 
                                "type": "Suspend"
                            }
                        ], 
                        "subscriptionNumber": "A-S00000101"
                    }, 
                    {
                        "orderActions": [
                            {
                                "resume": {
                                    "extendsTerm": true, 
                                    "resumePeriods": 10, 
                                    "resumePeriodsType": "Day", 
                                    "resumePolicy": "FixedPeriodsFromSuspendDate"
                                }, 
                                "triggerDates": [
                                    {
                                        "name": "ContractEffective", 
                                        "triggerDate": "2018-12-12"
                                    }, 
                                    {
                                        "name": "ServiceActivation", 
                                        "triggerDate": "2018-12-12"
                                    }, 
                                    {
                                        "name": "CustomerAcceptance", 
                                        "triggerDate": "2018-12-12"
                                    }
                                ], 
                                "type": "Resume"
                            }
                        ], 
                        "subscriptionNumber": "A-S00000102"
                    }
                ]
            }' "https://rest.zuora.com/v1/async/orders/preview"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/async/orders/preview');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "customFields": {}, 
                "description": "This is a description for the Order.", 
                "existingAccountNumber": "A00000101", 
                "orderDate": "2018-10-01", 
                "orderLineItems": [
                    {
                        "amountPerUnit": 50, 
                        "billingTrigger": "BillImmediately", 
                        "customFields": {
                            "someField__c": "some string"
                        }, 
                        "deferredRevenueAccountingCode": "Unearned Revenues", 
                        "description": "With Dual Stereo Microphones, HD 1080p, Black", 
                        "itemName": "webcam", 
                        "itemType": "Product", 
                        "listPricePerUnit": 59, 
                        "productCode": "C9201", 
                        "purchaseOrderNumber": "960-000764", 
                        "quantity": 2, 
                        "recognizedRevenueAccountingCode": "Earned Revenues", 
                        "revenueRecognitionRule": "recognized upon invoice", 
                        "taxCode": "8018", 
                        "taxMode": "TaxInclusive", 
                        "transactionDate": "2021-02-01"
                    }
                ], 
                "previewOptions": {
                    "previewThruType": "SpecificDate", 
                    "previewTypes": [
                        "OrderMetrics", 
                        "BillingDocs", 
                        "ChargeMetrics"
                    ], 
                    "specificPreviewThruDate": "2019-01-01"
                }, 
                "subscriptions": [
                    {
                        "orderActions": [
                            {
                                "triggerDates": [
                                    {
                                        "name": "ContractEffective", 
                                        "triggerDate": "2018-12-01"
                                    }, 
                                    {
                                        "name": "ServiceActivation", 
                                        "triggerDate": "2018-12-01"
                                    }, 
                                    {
                                        "name": "CustomerAcceptance", 
                                        "triggerDate": "2018-12-01"
                                    }
                                ], 
                                "type": "UpdateProduct", 
                                "updateProduct": {
                                    "chargeUpdates": [
                                        {
                                            "chargeNumber": "C-00000210", 
                                            "pricing": {
                                                "recurringPerUnit": {
                                                    "listPrice": 20
                                                }
                                            }
                                        }
                                    ], 
                                    "ratePlanId": "2c98919c67a5ae9d0167a68f8eb20262"
                                }
                            }
                        ], 
                        "subscriptionNumber": "A-S00000100"
                    }, 
                    {
                        "orderActions": [
                            {
                                "suspend": {
                                    "suspendPolicy": "Today"
                                }, 
                                "triggerDates": [
                                    {
                                        "name": "ContractEffective", 
                                        "triggerDate": "2018-12-01"
                                    }, 
                                    {
                                        "name": "ServiceActivation", 
                                        "triggerDate": "2018-12-01"
                                    }, 
                                    {
                                        "name": "CustomerAcceptance", 
                                        "triggerDate": "2018-12-01"
                                    }
                                ], 
                                "type": "Suspend"
                            }
                        ], 
                        "subscriptionNumber": "A-S00000101"
                    }, 
                    {
                        "orderActions": [
                            {
                                "resume": {
                                    "extendsTerm": true, 
                                    "resumePeriods": 10, 
                                    "resumePeriodsType": "Day", 
                                    "resumePolicy": "FixedPeriodsFromSuspendDate"
                                }, 
                                "triggerDates": [
                                    {
                                        "name": "ContractEffective", 
                                        "triggerDate": "2018-12-12"
                                    }, 
                                    {
                                        "name": "ServiceActivation", 
                                        "triggerDate": "2018-12-12"
                                    }, 
                                    {
                                        "name": "CustomerAcceptance", 
                                        "triggerDate": "2018-12-12"
                                    }
                                ], 
                                "type": "Resume"
                            }
                        ], 
                        "subscriptionNumber": "A-S00000102"
                    }
                ]
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"customFields\": {}, \n    \"description\": \"This is a description for the Order.\", \n    \"existingAccountNumber\": \"A00000101\", \n    \"orderDate\": \"2018-10-01\", \n    \"orderLineItems\": [\n        {\n            \"amountPerUnit\": 50, \n            \"billingTrigger\": \"BillImmediately\", \n            \"customFields\": {\n                \"someField__c\": \"some string\"\n            }, \n            \"deferredRevenueAccountingCode\": \"Unearned Revenues\", \n            \"description\": \"With Dual Stereo Microphones, HD 1080p, Black\", \n            \"itemName\": \"webcam\", \n            \"itemType\": \"Product\", \n            \"listPricePerUnit\": 59, \n            \"productCode\": \"C9201\", \n            \"purchaseOrderNumber\": \"960-000764\", \n            \"quantity\": 2, \n            \"recognizedRevenueAccountingCode\": \"Earned Revenues\", \n            \"revenueRecognitionRule\": \"recognized upon invoice\", \n            \"taxCode\": \"8018\", \n            \"taxMode\": \"TaxInclusive\", \n            \"transactionDate\": \"2021-02-01\"\n        }\n    ], \n    \"previewOptions\": {\n        \"previewThruType\": \"SpecificDate\", \n        \"previewTypes\": [\n            \"OrderMetrics\", \n            \"BillingDocs\", \n            \"ChargeMetrics\"\n        ], \n        \"specificPreviewThruDate\": \"2019-01-01\"\n    }, \n    \"subscriptions\": [\n        {\n            \"orderActions\": [\n                {\n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }, \n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }\n                    ], \n                    \"type\": \"UpdateProduct\", \n                    \"updateProduct\": {\n                        \"chargeUpdates\": [\n                            {\n                                \"chargeNumber\": \"C-00000210\", \n                                \"pricing\": {\n                                    \"recurringPerUnit\": {\n                                        \"listPrice\": 20\n                                    }\n                                }\n                            }\n                        ], \n                        \"ratePlanId\": \"2c98919c67a5ae9d0167a68f8eb20262\"\n                    }\n                }\n            ], \n            \"subscriptionNumber\": \"A-S00000100\"\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"suspend\": {\n                        \"suspendPolicy\": \"Today\"\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }, \n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }\n                    ], \n                    \"type\": \"Suspend\"\n                }\n            ], \n            \"subscriptionNumber\": \"A-S00000101\"\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"resume\": {\n                        \"extendsTerm\": true, \n                        \"resumePeriods\": 10, \n                        \"resumePeriodsType\": \"Day\", \n                        \"resumePolicy\": \"FixedPeriodsFromSuspendDate\"\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2018-12-12\"\n                        }, \n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2018-12-12\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2018-12-12\"\n                        }\n                    ], \n                    \"type\": \"Resume\"\n                }\n            ], \n            \"subscriptionNumber\": \"A-S00000102\"\n        }\n    ]\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/async/orders/preview")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"customFields\": {}, \n    \"description\": \"This is a description for the Order.\", \n    \"existingAccountNumber\": \"A00000101\", \n    \"orderDate\": \"2018-10-01\", \n    \"orderLineItems\": [\n        {\n            \"amountPerUnit\": 50, \n            \"billingTrigger\": \"BillImmediately\", \n            \"customFields\": {\n                \"someField__c\": \"some string\"\n            }, \n            \"deferredRevenueAccountingCode\": \"Unearned Revenues\", \n            \"description\": \"With Dual Stereo Microphones, HD 1080p, Black\", \n            \"itemName\": \"webcam\", \n            \"itemType\": \"Product\", \n            \"listPricePerUnit\": 59, \n            \"productCode\": \"C9201\", \n            \"purchaseOrderNumber\": \"960-000764\", \n            \"quantity\": 2, \n            \"recognizedRevenueAccountingCode\": \"Earned Revenues\", \n            \"revenueRecognitionRule\": \"recognized upon invoice\", \n            \"taxCode\": \"8018\", \n            \"taxMode\": \"TaxInclusive\", \n            \"transactionDate\": \"2021-02-01\"\n        }\n    ], \n    \"previewOptions\": {\n        \"previewThruType\": \"SpecificDate\", \n        \"previewTypes\": [\n            \"OrderMetrics\", \n            \"BillingDocs\", \n            \"ChargeMetrics\"\n        ], \n        \"specificPreviewThruDate\": \"2019-01-01\"\n    }, \n    \"subscriptions\": [\n        {\n            \"orderActions\": [\n                {\n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }, \n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }\n                    ], \n                    \"type\": \"UpdateProduct\", \n                    \"updateProduct\": {\n                        \"chargeUpdates\": [\n                            {\n                                \"chargeNumber\": \"C-00000210\", \n                                \"pricing\": {\n                                    \"recurringPerUnit\": {\n                                        \"listPrice\": 20\n                                    }\n                                }\n                            }\n                        ], \n                        \"ratePlanId\": \"2c98919c67a5ae9d0167a68f8eb20262\"\n                    }\n                }\n            ], \n            \"subscriptionNumber\": \"A-S00000100\"\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"suspend\": {\n                        \"suspendPolicy\": \"Today\"\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }, \n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }\n                    ], \n                    \"type\": \"Suspend\"\n                }\n            ], \n            \"subscriptionNumber\": \"A-S00000101\"\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"resume\": {\n                        \"extendsTerm\": true, \n                        \"resumePeriods\": 10, \n                        \"resumePeriodsType\": \"Day\", \n                        \"resumePolicy\": \"FixedPeriodsFromSuspendDate\"\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2018-12-12\"\n                        }, \n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2018-12-12\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2018-12-12\"\n                        }\n                    ], \n                    \"type\": \"Resume\"\n                }\n            ], \n            \"subscriptionNumber\": \"A-S00000102\"\n        }\n    ]\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/async/orders/preview", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/async/orders/preview")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"customFields\": {}, \n    \"description\": \"This is a description for the Order.\", \n    \"existingAccountNumber\": \"A00000101\", \n    \"orderDate\": \"2018-10-01\", \n    \"orderLineItems\": [\n        {\n            \"amountPerUnit\": 50, \n            \"billingTrigger\": \"BillImmediately\", \n            \"customFields\": {\n                \"someField__c\": \"some string\"\n            }, \n            \"deferredRevenueAccountingCode\": \"Unearned Revenues\", \n            \"description\": \"With Dual Stereo Microphones, HD 1080p, Black\", \n            \"itemName\": \"webcam\", \n            \"itemType\": \"Product\", \n            \"listPricePerUnit\": 59, \n            \"productCode\": \"C9201\", \n            \"purchaseOrderNumber\": \"960-000764\", \n            \"quantity\": 2, \n            \"recognizedRevenueAccountingCode\": \"Earned Revenues\", \n            \"revenueRecognitionRule\": \"recognized upon invoice\", \n            \"taxCode\": \"8018\", \n            \"taxMode\": \"TaxInclusive\", \n            \"transactionDate\": \"2021-02-01\"\n        }\n    ], \n    \"previewOptions\": {\n        \"previewThruType\": \"SpecificDate\", \n        \"previewTypes\": [\n            \"OrderMetrics\", \n            \"BillingDocs\", \n            \"ChargeMetrics\"\n        ], \n        \"specificPreviewThruDate\": \"2019-01-01\"\n    }, \n    \"subscriptions\": [\n        {\n            \"orderActions\": [\n                {\n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }, \n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }\n                    ], \n                    \"type\": \"UpdateProduct\", \n                    \"updateProduct\": {\n                        \"chargeUpdates\": [\n                            {\n                                \"chargeNumber\": \"C-00000210\", \n                                \"pricing\": {\n                                    \"recurringPerUnit\": {\n                                        \"listPrice\": 20\n                                    }\n                                }\n                            }\n                        ], \n                        \"ratePlanId\": \"2c98919c67a5ae9d0167a68f8eb20262\"\n                    }\n                }\n            ], \n            \"subscriptionNumber\": \"A-S00000100\"\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"suspend\": {\n                        \"suspendPolicy\": \"Today\"\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }, \n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }\n                    ], \n                    \"type\": \"Suspend\"\n                }\n            ], \n            \"subscriptionNumber\": \"A-S00000101\"\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"resume\": {\n                        \"extendsTerm\": true, \n                        \"resumePeriods\": 10, \n                        \"resumePeriodsType\": \"Day\", \n                        \"resumePolicy\": \"FixedPeriodsFromSuspendDate\"\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2018-12-12\"\n                        }, \n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2018-12-12\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2018-12-12\"\n                        }\n                    ], \n                    \"type\": \"Resume\"\n                }\n            ], \n            \"subscriptionNumber\": \"A-S00000102\"\n        }\n    ]\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/async/orders/preview");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"customFields\": {}, \n    \"description\": \"This is a description for the Order.\", \n    \"existingAccountNumber\": \"A00000101\", \n    \"orderDate\": \"2018-10-01\", \n    \"orderLineItems\": [\n        {\n            \"amountPerUnit\": 50, \n            \"billingTrigger\": \"BillImmediately\", \n            \"customFields\": {\n                \"someField__c\": \"some string\"\n            }, \n            \"deferredRevenueAccountingCode\": \"Unearned Revenues\", \n            \"description\": \"With Dual Stereo Microphones, HD 1080p, Black\", \n            \"itemName\": \"webcam\", \n            \"itemType\": \"Product\", \n            \"listPricePerUnit\": 59, \n            \"productCode\": \"C9201\", \n            \"purchaseOrderNumber\": \"960-000764\", \n            \"quantity\": 2, \n            \"recognizedRevenueAccountingCode\": \"Earned Revenues\", \n            \"revenueRecognitionRule\": \"recognized upon invoice\", \n            \"taxCode\": \"8018\", \n            \"taxMode\": \"TaxInclusive\", \n            \"transactionDate\": \"2021-02-01\"\n        }\n    ], \n    \"previewOptions\": {\n        \"previewThruType\": \"SpecificDate\", \n        \"previewTypes\": [\n            \"OrderMetrics\", \n            \"BillingDocs\", \n            \"ChargeMetrics\"\n        ], \n        \"specificPreviewThruDate\": \"2019-01-01\"\n    }, \n    \"subscriptions\": [\n        {\n            \"orderActions\": [\n                {\n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }, \n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }\n                    ], \n                    \"type\": \"UpdateProduct\", \n                    \"updateProduct\": {\n                        \"chargeUpdates\": [\n                            {\n                                \"chargeNumber\": \"C-00000210\", \n                                \"pricing\": {\n                                    \"recurringPerUnit\": {\n                                        \"listPrice\": 20\n                                    }\n                                }\n                            }\n                        ], \n                        \"ratePlanId\": \"2c98919c67a5ae9d0167a68f8eb20262\"\n                    }\n                }\n            ], \n            \"subscriptionNumber\": \"A-S00000100\"\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"suspend\": {\n                        \"suspendPolicy\": \"Today\"\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }, \n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }\n                    ], \n                    \"type\": \"Suspend\"\n                }\n            ], \n            \"subscriptionNumber\": \"A-S00000101\"\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"resume\": {\n                        \"extendsTerm\": true, \n                        \"resumePeriods\": 10, \n                        \"resumePeriodsType\": \"Day\", \n                        \"resumePolicy\": \"FixedPeriodsFromSuspendDate\"\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2018-12-12\"\n                        }, \n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2018-12-12\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2018-12-12\"\n                        }\n                    ], \n                    \"type\": \"Resume\"\n                }\n            ], \n            \"subscriptionNumber\": \"A-S00000102\"\n        }\n    ]\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/attachments:
    post:
      description: |
        Use the Add Attachment REST request with a multipart/form-data to attach a document file to an Account, a Subscription, an Invoice, a Credit Memo, or a Debit Memo.

        **Note**: The Credit and Debit Memos feature is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 
      operationId: POST_Attachments
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            Description of the attachment document.
          in: query
          name: description
          required: false
          schema:
            type: string
        - description: |
            The type of the object to add attachements for. 
          in: query
          name: associatedObjectType
          required: true
          schema:
            enum:
              - Account
              - Invoice
              - Subscription
              - CreditMemo
              - DebitMemo
            type: string
        - description: |
            For the Subscription type, specify the Subscription Number. An attachment is tied to the Subscription Number and thus viewable with every subscription version.

            For Account, Invoice, Credit Memo, and Debit Memo, specify the correponding ID.
          in: query
          name: associatedObjectKey
          required: true
          schema:
            type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              properties:
                file:
                  description: |
                    The file to be attached. Files with the following extensions are supported: .pdf, .csv, .png, .xlsx, .xls, .doc, .docx, .msg, .jpg, .txt, .htm, .html, .eml, .pptx, .gif, .rtf, .xml, .jpeg, .log, .cls

                    The maximum file size is 4 MB.
                  format: binary
                  type: string
              required:
                - file
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    fileId: 402880ea536ff494015372a7ea12001e
                    id: 402880ea536ff494015372a7ea17001f
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTAttachmentResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Create an attachment
      tags:
        - Attachments
      x-code-samples:
        - lang: Curl
          source: |
            curl -X POST -H "Authorization: Bearer f21f017e4724445d8647b1f0de7ed6f1" -F "file=@PODocument.pdf" "https://rest.zuora.com/v1/attachments/?description=Postal%20order&associatedObjectType=Subscription&associatedObjectKey=A-S00005714"
  "/v1/attachments/{attachment-id}":
    delete:
      description: Use the Delete Attachment REST request to delete an attachment from a Zuora object.
      operationId: DELETE_Attachments
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: Id of the attachment to be deleted.
          in: path
          name: attachment-id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Delete an attachment
      tags:
        - Attachments
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/attachments/{attachment-id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/attachments/{attachment-id}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/attachments/{attachment-id}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/v1/attachments/{attachment-id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/attachments/{attachment-id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/attachments/{attachment-id}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      description: |
        Use the View Attachment REST request to retrieve information about an attachment document.
      operationId: GET_Attachments
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: Id of the attachment you want to view.
          in: path
          name: attachment-id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    createdBy: 4028e487327fd45a0132829ebb673ff9
                    createdOn: 2016-05-02 13:09:17
                    description: ""
                    fileContentType: text/plain
                    fileId: 8a8083e1545b706a01547316d9094400
                    fileName: AttachTest.txt
                    id: 8a8083e1545b706a01547316d93f4401
                    success: true
                    updatedBy: 4028e487327fd45a0132829ebb673ff9
                    updatedOn: 2016-05-02 13:09:17
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETAttachmentResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve an attachment
      tags:
        - Attachments
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/attachments/{attachment-id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/attachments/{attachment-id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/attachments/{attachment-id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/attachments/{attachment-id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/attachments/{attachment-id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/attachments/{attachment-id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: Use the Edit Attachment REST request to make changes to the descriptive fields of an attachment, such as the description and the file name. You cannot change the actual content of the attached file in Zuora. If you need to change the actual content, you need to delete the attachment and add the updated file as a new attachment.
      operationId: PUT_Attachments
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: Id of the attachment to be updated.
          in: path
          name: attachment-id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTAttachmentType"
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Update an attachment
      tags:
        - Attachments
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "description": "Updated image", 
                "fileName": "Image123.png"
            }' "https://rest.zuora.com/v1/attachments/{attachment-id}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/attachments/{attachment-id}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "description": "Updated image", 
                "fileName": "Image123.png"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"description\": \"Updated image\", \n    \"fileName\": \"Image123.png\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/attachments/{attachment-id}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"description\": \"Updated image\", \n    \"fileName\": \"Image123.png\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/attachments/{attachment-id}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/attachments/{attachment-id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"description\": \"Updated image\", \n    \"fileName\": \"Image123.png\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/attachments/{attachment-id}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"description\": \"Updated image\", \n    \"fileName\": \"Image123.png\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/attachments/{object-type}/{object-key}":
    get:
      description: |
        Use the View Attachment REST request to get a list of attachments on an account, an invoice, a subscription, a credit memo, or a debit memo.

        **Note**: The Credit and Debit Memos feature is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 
      operationId: GET_AttachmentsList
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - description: |
            The type of the object to list attachements for.
          in: path
          name: object-type
          required: true
          schema:
            enum:
              - account
              - invoice
              - subscription
              - creditmemo
              - debitmemo
            type: string
        - description: |
            ID of the object to list attachements for.
             - If `object-type` is `account`, specify an account ID.
             - If `object-type` is `invoice`, specify an invoice ID.
             - If `object-type` is `subscription`, specify a subscription number.
             - If `object-type` is `creditmemo`, specify a credit memo ID.
             - If `object-type` is `debitmemo`, specify a debit memo ID.
          in: path
          name: object-key
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    attachments:
                      - createdBy: 402881e522cf4f9b0122cf5d82860002
                        createdOn: 2016-03-21 14:00:47
                        description: null
                        fileContentType: application/pdf
                        fileId: 402896b95397c169015397c2ebc50002
                        fileName: Search _ Splunk.pdf
                        id: 402896b95397c169015397c2ebca0003
                        success: true
                        updatedBy: 402881e522cf4f9b0122cf5d82860002
                        updatedOn: 2016-03-21 14:00:47
                      - createdBy: 4028e487327fd45a0132829ebb673ff9
                        createdOn: 2016-05-02 13:09:17
                        description: ""
                        fileContentType: text/plain
                        fileId: 8a8083e1545b706a01547316d9094400
                        fileName: AttachTest.txt
                        id: 8a8083e1545b706a01547316d93f4401
                        updatedBy: 4028e487327fd45a0132829ebb673ff9
                        updatedOn: 2016-05-02 13:09:17
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETAttachmentsResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List attachments by object type and key
      tags:
        - Attachments
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/attachments/{object-type}/{object-key}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/attachments/{object-type}/{object-key}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/attachments/{object-type}/{object-key}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/attachments/{object-type}/{object-key}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/attachments/{object-type}/{object-key}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/attachments/{object-type}/{object-key}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/bill-runs/{billRunId}/emails":
    post:
      description: |+
        Manually emails all the billing documents that are generated from a specified bill run to your customers. 


        Bill runs can generate invoices and credit memos based on your [invoice and credit memo generation rule](https://knowledgecenter.zuora.com/CB_Billing/Invoice_Settlement/Credit_and_Debit_Memos/Rules_for_Generating_Invoices_and_Credit_Memos). Credit memos are only available if you have the Invoice Settlement feature enabled.


        Using this API operation, the billing documents are sent to the email addresses specified in the **To Email** field of the email templates. The email template used for each billing document is set in the **Delivery Options** panel of the **Edit notification** dialog from the Zuora UI. See [Edit Email Templates](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/Notifications/Create_Email_Templates) for more information about how to edit the **To Email** field in the email template.





        ## Notes
          - Even though no field is required in the Request body, you still need to specify `{}` in the request. Otherwise, an error will be returned.


          - You can only email posted billing documents.
          
          
          - You must activate the following notifications before emailing invoices and credit memos:
            - **Manual Email For Invoice | Manual Email For Invoice** 
            - **Email Credit Memo | Manually email Credit Memo**
         
          
          - To include the invoice PDF in the email, select the **Include Invoice PDF** check box in the **Edit notification** dialog from the Zuora UI. To include the credit memo PDF in the email, select the **Include Credit Memo PDF** check box in the **Edit notification** dialog from the Zuora UI. See [Create and Edit Notifications](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/Notifications/C_Create_Notifications#section_2) for more information.



          - Zuora sends the email messages based on the email template you set. You can set the email template to use in the **Delivery Options** panel of the **Edit notification** dialog from the Zuora UI. By default, the following templates are used for billing documents:
            - Invoices: **Invoice Posted Default Email Template**
            - Credit memos: **Manual Email for Credit Memo Default Template**  

            See [Create and Edit Email Templates](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/Notifications/Create_Email_Templates) for more information.
          
          
      operationId: POST_EmailBillingDocumentsfromBillRun
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The ID of the bill run. For example, 2c92c8f95d0c886e015d11287a8f0f8b.
          in: path
          name: billRunId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTEmailBillingDocfromBillRunType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Email billing documents generated from a bill run
      tags:
        - Bill Run
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "resend": "true"
            }' "https://rest.zuora.com/v1/bill-runs/{billRunId}/emails"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/bill-runs/{billRunId}/emails');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "resend": "true"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"resend\": \"true\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/bill-runs/{billRunId}/emails")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"resend\": \"true\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/bill-runs/{billRunId}/emails", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/bill-runs/{billRunId}/emails")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"resend\": \"true\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/bill-runs/{billRunId}/emails");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"resend\": \"true\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/billing-documents:
    get:
      description: |
        Retrieves the information about all billing documents associated with a specified account. The billing documents contain invoices, credit memos, and debit memos. 

        To retrieve information about credit memos and debit memos, you must have the Invoice Settlement feature enabled. 

        You can use query parameters to restrict the data returned in the response.

        Examples:
        - /billing-documents?accountId=4028905f5e4feb38015e50af9aa002d1&sort=+documentDate
        - /billing-documents?accountId=4028905f5e4feb38015e50af9aa002d1&status=Posted
      operationId: GET_BillingDocuments
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - description: |
            The ID of the customer account that the billing documents are associated with. 
          in: query
          name: accountId
          required: true
          schema:
            format: uuid
            type: string
        - description: |
            The date of the billing document. It represents the invoice date for invoices, credit memo date for credit memos, and debit memo date for debit memos.
          in: query
          name: documentDate
          required: false
          schema:
            format: date
            type: string
        - description: |
            The status of the billing document.
          in: query
          name: status
          required: false
          schema:
            enum:
              - Draft
              - Posted
              - Canceled
              - Error
            type: string
        - description: |
            This parameter restricts the order of the data returned in the response. You can use this parameter to supply a dimension you want to sort on.

            If you do not specify any sortable field, the response data is sorted by the `documentDate` field in descending order.

            A sortable field uses the following form: 

            *operator* *field_name*

            You can use at most two sortable fields in one URL path. Use a comma to separate sortable fields. For example:  *operator* *field_name*, *operator* *field_name*  

            *operator* is used to mark the order of sequencing. The operator is optional. If you only specify the sortable field without any operator, the response data is sorted in descending order by this field.  

              - The `-` operator indicates an ascending order.
              - The `+` operator indicates a descending order.

            *field_name* indicates the name of a sortable field. The supported sortable fields of this operation are as below:

              - documentDate
              - documentType
              
            Examples:
            - /billing-documents?accountId=4028905f5e4feb38015e50af9aa002d1
              &sort=+documentDate,-documentType
            - /billing-documents?accountId=4028905f5e4feb38015e50af9aa002d1
              &status=Posted&sort=+documentDate&page=2&pageSize=15
          in: query
          name: sort
          required: false
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    documents:
                      - accountId: 4028905f5e4feb38bbb50af9aa002d1
                        amount: 100
                        balance: 90
                        documentDate: 2017-10-01
                        documentNumber: INV-0000001
                        documentType: Invoice
                        id: 4028905f5e4jjj015e50af9aa002d1
                        status: Posted
                      - accountId: 4028905f5e4feb38b111b50af9aa002d1
                        amount: 100
                        balance: 90
                        documentDate: 2017-09-01
                        documentNumber: CM-0000001
                        documentType: CreditMemo
                        id: 4028905f5e4jbbb015e50af9aa002d1
                        status: Posted
                      - accountId: 4028905f5e4feb3833b50af9aa002d1
                        amount: 100
                        balance: 90
                        documentDate: 2017-07-01
                        documentNumber: DM-0000001
                        documentType: DebitMemo
                        id: 4028905f5e4jccc015e50af9aa002d1
                        status: Posted
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/BillingDocumentQueryResponseElementType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List billing documents for an account
      tags:
        - Billing Documents
      x-code-samples:
        - lang: Curl
          source: |
            curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.sandbox.eu.zuora.com/v1/billing-documents?accountId=402892c74c9193cd014c91d35b0a0132"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/billing-documents');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/billing-documents")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/billing-documents", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/billing-documents")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/billing-documents");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  /v1/billing-preview-runs:
    post:
      description: |
        Creates a billing preview run for multiple customer accounts.

        You can run up to 20 billing preview runs in batches concurrently. A single batch of customer accounts can only have one billing preview run at a time. So you can have up to 20 batches running at the same time. If you create a billing preview run for all customer batches, you cannot create another billing preview run until this preview run is completed.
      operationId: POST_BillingPreviewRun
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PostBillingPreviewRunParam"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    billingPreviewRunId: 402890b757d1ec1b0157d5aa3d6802aa
                    success: true
            application/json; charset=utf-8:
              schema:
                properties:
                  billingPreviewRunId:
                    description: |
                      Id of the billing preview run.
                    type: string
                  success:
                    description: |
                      Returns `true` if the request was processed successfully.
                    type: boolean
                type: object
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Create a billing preview run
      tags:
        - Billing Preview Run
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "assumeRenewal": "None", 
                "batch": "", 
                "chargeTypeToExclude": "", 
                "includingEvergreenSubscription": "true", 
                "targetDate": "2017-01-10"
            }' "https://rest.zuora.com/v1/billing-preview-runs"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/billing-preview-runs');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "assumeRenewal": "None", 
                "batch": "", 
                "chargeTypeToExclude": "", 
                "includingEvergreenSubscription": "true", 
                "targetDate": "2017-01-10"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"assumeRenewal\": \"None\", \n    \"batch\": \"\", \n    \"chargeTypeToExclude\": \"\", \n    \"includingEvergreenSubscription\": \"true\", \n    \"targetDate\": \"2017-01-10\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/billing-preview-runs")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"assumeRenewal\": \"None\", \n    \"batch\": \"\", \n    \"chargeTypeToExclude\": \"\", \n    \"includingEvergreenSubscription\": \"true\", \n    \"targetDate\": \"2017-01-10\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/billing-preview-runs", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/billing-preview-runs")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"assumeRenewal\": \"None\", \n    \"batch\": \"\", \n    \"chargeTypeToExclude\": \"\", \n    \"includingEvergreenSubscription\": \"true\", \n    \"targetDate\": \"2017-01-10\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/billing-preview-runs");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"assumeRenewal\": \"None\", \n    \"batch\": \"\", \n    \"chargeTypeToExclude\": \"\", \n    \"includingEvergreenSubscription\": \"true\", \n    \"targetDate\": \"2017-01-10\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/billing-preview-runs/{billingPreviewRunId}":
    get:
      description: |
        Retrieves a preview of future invoice items for multiple customer accounts through a billing preview run. If you have the Invoice Settlement feature enabled,  you can also retrieve a preview of future credit memo items. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        A billing preview run asynchronously generates a downloadable CSV file containing a preview of invoice item data and credit memo item data for a batch of customer accounts.
      operationId: GET_BillingPreviewRun
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            Id of the billing preview run.
          in: path
          name: billingPreviewRunId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    assumeRenewal: Autorenew
                    batch: AllBatches
                    chargeTypeToExclude: OneTime
                    createdById: 4028906d58240f960158241132be0003
                    createdDate: 2016-11-04 16:18:56
                    endDate: 2016-11-04 16:19:00
                    errorMessage: null
                    includingEvergreenSubscription: true
                    resultFileUrl: https://rest.zuora.com/v1/files/4028906d582d21a101582e6b663c0a65
                    runNumber: BPR-00000010
                    startDate: 2016-11-04 16:19:00
                    status: Completed
                    succeededAccounts: 7
                    success: true
                    targetDate: 2016-12-01
                    totalAccounts: 7
                    updatedById: 4028906d58240f960158241132be0003
                    updatedDate: 2016-11-04 16:19:00
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GetBillingPreviewRunResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a billing preview run
      tags:
        - Billing Preview Run
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/billing-preview-runs/{billingPreviewRunId}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/billing-preview-runs/{billingPreviewRunId}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/billing-preview-runs/{billingPreviewRunId}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/billing-preview-runs/{billingPreviewRunId}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/billing-preview-runs/{billingPreviewRunId}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/billing-preview-runs/{billingPreviewRunId}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  /v1/bulk:
    post:
      description: |
        Describes how to perform a mass action through the REST API. 

        Using this API method, you send a multipart/form-data request containing a `.csv` file with data about the mass action you want to perform. Zuora returns a key and then asynchronously processes the mass action. You can use the key to get details about the result of the mass action.

        If you want to use this operation to perform the Mass Payment Upload (MPU) mass action, see [Mass Payment Upload](https://knowledgecenter.zuora.com/Billing/Finance/Mass_Updater/Mass_Payment_Upload) for more information.
      operationId: POST_MassUpdater
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
      requestBody:
        content:
          multipart/form-data:
            schema:
              properties:
                file:
                  description: |
                    File containing data about the mass action you want to perform. The file requirements are the same as when uploading a file through the Mass Updater in the Zuora UI. The file must be a `.csv` file or a zipped `.csv` file.

                    The maximum file size is 4 MB.

                    The data in the file must be formatted according to the mass action type you want to perform.
                  format: binary
                  type: string
                params:
                  description: |
                    Container for the following fields. You must format this parameter as a JSON object.

                    * `actionType` (string, **Required**) - Type of mass action you want to perform. The following mass actions are supported: `UpdateAccountingCode`, `CreateRevenueSchedule`, `UpdateRevenueSchedule`, `DeleteRevenueSchedule`, `ImportFXRate`, and `MPU`.

                    * `checksum` (string) - An MD5 checksum that is used to validate the integrity of
                      the uploaded file. The checksum is a 32-character string.
                  type: string
              required:
                - file
                - params
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    bulkKey: 402892f04c97b89a014c97bb30a50003
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTMassUpdateResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Perform a mass action
      tags:
        - Mass Updater
      x-code-samples:
        - lang: Curl
          source: |
            curl -X POST -H "Authorization: Bearer f21f017e4724445d8647b1f0de7ed6f1" -F "file=@CreateRevenueSchedules.csv" -F "params="{\"actionType\": \"CreateRevenueSchedule\"}" "https://rest.zuora.com/v1/bulk"
  "/v1/bulk/{bulk-key}":
    get:
      description: |
        Describes how to get information about the result of a mass action through the REST API. 
      operationId: GET_MassUpdater
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            String of 32 characters that identifies a mass action. You get the bulk-key after performing a mass action through the REST API.
          in: path
          name: bulk-key
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    actionType: UpdateAccountingCode
                    endedOn: 2015-04-07 14:32:01
                    errorCount: 1
                    inputSize: 354
                    outputSize: 350
                    outputType: (url:.csv.zip)
                    outputURL: https://rest.zuora.com/v1/files/402892c84c9285b1014c9293f5320007
                    processedCount: 3
                    startedOn: 2015-04-07 14:22:11
                    status: Completed
                    success: true
                    successCount: 2
                    totalCount: 3
                    uploadedBy: smith@example.com
                    uploadedOn: 2015-04-07 14:22:09
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETMassUpdateType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List all results of a mass action
      tags:
        - Mass Updater
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/bulk/{bulk-key}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/bulk/{bulk-key}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/bulk/{bulk-key}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/bulk/{bulk-key}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/bulk/{bulk-key}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/bulk/{bulk-key}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/bulk/{bulk-key}/stop":
    put:
      description: |
        Describes how to stop a mass action through the REST API. You can stop a mass action when its status is Pending or Processing. After you have stopped a mass action, you can get the mass action result to see details of the mass action.

        - If you stop a mass action when its status is Pending, no response file is generated because no records have been processed.

        - If you stop a mass action when its status is Processing, a response file is generated. You can check the response file to see which records have been processed and which have not. In the response file, the **Success** column has the value `Y` (successful) or `N` (failed) for processed records, and a blank value for unprocessed records.

        Records that have already been processed when a mass action is stopped are not rolled back.
      operationId: PUT_MassUpdater
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            String of 32 characters that identifies a mass action. You get the bulk-key after performing a mass action through the REST API.
          in: path
          name: bulk-key
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Stop a mass action
      tags:
        - Mass Updater
      x-code-samples:
        - lang: Curl
          source: "curl -X PUT -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" -d '{}' \"https://rest.zuora.com/v1/bulk/{bulk-key}/stop\""
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/bulk/{bulk-key}/stop');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/bulk/{bulk-key}/stop")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/bulk/{bulk-key}/stop", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/bulk/{bulk-key}/stop")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/bulk/{bulk-key}/stop");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/catalog/product/{product-id}":
    get:
      description: |
        Retrieves detailed information about a specific product, including information about its product rate plans and charges. 
      operationId: GET_Product
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The minor version of the Zuora REST API. 

            You only need to set this parameter if you use the `productRatePlans` field.
          in: header
          name: zuora-version
          required: false
          schema:
            type: string
        - description: The unique ID of the product you want to retrieve. For example, 8a808255575bdae4015774e9602e16fe.
          in: path
          name: product-id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    category: Base Products
                    description: ""
                    effectiveEndDate: 2020-01-01
                    effectiveStartDate: 2017-01-01
                    id: 8a8082c45aa81b51015ad5a2d07d0e89
                    name: ABC
                    productRatePlans: https://rest.zuora.com/v1/rateplan/40289f466463d683016463ef8b7301a0/productRatePlan
                    sku: SKU-00000987
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETProductType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a product
      tags:
        - Catalog
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/catalog/product/{product-id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/catalog/product/{product-id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/catalog/product/{product-id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/catalog/product/{product-id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/catalog/product/{product-id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/catalog/product/{product-id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  /v1/catalog/products:
    get:
      description: |
        Retrieves the entire product catalog, including all products, features, and their corresponding product rate plans, charges. Products are returned in reverse chronological order on the `UpdatedDate` field. 

        With product rate plans and rate plan charges, the REST API has a maximum array size. 

        For a use case of this operation, see [Retrieve the product catalog](https://www.zuora.com/developer/api-guides/#Retrieve-the-product-catalog).
      operationId: GET_Catalog
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_page"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize_catalog"
        - description: |
            The minor version of the Zuora REST API. 

            You only need to set this parameter if you use the `productRatePlans` field.
          in: header
          name: zuora-version
          required: false
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    products:
                      - category: Base Products
                        description: ""
                        effectiveEndDate: 2020-01-01
                        effectiveStartDate: 2017-01-01
                        id: 8a8082c45aa81b51015ad5a2d07d0e89
                        name: ABC
                        productRatePlans: https://rest.zuora.com/v1/rateplan/40289f466463d683016463ef8b7301a0/productRatePlan
                        sku: SKU-00000987
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETCatalogType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List all products
      tags:
        - Catalog
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/catalog/products"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/catalog/products');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/catalog/products")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/catalog/products", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/catalog/products")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/catalog/products");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/catalog/products/{product-id}/share":
    post:
      description: |
        **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](http://support.zuora.com/).

        Shares a product with a target entity. Zuora synchronizes the shared products to the target entity after sharing. For more information about product sharing, see [Products Sharing Across Entities](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity/C_Business_Objects_Sharing_Across_Entities/B_Products_Sharing_Across_Entities).

        Note that:

        - You must finish all the [prerequisites](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity/C_Business_Objects_Sharing_Across_Entities/B_Products_Sharing_Across_Entities/Share_Products) before sharing products with other entities. 

        - Only source entity administrators have permission to share products with other entities. You must make the call as a source entity administrator.

        - Currently, you can only share a product with one entity at a time. An error occurs if you try to share a product to more than one entity.
      operationId: POST_Catalog
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: The unique ID of the product you want to share. For example, 8a808255575bdae4015774e9602e16fe.
          in: path
          name: product-id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTCatalogType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "Multi-entity: Share a product with an entity"
      tags:
        - Catalog
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "targetEntityIds": [
                    "8a80825555a3c7a10155b460f53858e6"
                ]
            }' "https://rest.zuora.com/v1/catalog/products/{product-id}/share"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/catalog/products/{product-id}/share');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "targetEntityIds": [
                    "8a80825555a3c7a10155b460f53858e6"
                ]
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"targetEntityIds\": [\n        \"8a80825555a3c7a10155b460f53858e6\"\n    ]\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/catalog/products/{product-id}/share")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"targetEntityIds\": [\n        \"8a80825555a3c7a10155b460f53858e6\"\n    ]\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/catalog/products/{product-id}/share", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/catalog/products/{product-id}/share")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"targetEntityIds\": [\n        \"8a80825555a3c7a10155b460f53858e6\"\n    ]\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/catalog/products/{product-id}/share");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"targetEntityIds\": [\n        \"8a80825555a3c7a10155b460f53858e6\"\n    ]\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/charge-revenue-summaries/subscription-charges/{charge-key}":
    get:
      description: |
        Retrieves the details of a charge revenue summary by specifying the subscription charge ID. This response retrieves all revenue items associated with a charge revenue summary.
      operationId: GET_CRSByChargeID
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            ID of the subscription rate plan charge; for example, 402892793e173340013e173b81000012.
          in: path
          name: charge-key
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 2c92c0f9410f55ee014110a008f6791f
                    amount: 428
                    currency: USD
                    notes: null
                    number: CRS-00000001
                    recognitionRuleName: Recognize daily over time
                    recognizedRevenue: 0
                    revenueItems:
                      - accountingPeriodEndDate: 2012-05-31
                        accountingPeriodName: May 2012
                        accountingPeriodStartDate: 2012-05-01
                        amount: 100
                        currency: USD
                        isAccountingPeriodClosed: false
                      - accountingPeriodEndDate: 2012-06-30
                        accountingPeriodName: Jun 2012
                        accountingPeriodStartDate: 2012-06-01
                        amount: 92
                        currency: USD
                        isAccountingPeriodClosed: false
                      - accountingPeriodEndDate: 2012-07-31
                        accountingPeriodName: Jul 2012
                        accountingPeriodStartDate: 2012-07-01
                        amount: 0
                        currency: USD
                        isAccountingPeriodClosed: false
                      - accountingPeriodEndDate: 2012-08-31
                        accountingPeriodName: Aug 2012
                        accountingPeriodStartDate: 2012-08-01
                        amount: 85
                        currency: USD
                        isAccountingPeriodClosed: false
                      - accountingPeriodEndDate: 2012-09-30
                        accountingPeriodName: Sep 2012
                        accountingPeriodStartDate: 2012-09-01
                        amount: 85
                        currency: USD
                        isAccountingPeriodClosed: false
                      - accountingPeriodEndDate: 2013-01-31
                        accountingPeriodName: Jan'2013
                        accountingPeriodStartDate: 2013-01-01
                        amount: 80
                        currency: USD
                        isAccountingPeriodClosed: false
                      - accountingPeriodEndDate: 2013-02-28
                        accountingPeriodName: Feb'2013
                        accountingPeriodStartDate: 2013-02-01
                        amount: 5
                        currency: USD
                        isAccountingPeriodClosed: false
                      - accountingPeriodEndDate: 2013-09-30
                        accountingPeriodName: Sep'2013
                        accountingPeriodStartDate: 2013-09-01
                        amount: -7
                        currency: USD
                        isAccountingPeriodClosed: false
                      - accountingPeriodEndDate: 2013-11-30
                        accountingPeriodName: Nov'2013
                        accountingPeriodStartDate: 2013-11-01
                        amount: -12
                        currency: USD
                        isAccountingPeriodClosed: false
                      - accountingPeriodEndDate: 2014-01-10
                        accountingPeriodName: Dec 2013
                        accountingPeriodStartDate: 2013-12-11
                        amount: 0
                        currency: USD
                        isAccountingPeriodClosed: false
                      - accountingPeriodEndDate: null
                        accountingPeriodName: Open-Ended
                        accountingPeriodStartDate: 2014-03-12
                        amount: 0
                        currency: USD
                        isAccountingPeriodClosed: false
                    subscriptionChargeId: 2c92c0f9410f55dd014110b22cbc023f
                    subscriptionId: 2c92c0f9410f55dd014110a14aa47f09
                    success: true
                    undistributedUnrecognizedRevenue: 0
                    unrecognizedRevenue: 428
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETChargeRSDetailType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a charge revenue summary by charge ID
      tags:
        - Charge Revenue Summaries
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/charge-revenue-summaries/subscription-charges/{charge-key}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/charge-revenue-summaries/subscription-charges/{charge-key}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/charge-revenue-summaries/subscription-charges/{charge-key}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/charge-revenue-summaries/subscription-charges/{charge-key}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/charge-revenue-summaries/subscription-charges/{charge-key}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/charge-revenue-summaries/subscription-charges/{charge-key}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/charge-revenue-summaries/{crs-number}":
    get:
      description: |
        Retrieves the details of a charge revenue summary by specifying the charge revenue summary number. The response includes all revenue items associated with the charge revenue summary.
      operationId: GET_CRSByCRSNumber
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The charge revenue summary number.
          in: path
          name: crs-number
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 2c92c0f8439770960143b2141f5a555e
                    amount: 660
                    currency: USD
                    notes: null
                    number: CRS-00000001
                    recognitionRuleName: Recognize upon invoicing
                    recognizedRevenue: 0
                    revenueItems:
                      - accountingPeriodEndDate: 2013-09-30
                        accountingPeriodName: Sep'2013
                        accountingPeriodStartDate: 2013-09-01
                        amount: 35
                        currency: USD
                        isAccountingPeriodClosed: false
                      - accountingPeriodEndDate: 2013-10-31
                        accountingPeriodName: Oct'2013
                        accountingPeriodStartDate: 2013-10-01
                        amount: 50
                        currency: USD
                        isAccountingPeriodClosed: false
                      - accountingPeriodEndDate: null
                        accountingPeriodName: Open-Ended
                        accountingPeriodStartDate: 2013-12-11
                        amount: 150
                        currency: USD
                        isAccountingPeriodClosed: false
                    subscriptionChargeId: 2c92c0f943977b4f0143b11187ed432e
                    subscriptionId: 2c92c0f943977b4f0143b23487999327
                    success: true
                    undistributedUnrecognizedRevenue: 565
                    unrecognizedRevenue: 660
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETChargeRSDetailType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List all details of a charge revenue summary
      tags:
        - Charge Revenue Summaries
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/charge-revenue-summaries/{crs-number}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/charge-revenue-summaries/{crs-number}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/charge-revenue-summaries/{crs-number}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/charge-revenue-summaries/{crs-number}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/charge-revenue-summaries/{crs-number}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/charge-revenue-summaries/{crs-number}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  /v1/connections:
    post:
      description: |
        Establishes a connection to the Zuora REST API service based on a valid user credentials. 

        **Note:**This is a legacy REST API. Zuora recommends you to use [OAuth](https://www.zuora.com/developer/api-reference/#section/Authentication/OAuth-v2.0) for authentication instead. 

        This call authenticates the user and returns an API session cookie that's used to authorize subsequent calls to the REST API. The credentials must belong to a user account that has permission to access the API service.

        As noted elsewhere, it's strongly recommended that an account used for Zuora API activity is never used to log into the Zuora UI.  Once an account is used to log into the UI, it may be subject to periodic forced password changes, which may eventually lead to authentication failures when using the API.
      operationId: POST_Connections
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            Account username
          in: header
          name: apiAccessKeyId
          required: true
          schema:
            type: string
        - description: |
            Account password
          in: header
          name: apiSecretAccessKey
          required: true
          schema:
            type: string
        - description: |
            Must be set to "application/json"
          in: header
          name: Content-Type
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Establish a connection to Zuora REST API
      tags:
        - Connections
      x-code-samples:
        - lang: Curl
          source: "curl -X POST -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" -d '{}' \"https://rest.zuora.com/v1/connections\""
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/connections');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/connections")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/connections", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/connections")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/connections");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/contacts/{contactId}/scrub":
    put:
      description: |
        
        Scrubs the sensitive data of a specific contact. 

        You can use this operation to replace all sensitive data in a contact and its related contact snapshot with dummy values that will be stored in Zuora databases. 

        After scrubbing a contact, it is good practice to delete it. Otherwise, it might cause errors in subsequent operations.

        **Note**: To use this operation, you must ensure that the "Scrub Sensitive Data of Contact" billing permission is enabled in your user role. Contact your tenant administrator if you want to enable this permission. See [Scrub Contacts](https://knowledgecenter.zuora.com/BC_Subscription_Management/Customer_Accounts/A_How_to_Manage_Customer_Accounts/B_Key_Contacts/Scrub_Contacts) for more information.
      operationId: PUT_ScrubContact
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: |
            The ID of the contact that you want to scrub sensitive data from.
          in: path
          name: contactId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Scrub a contact
      tags:
        - Contacts
      x-code-samples:
        - lang: Curl
          source: "curl -X PUT -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" -d '{}' \"https://rest.zuora.com/v1/contacts/{contactId}/scrub\""
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/contacts/{contactId}/scrub');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/contacts/{contactId}/scrub")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/contacts/{contactId}/scrub", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/contacts/{contactId}/scrub")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/contacts/{contactId}/scrub");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/creditmemos:
    get:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Retrieves the information about all credit memos. 

        For a use case of this operation, see [Get credit memo](https://www.zuora.com/developer/api-guides/#Get-credit-memo).


        ### Filtering

        You can use query parameters to restrict the data returned in the response. Each query parameter corresponds to one field in the response body.

        If the value of a filterable field is string, you can set the corresponding query parameter to `null` when filtering. Then, you can get the response data with this field value being `null`. 
          
        Examples:

        - /v1/creditmemos?status=Posted

        - /v1/creditmemos?referredInvoiceId=null&status=Draft

        - /v1/creditmemos?status=Posted&type=External&sort=+number
      operationId: GET_CreditMemos
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - description: |
            This parameter filters the response based on the `accountId` field. 
          in: query
          name: accountId
          required: false
          schema:
            type: string
        - description: |
            This parameter filters the response based on the `amount` field. 
          in: query
          name: amount
          required: false
          schema:
            format: double
            type: number
        - description: |
            This parameter filters the response based on the `appliedAmount` field. 
          in: query
          name: appliedAmount
          required: false
          schema:
            format: double
            type: number
        - description: |
            This parameter filters the response based on the `autoApplyUponPosting` field. 
          in: query
          name: autoApplyUponPosting
          required: false
          schema:
            type: boolean
        - description: |
            This parameter filters the response based on the `createdById` field. 
          in: query
          name: createdById
          required: false
          schema:
            type: string
        - description: |
            This parameter filters the response based on the `createdDate` field. 
          in: query
          name: createdDate
          required: false
          schema:
            format: date-time
            type: string
        - description: |
            This parameter filters the response based on the `creditMemoDate` field. 
          in: query
          name: creditMemoDate
          required: false
          schema:
            format: date
            type: string
        - description: |
            This parameter filters the response based on the `currency` field. 
          in: query
          name: currency
          required: false
          schema:
            type: string
        - description: |
            This parameter filters the response based on the `excludeFromAutoApplyRules` field. 
          in: query
          name: excludeFromAutoApplyRules
          required: false
          schema:
            type: boolean
        - description: |
            This parameter filters the response based on the `number` field. 
          in: query
          name: number
          required: false
          schema:
            type: string
        - description: |
            This parameter filters the response based on the `referredInvoiceId` field. 
          in: query
          name: referredInvoiceId
          required: false
          schema:
            type: string
        - description: |
            This parameter filters the response based on the `refundAmount` field. 
          in: query
          name: refundAmount
          required: false
          schema:
            format: double
            type: number
        - description: |
            This parameter filters the response based on the `status` field. 
          in: query
          name: status
          required: false
          schema:
            enum:
              - Draft
              - Posted
              - Canceled
              - Error
              - PendingForTax
              - Generating
              - CancelInProgress
            type: string
        - description: |
            This parameter filters the response based on the `targetDate` field. 
          in: query
          name: targetDate
          required: false
          schema:
            format: date
            type: string
        - description: |
            This parameter filters the response based on the `taxAmount` field. 
          in: query
          name: taxAmount
          required: false
          schema:
            format: double
            type: number
        - description: |
            This parameter filters the response based on the `totalTaxExemptAmount` field.
          in: query
          name: totalTaxExemptAmount
          required: false
          schema:
            format: double
            type: number
        - description: |
            This parameter filters the response based on the `transferredToAccounting` field. 
          in: query
          name: transferredToAccounting
          required: false
          schema:
            enum:
              - Processing
              - Yes
              - No
              - Error
              - Ignore
            type: string
        - description: |
            This parameter filters the response based on the `unappliedAmount` field. 
          in: query
          name: unappliedAmount
          required: false
          schema:
            format: double
            type: number
        - description: |
            This parameter filters the response based on the `updatedById` field. 
          in: query
          name: updatedById
          required: false
          schema:
            type: string
        - description: |
            This parameter filters the response based on the `updatedDate` field.
          in: query
          name: updatedDate
          required: false
          schema:
            format: date-time
            type: string
        - description: |
            This parameter restricts the order of the data returned in the response. You can use this parameter to supply a dimension you want to sort on.

            A sortable field uses the following form: 

            *operator* *field_name*

            You can use at most two sortable fields in one URL path. Use a comma to separate sortable fields. For example:  *operator* *field_name*, *operator* *field_name*  

            *operator* is used to mark the order of sequencing. The operator is optional. If you only specify the sortable field without any operator, the response data is sorted in descending order by this field.

              - The `-` operator indicates an ascending order.
              - The `+` operator indicates a descending order.

            By default, the response data is displayed in descending order by credit memo number.

            *field_name* indicates the name of a sortable field. The supported sortable fields of this operation are as below:

              - accountId
              - amount
              - appliedAmount
              - createdById
              - createdDate
              - creditMemoDate
              - number
              - referredInvoiceId
              - refundAmount
              - status
              - targetDate
              - taxAmount
              - totalTaxExemptAmount
              - transferredToAccounting
              - unappliedAmount
              - updatedDate

              
            Examples:

            - /v1/creditmemos?sort=+number

            - /v1/creditmemos?status=Processed&sort=-number,+amount
          in: query
          name: sort
          required: false
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    creditmemos:
                      - accountId: 2c92c8f95bd63b98015bd7ab09ef0926
                        amount: 23
                        appliedAmount: 0
                        autoApplyUponPosting: false
                        cancelledById: null
                        cancelledOn: null
                        comment: ""
                        createdById: 2c92c8f95b79c9ad015b80614273052c
                        createdDate: 2017-05-05 01:39:30
                        creditMemoDate: 2017-05-05
                        currency: USD
                        excludeFromAutoApplyRules: false
                        id: 2c92c8f95bd63b94015bd7c39289112e
                        latestPDFFileId: 2c92c8955bd63b6c015bd7c395e90023
                        number: CM00000002
                        postedById: null
                        postedOn: null
                        reasonCode: Correcting invoice error
                        referredInvoiceId: null
                        refundAmount: 0
                        source: BillRun
                        sourceId: BR-00000024
                        status: Draft
                        targetDate: null
                        taxAmount: 0
                        taxMessage: null
                        taxStatus: null
                        totalTaxExemptAmount: 0
                        transferredToAccounting: No
                        unappliedAmount: 23
                        updatedById: 2c92c8f95b79c9ad015b80614273052c
                        updatedDate: 2017-05-05 01:39:30
                      - accountId: 2c92c8f95bd63b98015bd7ab09ef0926
                        amount: 10
                        appliedAmount: 0
                        autoApplyUponPosting: false
                        cancelledById: null
                        cancelledOn: null
                        comment: ""
                        createdById: 2c92c8f95b79c9ad015b80614273052c
                        createdDate: 2017-05-05 01:15:23
                        creditMemoDate: 2017-05-01
                        currency: USD
                        excludeFromAutoApplyRules: false
                        id: 2c92c8f95bd63b9d015bd7ad7fe206f9
                        latestPDFFileId: 2c92c8955bd63b6c015bd7ad8921001d
                        number: CM00000001
                        postedById: null
                        postedOn: null
                        reasonCode: Correcting invoice error
                        referredInvoiceId: 2c92c8955bd63cc1015bd7c151af02ab
                        refundAmount: 0
                        source: AdhocFromInvoice
                        sourceId: null
                        status: Draft
                        targetDate: null
                        taxAmount: 0
                        taxMessage: null
                        taxStatus: null
                        totalTaxExemptAmount: 0
                        transferredToAccounting: No
                        unappliedAmount: 10
                        updatedById: 2c92c8f95b79c9ad015b80614273052c
                        updatedDate: 2017-05-05 01:15:24
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETCreditMemoCollectionType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List credit memos
      tags:
        - Credit Memos
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/creditmemos"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/creditmemos');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/creditmemos")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/creditmemos", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/creditmemos")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/creditmemos");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    post:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Creates an ad-hoc credit memo from a product rate plan charge. Zuora supports the creation of credit memos from any type of product rate plan charge. The charges can also have any amount and any charge model, except for discout charge models. 

        When credit memos are created from product rate plan charges, the specified amount with decimal places is now validated based on the decimal places supported by each currency.

        You can create a credit memo only if you have the user permission. See [Billing Roles](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/A_Administrator_Settings/User_Roles/d_Billing_Roles) for more information.

        For a use case of this operation, see [Create credit memo](https://www.zuora.com/developer/api-guides/#Create-credit-memo).
      operationId: POST_CreditMemoFromPrpc
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            
            The minor version of the Zuora REST API. See [Minor Version](https://www.zuora.com/developer/api-reference/#section/API-Versions/Minor-Version) for information about REST API version control. 

            This header affects the availability of the following request fields:
            * `charges` > `amount`
            * `charges` > `memoItemAmount`
            * `charges` > `chargeId`
            * `charges` > `productRatePlanChargeId`            
            * `charges` > `comment`
            * `charges` > `description`
          in: header
          name: zuora-version
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/CreditMemoFromChargeType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 402890555a7e9791015a7f15fe44001c
                    amount: 2020
                    appliedAmount: 0
                    autoApplyUponPosting: false
                    cancelledById: null
                    cancelledOn: null
                    comment: the comment
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-03-01 15:31:10
                    creditMemoDate: 2017-10-17
                    currency: USD
                    excludeFromAutoApplyRules: false
                    id: 402890555a87d7f5015a88c7a6830022
                    latestPDFFileId: null
                    number: CM00000015
                    postedById: null
                    postedOn: null
                    reasonCode: Correcting invoice error
                    referredInvoiceId: null
                    refundAmount: 0
                    source: AdhocFromPrpc
                    sourceId: null
                    status: Draft
                    success: true
                    targetDate: null
                    taxAmount: 0
                    taxMessage: null
                    taxStatus: null
                    totalTaxExemptAmount: 0
                    transferredToAccounting: No
                    unappliedAmount: 2020
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 15:31:10
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETCreditMemoType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Create a credit memo from a charge
      tags:
        - Credit Memos
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "accountId": "402890555a7e9791015a7f15fe44001c", 
                "autoPost": false, 
                "charges": [
                    {
                        "amount": null, 
                        "chargeId": "402890555a87d7f5015a88c613c5001e", 
                        "comment": "this is comment1", 
                        "quantity": 1, 
                        "serviceEndDate": "2018-10-17", 
                        "serviceStartDate": "2017-10-17"
                    }, 
                    {
                        "amount": 20, 
                        "chargeId": "402890555a7d4022015a7d90906b0067", 
                        "comment": "this is comment2", 
                        "serviceEndDate": "2018-10-17", 
                        "serviceStartDate": "2017-10-17"
                    }
                ], 
                "comment": "the comment", 
                "effectiveDate": "2017-10-17", 
                "reasonCode": "Correcting invoice error"
            }' "https://rest.zuora.com/v1/creditmemos"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/creditmemos');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "accountId": "402890555a7e9791015a7f15fe44001c", 
                "autoPost": false, 
                "charges": [
                    {
                        "amount": null, 
                        "chargeId": "402890555a87d7f5015a88c613c5001e", 
                        "comment": "this is comment1", 
                        "quantity": 1, 
                        "serviceEndDate": "2018-10-17", 
                        "serviceStartDate": "2017-10-17"
                    }, 
                    {
                        "amount": 20, 
                        "chargeId": "402890555a7d4022015a7d90906b0067", 
                        "comment": "this is comment2", 
                        "serviceEndDate": "2018-10-17", 
                        "serviceStartDate": "2017-10-17"
                    }
                ], 
                "comment": "the comment", 
                "effectiveDate": "2017-10-17", 
                "reasonCode": "Correcting invoice error"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"accountId\": \"402890555a7e9791015a7f15fe44001c\", \n    \"autoPost\": false, \n    \"charges\": [\n        {\n            \"amount\": null, \n            \"chargeId\": \"402890555a87d7f5015a88c613c5001e\", \n            \"comment\": \"this is comment1\", \n            \"quantity\": 1, \n            \"serviceEndDate\": \"2018-10-17\", \n            \"serviceStartDate\": \"2017-10-17\"\n        }, \n        {\n            \"amount\": 20, \n            \"chargeId\": \"402890555a7d4022015a7d90906b0067\", \n            \"comment\": \"this is comment2\", \n            \"serviceEndDate\": \"2018-10-17\", \n            \"serviceStartDate\": \"2017-10-17\"\n        }\n    ], \n    \"comment\": \"the comment\", \n    \"effectiveDate\": \"2017-10-17\", \n    \"reasonCode\": \"Correcting invoice error\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/creditmemos")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"accountId\": \"402890555a7e9791015a7f15fe44001c\", \n    \"autoPost\": false, \n    \"charges\": [\n        {\n            \"amount\": null, \n            \"chargeId\": \"402890555a87d7f5015a88c613c5001e\", \n            \"comment\": \"this is comment1\", \n            \"quantity\": 1, \n            \"serviceEndDate\": \"2018-10-17\", \n            \"serviceStartDate\": \"2017-10-17\"\n        }, \n        {\n            \"amount\": 20, \n            \"chargeId\": \"402890555a7d4022015a7d90906b0067\", \n            \"comment\": \"this is comment2\", \n            \"serviceEndDate\": \"2018-10-17\", \n            \"serviceStartDate\": \"2017-10-17\"\n        }\n    ], \n    \"comment\": \"the comment\", \n    \"effectiveDate\": \"2017-10-17\", \n    \"reasonCode\": \"Correcting invoice error\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/creditmemos", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/creditmemos")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"accountId\": \"402890555a7e9791015a7f15fe44001c\", \n    \"autoPost\": false, \n    \"charges\": [\n        {\n            \"amount\": null, \n            \"chargeId\": \"402890555a87d7f5015a88c613c5001e\", \n            \"comment\": \"this is comment1\", \n            \"quantity\": 1, \n            \"serviceEndDate\": \"2018-10-17\", \n            \"serviceStartDate\": \"2017-10-17\"\n        }, \n        {\n            \"amount\": 20, \n            \"chargeId\": \"402890555a7d4022015a7d90906b0067\", \n            \"comment\": \"this is comment2\", \n            \"serviceEndDate\": \"2018-10-17\", \n            \"serviceStartDate\": \"2017-10-17\"\n        }\n    ], \n    \"comment\": \"the comment\", \n    \"effectiveDate\": \"2017-10-17\", \n    \"reasonCode\": \"Correcting invoice error\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/creditmemos");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"accountId\": \"402890555a7e9791015a7f15fe44001c\", \n    \"autoPost\": false, \n    \"charges\": [\n        {\n            \"amount\": null, \n            \"chargeId\": \"402890555a87d7f5015a88c613c5001e\", \n            \"comment\": \"this is comment1\", \n            \"quantity\": 1, \n            \"serviceEndDate\": \"2018-10-17\", \n            \"serviceStartDate\": \"2017-10-17\"\n        }, \n        {\n            \"amount\": 20, \n            \"chargeId\": \"402890555a7d4022015a7d90906b0067\", \n            \"comment\": \"this is comment2\", \n            \"serviceEndDate\": \"2018-10-17\", \n            \"serviceStartDate\": \"2017-10-17\"\n        }\n    ], \n    \"comment\": \"the comment\", \n    \"effectiveDate\": \"2017-10-17\", \n    \"reasonCode\": \"Correcting invoice error\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/creditmemos/{creditMemoId}":
    delete:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Deletes a credit memo. Only credit memos with the Cancelled status can be deleted. 

        You can delete a credit memo only if you have the user permission. See [Billing Roles](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/A_Administrator_Settings/User_Roles/d_Billing_Roles) for more information.
      operationId: DELETE_CreditMemo
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172.
          in: path
          name: creditMemoId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Delete a credit memo
      tags:
        - Credit Memos
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/creditmemos/{creditMemoId}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/creditmemos/{creditMemoId}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/creditmemos/{creditMemoId}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/v1/creditmemos/{creditMemoId}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/creditmemos/{creditMemoId}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/creditmemos/{creditMemoId}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Retrieves the information about a specific credit memo.

        For a use case of this operation, see [Get credit memo](https://www.zuora.com/developer/api-guides/#Get-credit-memo).
      operationId: GET_CreditMemo
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172.
          in: path
          name: creditMemoId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 402890555a7e9791015a7f15fe44001c
                    amount: 3.1
                    appliedAmount: 0
                    autoApplyUponPosting: false
                    cancelledById: null
                    cancelledOn: null
                    comment: ""
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-03-01 10:07:10
                    creditMemoDate: 2017-03-01
                    currency: USD
                    excludeFromAutoApplyRules: false
                    id: 402890555a7e9791015a879f064a0054
                    latestPDFFileId: 402890555a7e9791015a879f07fb005e
                    number: CM00000012
                    postedById: null
                    postedOn: null
                    reasonCode: Correcting invoice error
                    referredInvoiceId: 402890555a7e9791015a7f1756aa0035
                    refundAmount: 0
                    source: API
                    sourceId: null
                    status: Draft
                    success: true
                    targetDate: null
                    taxAmount: 0.1
                    taxMessage: null
                    taxStatus: null
                    totalTaxExemptAmount: 0
                    transferredToAccounting: No
                    unappliedAmount: 3.1
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 10:08:43
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETCreditMemoType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a credit memo
      tags:
        - Credit Memos
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/creditmemos/{creditMemoId}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/creditmemos/{creditMemoId}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/creditmemos/{creditMemoId}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/creditmemos/{creditMemoId}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/creditmemos/{creditMemoId}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/creditmemos/{creditMemoId}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Updates the basic and finance information about a credit memo. Currently, Zuora supports updating tax-exclusive memo items, but does not support updating tax-inclusive memo items. 

        If the amount of a memo item is updated, the tax will be recalculated in the following conditions:
          - The memo is created from a product rate plan charge and you use Avalara to calculate the tax.
          - The memo is created from an invoice and you use Avalara or Zuora Tax to calculate the tax.

        You can update a credit memo only if you have the user permission. See [Billing Roles](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/A_Administrator_Settings/User_Roles/d_Billing_Roles) for more information.
      operationId: PUT_UpdateCreditMemo
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172. 
          in: path
          name: creditMemoId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTCreditMemoType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 4028905f5a87c0ff015a87d25ae90025
                    amount: 10.76
                    appliedAmount: 0
                    autoApplyUponPosting: false
                    cancelledById: null
                    cancelledOn: null
                    comment: ""
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-03-02 13:17:51
                    creditMemoDate: 2017-03-02
                    currency: USD
                    excludeFromAutoApplyRules: true
                    id: 4028905f5a890526015a8d73f73d0015
                    latestPDFFileId: 4028905f5a890526015a8d7408730024
                    number: CM00000001
                    postedById: null
                    postedOn: null
                    reasonCode: Correcting invoice error
                    referredInvoiceId: 4028905f5a87c0ff015a87d3f8f10043
                    refundAmount: 0
                    source: AdhocFromPrpc
                    sourceId: null
                    status: Draft
                    success: true
                    targetDate: null
                    taxAmount: 0.76
                    taxMessage: null
                    taxStatus: null
                    totalTaxExemptAmount: 0
                    transferredToAccounting: No
                    unappliedAmount: 10.76
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-02 13:19:00
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETCreditMemoType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Update a credit memo
      tags:
        - Credit Memos
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "autoApplyUponPosting": false, 
                "comment": "new comment", 
                "effectiveDate": "2017-04-17", 
                "excludeFromAutoApplyRules": false, 
                "items": [
                    {
                        "amount": 1, 
                        "comment": "This is comment!", 
                        "id": "402890555b797b57015b7986fc1a001c", 
                        "quantity": 1, 
                        "serviceEndDate": "2016-11-30", 
                        "serviceStartDate": "2016-11-01", 
                        "skuName": "SKU-1", 
                        "taxItems": [
                            {
                                "amount": 0.03, 
                                "id": "402890555b797b57015b7986fc3c001d", 
                                "jurisdiction": "CALIFORNIA", 
                                "locationCode": "06", 
                                "taxCode": null, 
                                "taxCodeDescription": "This is tax code description!", 
                                "taxDate": "2016-11-30", 
                                "taxExemptAmount": 0.0, 
                                "taxName": "STATE TAX1", 
                                "taxRate": 0.0625, 
                                "taxRateDescription": "This is tax rate description!", 
                                "taxRateType": "Percentage"
                            }
                        ], 
                        "unitOfMeasure": "Test_UOM"
                    }, 
                    {
                        "amount": 2, 
                        "comment": "This is comment!", 
                        "id": "402890555b797b57015b7986fc41001e", 
                        "serviceEndDate": "2016-11-30", 
                        "serviceStartDate": "2016-11-01", 
                        "skuName": "SKU-2", 
                        "taxItems": [
                            {
                                "amount": 0.06, 
                                "id": "402890555b797b57015b7986fc4c001f", 
                                "jurisdiction": "CALIFORNIA", 
                                "locationCode": "06", 
                                "taxCode": null, 
                                "taxCodeDescription": "This is tax code description!", 
                                "taxDate": "2016-11-30", 
                                "taxExemptAmount": 0.0, 
                                "taxName": "STATE TAX2", 
                                "taxRate": 0.0625, 
                                "taxRateDescription": "This is tax rate description!", 
                                "taxRateType": "Percentage"
                            }
                        ], 
                        "unitOfMeasure": "Test_UOM"
                    }
                ], 
                "reasonCode": "Correcting invoice error"
            }' "https://rest.zuora.com/v1/creditmemos/{creditMemoId}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/creditmemos/{creditMemoId}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "autoApplyUponPosting": false, 
                "comment": "new comment", 
                "effectiveDate": "2017-04-17", 
                "excludeFromAutoApplyRules": false, 
                "items": [
                    {
                        "amount": 1, 
                        "comment": "This is comment!", 
                        "id": "402890555b797b57015b7986fc1a001c", 
                        "quantity": 1, 
                        "serviceEndDate": "2016-11-30", 
                        "serviceStartDate": "2016-11-01", 
                        "skuName": "SKU-1", 
                        "taxItems": [
                            {
                                "amount": 0.03, 
                                "id": "402890555b797b57015b7986fc3c001d", 
                                "jurisdiction": "CALIFORNIA", 
                                "locationCode": "06", 
                                "taxCode": null, 
                                "taxCodeDescription": "This is tax code description!", 
                                "taxDate": "2016-11-30", 
                                "taxExemptAmount": 0.0, 
                                "taxName": "STATE TAX1", 
                                "taxRate": 0.0625, 
                                "taxRateDescription": "This is tax rate description!", 
                                "taxRateType": "Percentage"
                            }
                        ], 
                        "unitOfMeasure": "Test_UOM"
                    }, 
                    {
                        "amount": 2, 
                        "comment": "This is comment!", 
                        "id": "402890555b797b57015b7986fc41001e", 
                        "serviceEndDate": "2016-11-30", 
                        "serviceStartDate": "2016-11-01", 
                        "skuName": "SKU-2", 
                        "taxItems": [
                            {
                                "amount": 0.06, 
                                "id": "402890555b797b57015b7986fc4c001f", 
                                "jurisdiction": "CALIFORNIA", 
                                "locationCode": "06", 
                                "taxCode": null, 
                                "taxCodeDescription": "This is tax code description!", 
                                "taxDate": "2016-11-30", 
                                "taxExemptAmount": 0.0, 
                                "taxName": "STATE TAX2", 
                                "taxRate": 0.0625, 
                                "taxRateDescription": "This is tax rate description!", 
                                "taxRateType": "Percentage"
                            }
                        ], 
                        "unitOfMeasure": "Test_UOM"
                    }
                ], 
                "reasonCode": "Correcting invoice error"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"autoApplyUponPosting\": false, \n    \"comment\": \"new comment\", \n    \"effectiveDate\": \"2017-04-17\", \n    \"excludeFromAutoApplyRules\": false, \n    \"items\": [\n        {\n            \"amount\": 1, \n            \"comment\": \"This is comment!\", \n            \"id\": \"402890555b797b57015b7986fc1a001c\", \n            \"quantity\": 1, \n            \"serviceEndDate\": \"2016-11-30\", \n            \"serviceStartDate\": \"2016-11-01\", \n            \"skuName\": \"SKU-1\", \n            \"taxItems\": [\n                {\n                    \"amount\": 0.03, \n                    \"id\": \"402890555b797b57015b7986fc3c001d\", \n                    \"jurisdiction\": \"CALIFORNIA\", \n                    \"locationCode\": \"06\", \n                    \"taxCode\": null, \n                    \"taxCodeDescription\": \"This is tax code description!\", \n                    \"taxDate\": \"2016-11-30\", \n                    \"taxExemptAmount\": 0.0, \n                    \"taxName\": \"STATE TAX1\", \n                    \"taxRate\": 0.0625, \n                    \"taxRateDescription\": \"This is tax rate description!\", \n                    \"taxRateType\": \"Percentage\"\n                }\n            ], \n            \"unitOfMeasure\": \"Test_UOM\"\n        }, \n        {\n            \"amount\": 2, \n            \"comment\": \"This is comment!\", \n            \"id\": \"402890555b797b57015b7986fc41001e\", \n            \"serviceEndDate\": \"2016-11-30\", \n            \"serviceStartDate\": \"2016-11-01\", \n            \"skuName\": \"SKU-2\", \n            \"taxItems\": [\n                {\n                    \"amount\": 0.06, \n                    \"id\": \"402890555b797b57015b7986fc4c001f\", \n                    \"jurisdiction\": \"CALIFORNIA\", \n                    \"locationCode\": \"06\", \n                    \"taxCode\": null, \n                    \"taxCodeDescription\": \"This is tax code description!\", \n                    \"taxDate\": \"2016-11-30\", \n                    \"taxExemptAmount\": 0.0, \n                    \"taxName\": \"STATE TAX2\", \n                    \"taxRate\": 0.0625, \n                    \"taxRateDescription\": \"This is tax rate description!\", \n                    \"taxRateType\": \"Percentage\"\n                }\n            ], \n            \"unitOfMeasure\": \"Test_UOM\"\n        }\n    ], \n    \"reasonCode\": \"Correcting invoice error\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/creditmemos/{creditMemoId}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"autoApplyUponPosting\": false, \n    \"comment\": \"new comment\", \n    \"effectiveDate\": \"2017-04-17\", \n    \"excludeFromAutoApplyRules\": false, \n    \"items\": [\n        {\n            \"amount\": 1, \n            \"comment\": \"This is comment!\", \n            \"id\": \"402890555b797b57015b7986fc1a001c\", \n            \"quantity\": 1, \n            \"serviceEndDate\": \"2016-11-30\", \n            \"serviceStartDate\": \"2016-11-01\", \n            \"skuName\": \"SKU-1\", \n            \"taxItems\": [\n                {\n                    \"amount\": 0.03, \n                    \"id\": \"402890555b797b57015b7986fc3c001d\", \n                    \"jurisdiction\": \"CALIFORNIA\", \n                    \"locationCode\": \"06\", \n                    \"taxCode\": null, \n                    \"taxCodeDescription\": \"This is tax code description!\", \n                    \"taxDate\": \"2016-11-30\", \n                    \"taxExemptAmount\": 0.0, \n                    \"taxName\": \"STATE TAX1\", \n                    \"taxRate\": 0.0625, \n                    \"taxRateDescription\": \"This is tax rate description!\", \n                    \"taxRateType\": \"Percentage\"\n                }\n            ], \n            \"unitOfMeasure\": \"Test_UOM\"\n        }, \n        {\n            \"amount\": 2, \n            \"comment\": \"This is comment!\", \n            \"id\": \"402890555b797b57015b7986fc41001e\", \n            \"serviceEndDate\": \"2016-11-30\", \n            \"serviceStartDate\": \"2016-11-01\", \n            \"skuName\": \"SKU-2\", \n            \"taxItems\": [\n                {\n                    \"amount\": 0.06, \n                    \"id\": \"402890555b797b57015b7986fc4c001f\", \n                    \"jurisdiction\": \"CALIFORNIA\", \n                    \"locationCode\": \"06\", \n                    \"taxCode\": null, \n                    \"taxCodeDescription\": \"This is tax code description!\", \n                    \"taxDate\": \"2016-11-30\", \n                    \"taxExemptAmount\": 0.0, \n                    \"taxName\": \"STATE TAX2\", \n                    \"taxRate\": 0.0625, \n                    \"taxRateDescription\": \"This is tax rate description!\", \n                    \"taxRateType\": \"Percentage\"\n                }\n            ], \n            \"unitOfMeasure\": \"Test_UOM\"\n        }\n    ], \n    \"reasonCode\": \"Correcting invoice error\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/creditmemos/{creditMemoId}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/creditmemos/{creditMemoId}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"autoApplyUponPosting\": false, \n    \"comment\": \"new comment\", \n    \"effectiveDate\": \"2017-04-17\", \n    \"excludeFromAutoApplyRules\": false, \n    \"items\": [\n        {\n            \"amount\": 1, \n            \"comment\": \"This is comment!\", \n            \"id\": \"402890555b797b57015b7986fc1a001c\", \n            \"quantity\": 1, \n            \"serviceEndDate\": \"2016-11-30\", \n            \"serviceStartDate\": \"2016-11-01\", \n            \"skuName\": \"SKU-1\", \n            \"taxItems\": [\n                {\n                    \"amount\": 0.03, \n                    \"id\": \"402890555b797b57015b7986fc3c001d\", \n                    \"jurisdiction\": \"CALIFORNIA\", \n                    \"locationCode\": \"06\", \n                    \"taxCode\": null, \n                    \"taxCodeDescription\": \"This is tax code description!\", \n                    \"taxDate\": \"2016-11-30\", \n                    \"taxExemptAmount\": 0.0, \n                    \"taxName\": \"STATE TAX1\", \n                    \"taxRate\": 0.0625, \n                    \"taxRateDescription\": \"This is tax rate description!\", \n                    \"taxRateType\": \"Percentage\"\n                }\n            ], \n            \"unitOfMeasure\": \"Test_UOM\"\n        }, \n        {\n            \"amount\": 2, \n            \"comment\": \"This is comment!\", \n            \"id\": \"402890555b797b57015b7986fc41001e\", \n            \"serviceEndDate\": \"2016-11-30\", \n            \"serviceStartDate\": \"2016-11-01\", \n            \"skuName\": \"SKU-2\", \n            \"taxItems\": [\n                {\n                    \"amount\": 0.06, \n                    \"id\": \"402890555b797b57015b7986fc4c001f\", \n                    \"jurisdiction\": \"CALIFORNIA\", \n                    \"locationCode\": \"06\", \n                    \"taxCode\": null, \n                    \"taxCodeDescription\": \"This is tax code description!\", \n                    \"taxDate\": \"2016-11-30\", \n                    \"taxExemptAmount\": 0.0, \n                    \"taxName\": \"STATE TAX2\", \n                    \"taxRate\": 0.0625, \n                    \"taxRateDescription\": \"This is tax rate description!\", \n                    \"taxRateType\": \"Percentage\"\n                }\n            ], \n            \"unitOfMeasure\": \"Test_UOM\"\n        }\n    ], \n    \"reasonCode\": \"Correcting invoice error\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/creditmemos/{creditMemoId}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"autoApplyUponPosting\": false, \n    \"comment\": \"new comment\", \n    \"effectiveDate\": \"2017-04-17\", \n    \"excludeFromAutoApplyRules\": false, \n    \"items\": [\n        {\n            \"amount\": 1, \n            \"comment\": \"This is comment!\", \n            \"id\": \"402890555b797b57015b7986fc1a001c\", \n            \"quantity\": 1, \n            \"serviceEndDate\": \"2016-11-30\", \n            \"serviceStartDate\": \"2016-11-01\", \n            \"skuName\": \"SKU-1\", \n            \"taxItems\": [\n                {\n                    \"amount\": 0.03, \n                    \"id\": \"402890555b797b57015b7986fc3c001d\", \n                    \"jurisdiction\": \"CALIFORNIA\", \n                    \"locationCode\": \"06\", \n                    \"taxCode\": null, \n                    \"taxCodeDescription\": \"This is tax code description!\", \n                    \"taxDate\": \"2016-11-30\", \n                    \"taxExemptAmount\": 0.0, \n                    \"taxName\": \"STATE TAX1\", \n                    \"taxRate\": 0.0625, \n                    \"taxRateDescription\": \"This is tax rate description!\", \n                    \"taxRateType\": \"Percentage\"\n                }\n            ], \n            \"unitOfMeasure\": \"Test_UOM\"\n        }, \n        {\n            \"amount\": 2, \n            \"comment\": \"This is comment!\", \n            \"id\": \"402890555b797b57015b7986fc41001e\", \n            \"serviceEndDate\": \"2016-11-30\", \n            \"serviceStartDate\": \"2016-11-01\", \n            \"skuName\": \"SKU-2\", \n            \"taxItems\": [\n                {\n                    \"amount\": 0.06, \n                    \"id\": \"402890555b797b57015b7986fc4c001f\", \n                    \"jurisdiction\": \"CALIFORNIA\", \n                    \"locationCode\": \"06\", \n                    \"taxCode\": null, \n                    \"taxCodeDescription\": \"This is tax code description!\", \n                    \"taxDate\": \"2016-11-30\", \n                    \"taxExemptAmount\": 0.0, \n                    \"taxName\": \"STATE TAX2\", \n                    \"taxRate\": 0.0625, \n                    \"taxRateDescription\": \"This is tax rate description!\", \n                    \"taxRateType\": \"Percentage\"\n                }\n            ], \n            \"unitOfMeasure\": \"Test_UOM\"\n        }\n    ], \n    \"reasonCode\": \"Correcting invoice error\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/creditmemos/{creditMemoId}/apply":
    put:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

        Applies a posted credit memo to one or more invoices and debit memos. 

        You can apply a credit memo to an invoice or a debit memo only if you have the user permission. See [Billing Roles](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/A_Administrator_Settings/User_Roles/d_Billing_Roles) for more information.

        When you apply a credit memo, the total number of credit memo items and the items that credit memo items to be applied to must be less than or equal to 10,000.

        If the limit is hit, you can follow the following instructions:

        - If you want to apply one credit memo to multiple invoices or debit memos, decrease the number of invoices or debit memos in the request.
        - If you want to apply one credit memo to a single invoice or debit memo with a large volume of items, you have to specify invoice items or debit memo items in the request. The maximum number of invoice items or debit memo items that you can specify in the request is 1,000.
        - If a credit memo has a large volume of items, you have to specify credit memo items in the request. The maximum number of credit memo items that you can specify in the request is 1,000.
                
        If the Proration application rule is used, when applying credit memos, the following quantity must be less than or equal to 10,000: 

        (number of invoice items + number of debit memo items) * number of credit memo items

        Otherwise, the First In First Out rule will be used instead of the Proration rule.
      operationId: PUT_ApplyCreditMemo
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172.
          in: path
          name: creditMemoId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ApplyCreditMemoType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 4028905f5a87c0ff015a87d25ae90025
                    amount: 10.76
                    appliedAmount: 1
                    autoApplyUponPosting: false
                    cancelledById: null
                    cancelledOn: null
                    comment: ""
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-03-02 13:17:51
                    creditMemoDate: 2017-03-02
                    currency: USD
                    excludeFromAutoApplyRules: true
                    id: 4028905f5a890526015a8d73f73d0015
                    latestPDFFileId: 4028905f5a890526015a8d77af600036
                    number: CM00000001
                    postedById: 402881e522cf4f9b0122cf5d82860002
                    postedOn: 2017-03-02 13:21:55
                    reasonCode: Correcting invoice error
                    referredInvoiceId: 4028905f5a87c0ff015a87d3f8f10043
                    refundAmount: 7.1
                    source: AdhocFromPrpc
                    sourceId: null
                    status: Posted
                    success: true
                    targetDate: null
                    taxAmount: 0.76
                    taxMessage: null
                    taxStatus: null
                    totalTaxExemptAmount: 0
                    transferredToAccounting: No
                    unappliedAmount: 2.66
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-02 13:25:29
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETCreditMemoType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Apply a credit memo
      tags:
        - Credit Memos
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "effectiveDate": "2017-03-02", 
                "invoices": [
                    {
                        "amount": 1, 
                        "invoiceId": "4028905f5a87c0ff015a87d3f8f10043", 
                        "items": [
                            {
                                "amount": 0.9, 
                                "creditMemoItemId": "4028905f5a890526015a8d73f74b0016", 
                                "invoiceItemId": "4028905f5a87c0ff015a87d3f90c0045"
                            }, 
                            {
                                "amount": 0.1, 
                                "creditTaxItemId": "4028905f5a890526015a8d73f90c0018", 
                                "taxItemId": "4028905f5a87c0ff015a87d3f884003f"
                            }
                        ]
                    }
                ]
            }' "https://rest.zuora.com/v1/creditmemos/{creditMemoId}/apply"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/creditmemos/{creditMemoId}/apply');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "effectiveDate": "2017-03-02", 
                "invoices": [
                    {
                        "amount": 1, 
                        "invoiceId": "4028905f5a87c0ff015a87d3f8f10043", 
                        "items": [
                            {
                                "amount": 0.9, 
                                "creditMemoItemId": "4028905f5a890526015a8d73f74b0016", 
                                "invoiceItemId": "4028905f5a87c0ff015a87d3f90c0045"
                            }, 
                            {
                                "amount": 0.1, 
                                "creditTaxItemId": "4028905f5a890526015a8d73f90c0018", 
                                "taxItemId": "4028905f5a87c0ff015a87d3f884003f"
                            }
                        ]
                    }
                ]
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"effectiveDate\": \"2017-03-02\", \n    \"invoices\": [\n        {\n            \"amount\": 1, \n            \"invoiceId\": \"4028905f5a87c0ff015a87d3f8f10043\", \n            \"items\": [\n                {\n                    \"amount\": 0.9, \n                    \"creditMemoItemId\": \"4028905f5a890526015a8d73f74b0016\", \n                    \"invoiceItemId\": \"4028905f5a87c0ff015a87d3f90c0045\"\n                }, \n                {\n                    \"amount\": 0.1, \n                    \"creditTaxItemId\": \"4028905f5a890526015a8d73f90c0018\", \n                    \"taxItemId\": \"4028905f5a87c0ff015a87d3f884003f\"\n                }\n            ]\n        }\n    ]\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/apply")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"effectiveDate\": \"2017-03-02\", \n    \"invoices\": [\n        {\n            \"amount\": 1, \n            \"invoiceId\": \"4028905f5a87c0ff015a87d3f8f10043\", \n            \"items\": [\n                {\n                    \"amount\": 0.9, \n                    \"creditMemoItemId\": \"4028905f5a890526015a8d73f74b0016\", \n                    \"invoiceItemId\": \"4028905f5a87c0ff015a87d3f90c0045\"\n                }, \n                {\n                    \"amount\": 0.1, \n                    \"creditTaxItemId\": \"4028905f5a890526015a8d73f90c0018\", \n                    \"taxItemId\": \"4028905f5a87c0ff015a87d3f884003f\"\n                }\n            ]\n        }\n    ]\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/creditmemos/{creditMemoId}/apply", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/apply")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"effectiveDate\": \"2017-03-02\", \n    \"invoices\": [\n        {\n            \"amount\": 1, \n            \"invoiceId\": \"4028905f5a87c0ff015a87d3f8f10043\", \n            \"items\": [\n                {\n                    \"amount\": 0.9, \n                    \"creditMemoItemId\": \"4028905f5a890526015a8d73f74b0016\", \n                    \"invoiceItemId\": \"4028905f5a87c0ff015a87d3f90c0045\"\n                }, \n                {\n                    \"amount\": 0.1, \n                    \"creditTaxItemId\": \"4028905f5a890526015a8d73f90c0018\", \n                    \"taxItemId\": \"4028905f5a87c0ff015a87d3f884003f\"\n                }\n            ]\n        }\n    ]\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/apply");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"effectiveDate\": \"2017-03-02\", \n    \"invoices\": [\n        {\n            \"amount\": 1, \n            \"invoiceId\": \"4028905f5a87c0ff015a87d3f8f10043\", \n            \"items\": [\n                {\n                    \"amount\": 0.9, \n                    \"creditMemoItemId\": \"4028905f5a890526015a8d73f74b0016\", \n                    \"invoiceItemId\": \"4028905f5a87c0ff015a87d3f90c0045\"\n                }, \n                {\n                    \"amount\": 0.1, \n                    \"creditTaxItemId\": \"4028905f5a890526015a8d73f90c0018\", \n                    \"taxItemId\": \"4028905f5a87c0ff015a87d3f884003f\"\n                }\n            ]\n        }\n    ]\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/creditmemos/{creditMemoId}/cancel":
    put:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Cancels a credit memo. Only credit memos with the Draft status can be cancelled. 

        You can cancel a credit memo only if you have the user permission. See [Billing Roles](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/A_Administrator_Settings/User_Roles/d_Billing_Roles) for more information.
      operationId: PUT_CancelCreditMemo
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172.
          in: path
          name: creditMemoId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 402890555a7e9791015a7f15fe44001c
                    amount: 2020
                    appliedAmount: 0
                    autoApplyUponPosting: false
                    cancelledById: 402881e522cf4f9b0122cf5d82860002
                    cancelledOn: 2017-09-03 19:59:07
                    comment: the comment
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-03-01 15:31:10
                    creditMemoDate: 2017-10-17
                    currency: USD
                    excludeFromAutoApplyRules: false
                    id: 402890555a87d7f5015a88c7a6830022
                    latestPDFFileId: 402890555a87d7f5015a88c7a7a2002a
                    number: CM00000015
                    postedById: null
                    postedOn: null
                    reasonCode: Correcting invoice error
                    referredInvoiceId: null
                    refundAmount: 0
                    source: AdhocFromPrpc
                    sourceId: null
                    status: Canceled
                    success: true
                    targetDate: null
                    taxAmount: 0
                    taxMessage: null
                    taxStatus: null
                    totalTaxExemptAmount: 0
                    transferredToAccounting: No
                    unappliedAmount: 2020
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 15:36:57
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETCreditMemoType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Cancel a credit memo
      tags:
        - Credit Memos
      x-code-samples:
        - lang: Curl
          source: "curl -X PUT -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" -d '{}' \"https://rest.zuora.com/v1/creditmemos/{creditMemoId}/cancel\""
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/creditmemos/{creditMemoId}/cancel');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/cancel")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/creditmemos/{creditMemoId}/cancel", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/cancel")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/cancel");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/creditmemos/{creditMemoId}/emails":
    post:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Sends a posted credit memo to the specified email addresses manually.



        ## Notes
          - You must activate the **Email Credit Memo | Manually email Credit Memo** notification before emailing credit memos. To include the credit memo PDF in the email, select the **Include Credit Memo PDF** check box in the **Edit notification** dialog from the Zuora UI. See [Create and Edit Notifications](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/Notifications/C_Create_Notifications#section_2) for more information.


          - Zuora sends the email messages based on the email template you set. You can set the email template to use in the **Delivery Options** panel of the **Edit notification** dialog from the Zuora UI. By default, the **Manual Email for Credit Memo Default Template** template is used. See [Create and Edit Email Templates](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/Notifications/Create_Email_Templates) for more information.


          - The credit memos are sent only to the work email addresses or personal email addresses of the Bill To contact if the following conditions are all met:

            * The `useEmailTemplateSetting` field is set to `false`.
            * The email addresses are not specified in the `emailAddresses` field.
      operationId: POST_EmailCreditMemo
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The ID of a posted credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172.
          in: path
          name: creditMemoId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PostCreditMemoEmailRequestType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Email a credit memo
      tags:
        - Credit Memos
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "emailAddresses": "contact1@example.com,contact2@example.com", 
                "includeAdditionalEmailAddresses": false, 
                "useEmailTemplateSetting": false
            }' "https://rest.zuora.com/v1/creditmemos/{creditMemoId}/emails"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/creditmemos/{creditMemoId}/emails');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "emailAddresses": "contact1@example.com,contact2@example.com", 
                "includeAdditionalEmailAddresses": false, 
                "useEmailTemplateSetting": false
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"emailAddresses\": \"contact1@example.com,contact2@example.com\", \n    \"includeAdditionalEmailAddresses\": false, \n    \"useEmailTemplateSetting\": false\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/emails")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"emailAddresses\": \"contact1@example.com,contact2@example.com\", \n    \"includeAdditionalEmailAddresses\": false, \n    \"useEmailTemplateSetting\": false\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/creditmemos/{creditMemoId}/emails", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/emails")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"emailAddresses\": \"contact1@example.com,contact2@example.com\", \n    \"includeAdditionalEmailAddresses\": false, \n    \"useEmailTemplateSetting\": false\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/emails");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"emailAddresses\": \"contact1@example.com,contact2@example.com\", \n    \"includeAdditionalEmailAddresses\": false, \n    \"useEmailTemplateSetting\": false\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/creditmemos/{creditMemoId}/files":
    post:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Uploads an externally generated PDF file for a credit memo that is in Draft or Posted status.

        To use this operation, you must enable the Modify Modify Credit Memo permission. See [Billing Permissions](https://knowledgecenter.zuora.com/Billing/Tenant_Management/A_Administrator_Settings/User_Roles/d_Billing_Roles) for more information.

        This operation has the following restrictions:
        - Only the PDF file format is supported.
        - The maximum size of the PDF file to upload is 4 MB.
        - A maximum of 50 PDF files can be uploaded for one credit memo.
      operationId: POST_UploadFileForCreditMemo
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: |
            The ID of the credit memo that you want to upload a PDF file for. For example, 402890555a7e9791015a879f064a0054.
          in: path
          name: creditMemoId
          required: true
          schema:
            type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              properties:
                file:
                  description: |
                    The PDF file to upload for the credit memo.
                  format: binary
                  type: string
              type: object
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    fileId: 40289f466463d683016463ef8b7301a4
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTUploadFileResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Upload a file for a credit memo
      tags:
        - Credit Memos
      x-code-samples:
        - lang: Curl
          source: |
            curl -X POST -H "Authorization: Bearer f21f017e4724445d8647b1f0de7ed6f1" -F "file=@CreditMemoFile.pdf" "https://rest.zuora.com/v1/creditmemos/402890555a7e9791015a879f064a0054/files"
  "/v1/creditmemos/{creditMemoId}/items":
    get:
      description: |+
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Retrieves the information about all items of a credit memo. A credit memo item is a single line item in a credit memo. 

        ### Filtering

        You can use query parameters to restrict the data returned in the response. Each query parameter corresponds to one field in the response body.

        If the value of a filterable field is string, you can set the corresponding query parameter to `null` when filtering. Then, you can get the response data with this field value being `null`. 

        Examples:
            
          - /v1/creditmemos/402890245c7ca371015c7cb40ac30015/items?amount=100
          
          - /v1/creditmemos/402890245c7ca371015c7cb40ac30015/items?amount=100&sort=createdDate
            
      operationId: GET_CreditMemoItems
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - description: |
            The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172.
          in: path
          name: creditMemoId
          required: true
          schema:
            type: string
        - description: |
            
            The minor version of the Zuora REST API. See [Minor Version](https://www.zuora.com/developer/api-reference/#section/API-Versions/Minor-Version) for information about REST API version control. 

            This header affects the availability of the following response fields:
            * `items` > `creditTaxItems`
            * `items` > `taxationItems`
            * `items` > `comment`
            * `items` > `description`
          in: header
          name: zuora-version
          required: false
          schema:
            type: string
        - description: |
            This parameter filters the response based on the `amount` field. 
          in: query
          name: amount
          required: false
          schema:
            format: double
            type: number
        - description: |
            This parameter filters the response based on the `appliedAmount` field.
          in: query
          name: appliedAmount
          required: false
          schema:
            format: double
            type: number
        - description: |
            This parameter filters the response based on the `createdById` field. 
          in: query
          name: createdById
          required: false
          schema:
            type: string
        - description: |
            This parameter filters the response based on the `createdDate` field. 
          in: query
          name: createdDate
          required: false
          schema:
            format: date-time
            type: string
        - description: |
            This parameter filters the response based on the `id` field. 
          in: query
          name: id
          required: false
          schema:
            type: string
        - description: |
            This parameter filters the response based on the `refundAmount` field. 
          in: query
          name: refundAmount
          required: false
          schema:
            format: double
            type: number
        - description: |
            This parameter filters the response based on the `serviceEndDate` field. 
          in: query
          name: serviceEndDate
          required: false
          schema:
            format: date
            type: string
        - description: |
            This parameter filters the response based on the `serviceStartDate` field. 
          in: query
          name: serviceStartDate
          required: false
          schema:
            format: date
            type: string
        - description: |
            This parameter filters the response based on the `sku` field. 
          in: query
          name: sku
          required: false
          schema:
            type: string
        - description: |
            This parameter filters the response based on the `skuName` field. 
          in: query
          name: skuName
          required: false
          schema:
            type: string
        - description: |
            This parameter filters the response based on the `sourceItemId` field. 
          in: query
          name: sourceItemId
          required: false
          schema:
            type: string
        - description: |
            This parameter filters the response based on the `subscriptionId` field.
          in: query
          name: subscriptionId
          required: false
          schema:
            type: string
        - description: |
            This parameter filters the response based on the `updatedById` field. 
          in: query
          name: updatedById
          required: false
          schema:
            type: string
        - description: |
            This parameter filters the response based on the `updatedDate` field.
          in: query
          name: updatedDate
          required: false
          schema:
            format: date-time
            type: string
        - description: |
            This parameter restricts the order of the data returned in the response. You can use this parameter to supply a dimension you want to sort on.

            A sortable field uses the following form: 

            *operator* *field_name*

            You can use at most two sortable fields in one URL path. Use a comma to separate sortable fields. For example:  *operator* *field_name*, *operator* *field_name*  

            *operator* is used to mark the order of sequencing. The operator is optional. If you only specify the sortable field without any operator, the response data is sorted in descending order by this field.

              - The `-` operator indicates an ascending order.
              - The `+` operator indicates a descending order.

            By default, the response data is displayed in descending order by updated date.

            *field_name* indicates the name of a sortable field. The supported sortable fields of this operation are as below:

              - amount
              - appliedAmount
              - createdById
              - createdDate
              - id
              - refundAmount
              - serviceEndDate
              - serviceStartDate
              - sku
              - skuName
              - sourceItemId
              - subscriptionId
              - updatedById
              - updatedDate
              
            Examples:

            - /v1/creditmemos/402890245c7ca371015c7cb40ac30015/items?sort=createdDate

            - /v1/creditmemos/402890245c7ca371015c7cb40ac30015/items?amount=100&sort=createdDate
          in: query
          name: sort
          required: false
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    items:
                      - amount: 1
                        amountWithoutTax: 0
                        appliedAmount: 0
                        appliedToItemId: null
                        comment: ""
                        createdById: 402881e522cf4f9b0122cf5d82860002
                        createdDate: 2017-03-01 10:07:10
                        creditFromItemId: 402880e97a56f30b017a574012e50085
                        creditFromItemSource: CreditMemoItem
                        financeInformation:
                          deferredRevenueAccountingCode: null
                          deferredRevenueAccountingCodeType: null
                          onAccountAccountingCode: null
                          onAccountAccountingCodeType: null
                          recognizedRevenueAccountingCode: null
                          recognizedRevenueAccountingCodeType: null
                        id: 402890555a7e9791015a879f064d0055
                        processingType: Charge
                        quantity: 1
                        refundAmount: 0
                        serviceEndDate: 2017-03-26
                        serviceStartDate: 2017-02-27
                        sku: SKU-00000001
                        skuName: New Component
                        sourceItemId: 402890555a7e9791015a7f1756bc0037
                        sourceItemType: InvoiceDetail
                        subscriptionId: 402890d25bec1155015bec35cc7c0bc7
                        taxMode: TaxExclusive
                        taxationItems:
                          data:
                            - appliedAmount: 0
                              exemptAmount: 0
                              financeInformation:
                                onAccountAccountingCode: Check
                                onAccountAccountingCodeType: Cash
                                salesTaxPayableAccountingCode: Check
                                salesTaxPayableAccountingCodeType: Cash
                              id: 402890555a7e9791015a87a072880062
                              jurisdiction: CALIFORNIA
                              locationCode: "06"
                              name: STATE TAX
                              refundAmount: 0
                              sourceTaxItemId: null
                              taxAmount: 0.1
                              taxCode: ServiceTaxCode
                              taxCodeDescription: This is tax code description!
                              taxDate: 2016-09-30
                              taxRate: 0.0625
                              taxRateDescription: This is tax rate description!
                              taxRateType: Percentage
                              unappliedAmount: 0.1
                        unappliedAmount: 1
                        unitOfMeasure: Each
                        unitPrice: 1
                        updatedById: 402881e522cf4f9b0122cf5d82860002
                        updatedDate: 2017-03-01 10:08:43
                      - amount: 2
                        amountWithoutTax: 2
                        appliedAmount: 0
                        appliedToItemId: null
                        comment: ""
                        createdById: 402881e522cf4f9b0122cf5d82860002
                        createdDate: 2017-03-01 10:07:10
                        creditFromItemId: 402880e97a56f30b017a574012f00086
                        creditFromItemSource: CreditMemoItem
                        financeInformation:
                          deferredRevenueAccountingCode: null
                          deferredRevenueAccountingCodeType: null
                          onAccountAccountingCode: null
                          onAccountAccountingCodeType: null
                          recognizedRevenueAccountingCode: null
                          recognizedRevenueAccountingCodeType: null
                        id: 402890555a7e9791015a879f06610056
                        processingType: Charge
                        quantity: 1
                        refundAmount: 0
                        serviceEndDate: 2017-03-26
                        serviceStartDate: 2017-02-27
                        sku: SKU-00000001
                        skuName: New Component
                        sourceItemId: 402890555a7e9791015a7f1756bd0038
                        sourceItemType: InvoiceDetail
                        subscriptionId: 402890d25bec1155015bec35cc7c0bc7
                        taxMode: TaxExclusive
                        taxationItems:
                          data: []
                        unappliedAmount: 2
                        unitOfMeasure: Each
                        unitPrice: 2
                        updatedById: 402881e522cf4f9b0122cf5d82860002
                        updatedDate: 2017-03-01 10:07:10
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETCreditMemoItemsListType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List credit memo items
      tags:
        - Credit Memos
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/creditmemos/{creditMemoId}/items"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/creditmemos/{creditMemoId}/items');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/items")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/creditmemos/{creditMemoId}/items", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/items")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/items");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/creditmemos/{creditMemoId}/items/{cmitemid}":
    get:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

        Retrieves the information about a specific item of a credit memo. A credit memo item is a single line item in a credit memo.
      operationId: GET_CreditMemoItem
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a credit memo item. You can get the credit memo item ID from the response of [List credit memo items](https://www.zuora.com/developer/api-reference/#operation/GET_CreditMemoItems).
          in: path
          name: cmitemid
          required: true
          schema:
            type: string
        - description: |
            The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172.
          in: path
          name: creditMemoId
          required: true
          schema:
            type: string
        - description: |
            
            The minor version of the Zuora REST API. See [Minor Version](https://www.zuora.com/developer/api-reference/#section/API-Versions/Minor-Version) for information about REST API version control. 

            This header affects the availability of the following response fields:
            * `creditTaxItems`
            * `taxationItems`
            * `comment`
            * `description`
          in: header
          name: zuora-version
          required: false
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    amount: 1
                    amountWithoutTax: 1
                    appliedAmount: 0
                    appliedToItemId: null
                    comment: ""
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-03-01 10:07:10
                    creditFromItemId: 402880e97a56f30b017a574012f00086
                    creditFromItemSource: CreditMemoItem
                    financeInformation:
                      deferredRevenueAccountingCode: null
                      deferredRevenueAccountingCodeType: null
                      onAccountAccountingCode: null
                      onAccountAccountingCodeType: null
                      recognizedRevenueAccountingCode: null
                      recognizedRevenueAccountingCodeType: null
                    id: 402890555a7e9791015a879f064d0055
                    processingType: Charge
                    quantity: 1
                    refundAmount: 0
                    serviceEndDate: 2017-03-26
                    serviceStartDate: 2017-02-27
                    sku: SKU-00000001
                    skuName: New Component
                    sourceItemId: 402890555a7e9791015a7f1756bc0037
                    sourceItemType: InvoiceDetail
                    subscriptionId: 402890d25bec1155015bec35cc7c0bc7
                    success: true
                    taxMode: TaxExclusive
                    taxationItems:
                      data: []
                    unappliedAmount: 1
                    unitOfMeasure: Each
                    unitPrice: 1
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 10:08:43
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETCreditMemoItemType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a credit memo item
      tags:
        - Credit Memos
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/creditmemos/{creditMemoId}/items/{cmitemid}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/creditmemos/{creditMemoId}/items/{cmitemid}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/items/{cmitemid}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/creditmemos/{creditMemoId}/items/{cmitemid}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/items/{cmitemid}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/items/{cmitemid}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/creditmemos/{creditMemoId}/items/{cmitemid}/taxation-items":
    get:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

        Retrieves information about the taxation items of a specific credit memo item. 
      operationId: GET_TaxationItemsOfCreditMemoItem
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_page"
        - description: |
            The unique ID of a credit memo item. You can get the credit memo item ID from the response of [List credit memo items](https://www.zuora.com/developer/api-reference/#operation/GET_CreditMemoItems).
          in: path
          name: cmitemid
          required: true
          schema:
            type: string
        - description: |
            The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172.
          in: path
          name: creditMemoId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    data:
                      - appliedAmount: 0
                        exemptAmount: 10
                        financeInformation:
                          onAccountAccountingCode: null
                          onAccountAccountingCodeType: null
                          salesTaxPayableAccountingCode: null
                          salesTaxPayableAccountingCodeType: null
                        id: 2c98901a68ff2680016903216a271a67
                        jurisdiction: Jurisdiction
                        locationCode: "8"
                        name: taxName_0
                        refundAmount: 0
                        sourceTaxItemId: null
                        taxAmount: 10
                        taxCode: taxCode
                        taxCodeDescription: taxCodeDescription
                        taxDate: 2016-10-10
                        taxRate: 0.1
                        taxRateDescription: taxRateDescription
                        taxRateType: Percentage
                        unappliedAmount: 10
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETTaxationItemsOfCreditMemoItemType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.        
              schema:
                maxLength: 64
                type: string
      summary: List all taxation items of a credit memo item
      tags:
        - Credit Memos
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/creditmemos/{creditMemoId}/items/{cmitemid}/taxation-items"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/creditmemos/{creditMemoId}/items/{cmitemid}/taxation-items');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/items/{cmitemid}/taxation-items")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/creditmemos/{creditMemoId}/items/{cmitemid}/taxation-items", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/items/{cmitemid}/taxation-items")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/items/{cmitemid}/taxation-items");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/creditmemos/{creditMemoId}/parts":
    get:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Retrieves the information about all parts of a credit memo. A credit memo can consist of an unapplied part, and several parts applied to invoices and debit memos. You can use this operation to get all the applied and unapplied portions of a credit memo.
      operationId: GET_CreditMemoParts
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - description: |
            The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172.
          in: path
          name: creditMemoId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    parts:
                      - amount: 3.66
                        createdById: 402881e522cf4f9b0122cf5d82860002
                        createdDate: 2017-03-02 13:21:55
                        debitMemoId: null
                        id: 4028905f5a890526015a8d77adea0029
                        invoiceId: null
                        updatedById: 402881e522cf4f9b0122cf5d82860002
                        updatedDate: 2017-03-02 13:21:55
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETCreditMemoPartsCollectionType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List all parts of a credit memo
      tags:
        - Credit Memos
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/creditmemos/{creditMemoId}/parts"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/creditmemos/{creditMemoId}/parts');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/parts")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/creditmemos/{creditMemoId}/parts", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/parts")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/parts");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/creditmemos/{creditMemoId}/parts/{partid}":
    get:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Retrieves the information about a specific credit memo part. A credit memo can consist of an unapplied part, and several parts applied to invoices and debit memos.
      operationId: GET_CreditMemoPart
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a specific credit memo part. You can get the credit memo part ID from the response of [List all parts of a credit memo](https://www.zuora.com/developer/api-reference/#operation/GET_CreditMemoParts).
          in: path
          name: partid
          required: true
          schema:
            type: string
        - description: |
            The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172.
          in: path
          name: creditMemoId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    amount: 1
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-03-02 14:00:21
                    debitMemoId: null
                    id: 4028905f5a890526015a8d9adeb30059
                    invoiceId: 4028905f5a87c0ff015a87d3f8f10043
                    success: true
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-02 14:00:21
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETCreditMemoPartType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a credit memo part
      tags:
        - Credit Memos
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/creditmemos/{creditMemoId}/parts/{partid}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/creditmemos/{creditMemoId}/parts/{partid}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/parts/{partid}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/creditmemos/{creditMemoId}/parts/{partid}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/parts/{partid}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/parts/{partid}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/creditmemos/{creditMemoId}/parts/{partid}/itemparts":
    get:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Retrieves the information about all items of a credit memo part. A credit memo part item is a single line item in a credit memo part. A credit memo part can consist of several different types of items.
      operationId: GET_CreditMemoItemParts
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - description: |
            The unique ID of a specific credit memo part. You can get the credit memo part ID from the response of [List all parts of a credit memo](https://www.zuora.com/developer/api-reference/#operation/GET_CreditMemoParts). .
          in: path
          name: partid
          required: true
          schema:
            type: string
        - description: |
            The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172.
          in: path
          name: creditMemoId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    itemParts:
                      - amount: 2.1
                        createdById: 402881e522cf4f9b0122cf5d82860002
                        createdDate: 2017-03-02 13:21:55
                        creditMemoItemId: 4028905f5a890526015a8d73f74b0016
                        creditTaxItemId: null
                        debitMemoItemId: null
                        id: 4028905f5a890526015a8d77ae01002c
                        invoiceItemId: null
                        taxItemId: null
                        updatedById: 402881e522cf4f9b0122cf5d82860002
                        updatedDate: 2017-03-02 13:47:20
                      - amount: 0.05
                        createdById: 402881e522cf4f9b0122cf5d82860002
                        createdDate: 2017-03-02 13:21:55
                        creditMemoItemId: null
                        creditTaxItemId: 4028905f5a890526015a8d73f90c0018
                        debitMemoItemId: null
                        id: 4028905f5a890526015a8d77ae02002e
                        invoiceItemId: null
                        taxItemId: null
                        updatedById: 402881e522cf4f9b0122cf5d82860002
                        updatedDate: 2017-03-02 13:47:20
                      - amount: 0.51
                        createdById: 402881e522cf4f9b0122cf5d82860002
                        createdDate: 2017-03-02 13:21:55
                        creditMemoItemId: null
                        creditTaxItemId: 4028905f5a890526015a8d73f90c0019
                        debitMemoItemId: null
                        id: 4028905f5a890526015a8d77ae030030
                        invoiceItemId: null
                        taxItemId: null
                        updatedById: 402881e522cf4f9b0122cf5d82860002
                        updatedDate: 2017-03-02 13:21:55
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETCreditMemoItemPartsCollectionType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List all credit memo part items
      tags:
        - Credit Memos
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/creditmemos/{creditMemoId}/parts/{partid}/itemparts"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/creditmemos/{creditMemoId}/parts/{partid}/itemparts');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/parts/{partid}/itemparts")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/creditmemos/{creditMemoId}/parts/{partid}/itemparts", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/parts/{partid}/itemparts")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/parts/{partid}/itemparts");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/creditmemos/{creditMemoId}/parts/{partid}/itemparts/{itempartid}":
    get:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

        Retrieves the information about a specific credit memo part item.  A credit memo part item is a single line item in a credit memo part. A credit memo part can consist of several different types of items.
      operationId: GET_CreditMemoItemPart
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a specific credit memo part. You can get the credit memo part ID from the response of [List all parts of a credit memo](https://www.zuora.com/developer/api-reference/#operation/GET_CreditMemoParts).
          in: path
          name: partid
          required: true
          schema:
            type: string
        - description: |
            The unique ID of a specific credit memo part item. You can get the credit memo part item ID from the response of [List all credit memo part items](https://www.zuora.com/developer/api-reference/#operation/GET_CreditMemoItemParts).
          in: path
          name: itempartid
          required: true
          schema:
            type: string
        - description: |
            The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172.
          in: path
          name: creditMemoId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    amount: 0.9
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-03-02 14:00:21
                    creditMemoItemId: 4028905f5a890526015a8d73f74b0016
                    creditTaxItemId: null
                    debitMemoItemId: null
                    id: 4028905f5a890526015a8d9adeb5005c
                    invoiceItemId: 4028905f5a87c0ff015a87d3f90c0045
                    success: true
                    taxItemId: null
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-02 14:00:21
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETCreditMemoItemPartType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a credit memo part item
      tags:
        - Credit Memos
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/creditmemos/{creditMemoId}/parts/{partid}/itemparts/{itempartid}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/creditmemos/{creditMemoId}/parts/{partid}/itemparts/{itempartid}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/parts/{partid}/itemparts/{itempartid}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/creditmemos/{creditMemoId}/parts/{partid}/itemparts/{itempartid}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/parts/{partid}/itemparts/{itempartid}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/parts/{partid}/itemparts/{itempartid}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/creditmemos/{creditMemoId}/pdfs":
    post:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Creates a PDF file for a specified credit memo. To access the generated PDF file, you can download it by clicking **View PDF** on the detailed credit memo page through the Zuora UI.

        This REST API operation can be used only if you have the billing document file generation feature and the Billing user permission "Regenerate PDF" enabled.
      operationId: POST_CreditMemoPDF
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of the credit memo that you want to create a PDF file for. For example, 8a8082e65b27f6c3015ba45ff82c7172.
          in: path
          name: creditMemoId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTMemoPdfResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Generate a credit memo PDF file
      tags:
        - Credit Memos
      x-code-samples:
        - lang: Curl
          source: "curl -X POST -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" -d '{}' \"https://rest.zuora.com/v1/creditmemos/{creditMemoId}/pdfs\""
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/creditmemos/{creditMemoId}/pdfs');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/pdfs")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/creditmemos/{creditMemoId}/pdfs", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/pdfs")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/pdfs");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/creditmemos/{creditMemoId}/post":
    put:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Posts a credit memo to activate it. You can post credit memos only if you have the [Billing permissions](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/A_Administrator_Settings/User_Roles/d_Billing_Roles#Billing_Permissions).
      operationId: PUT_PostCreditMemo
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172.
          in: path
          name: creditMemoId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 402890555a7e9791015a7f15fe44001c
                    amount: 3.1
                    appliedAmount: 0
                    autoApplyUponPosting: false
                    cancelledById: null
                    cancelledOn: null
                    comment: ""
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-03-01 10:07:10
                    creditMemoDate: 2017-03-01
                    currency: USD
                    excludeFromAutoApplyRules: false
                    id: 402890555a7e9791015a879f064a0054
                    latestPDFFileId: null
                    number: CM00000012
                    postedById: 402881e522cf4f9b0122cf5d82860002
                    postedOn: 2017-03-01 14:28:06
                    reasonCode: Correcting invoice error
                    referredInvoiceId: 402890555a7e9791015a7f1756aa0035
                    refundAmount: 0
                    source: API
                    sourceId: null
                    status: Posted
                    success: true
                    targetDate: null
                    taxAmount: 0.1
                    taxMessage: null
                    taxStatus: null
                    totalTaxExemptAmount: 0
                    transferredToAccounting: No
                    unappliedAmount: 3.1
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 14:28:06
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETCreditMemoType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Post a credit memo
      tags:
        - Credit Memos
      x-code-samples:
        - lang: Curl
          source: "curl -X PUT -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" -d '{}' \"https://rest.zuora.com/v1/creditmemos/{creditMemoId}/post\""
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/creditmemos/{creditMemoId}/post');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/post")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/creditmemos/{creditMemoId}/post", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/post")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/post");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/creditmemos/{creditMemoId}/taxationitems":
    post:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

        Creates taxation items for a credit memo.
      operationId: POST_CM_TaxationItems
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172.
          in: path
          name: creditMemoId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTTaxationItemListForCMType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
                    taxationItems:
                      - createdById: 402881e522cf4f9b0122cf5d82860002
                        createdDate: 2017-03-01 10:08:43
                        exemptAmount: 0
                        financeInformation:
                          onAccountAccountingCode: Check
                          onAccountAccountingCodeType: Cash
                          salesTaxPayableAccountingCode: Check
                          salesTaxPayableAccountingCodeType: Cash
                        id: 402890555a7e9791015a87a072880062
                        jurisdiction: CALIFORNIA
                        locationCode: "06"
                        memoItemId: 402890555a7e9791015a879f064d0055
                        name: STATE TAX
                        sourceTaxItemId: 402890555a7d4022015a7db254e200c1
                        taxAmount: 0.1
                        taxCode: ServiceTaxCode
                        taxCodeDescription: This is tax code description!
                        taxDate: 2016-09-30
                        taxRate: 0.0625
                        taxRateDescription: This is tax rate description!
                        taxRateType: Percentage
                        updatedById: 402881e522cf4f9b0122cf5d82860002
                        updatedDate: 2017-03-01 10:08:43
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETTaxationItemListType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Create taxation items for a credit memo
      tags:
        - Credit Memos
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "taxationItems": [
                    {
                        "exemptAmount": 0.0, 
                        "financeInformation": {
                            "onAccountAccountingCode": "Check", 
                            "salesTaxPayableAccountingCode": "Check"
                        }, 
                        "jurisdiction": "CALIFORNIA", 
                        "locationCode": "06", 
                        "memoItemId": "402890555a7e9791015a879f064d0055", 
                        "name": "STATE TAX", 
                        "sourceTaxItemId": "402890555a7d4022015a7db254e200c1", 
                        "taxAmount": 0.1, 
                        "taxCode": "ServiceTaxCode", 
                        "taxCodeDescription": "This is tax code description!", 
                        "taxDate": "2016-09-30", 
                        "taxRate": 0.0625, 
                        "taxRateDescription": "This is tax rate description!", 
                        "taxRateType": "Percentage"
                    }
                ]
            }' "https://rest.zuora.com/v1/creditmemos/{creditMemoId}/taxationitems"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/creditmemos/{creditMemoId}/taxationitems');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "taxationItems": [
                    {
                        "exemptAmount": 0.0, 
                        "financeInformation": {
                            "onAccountAccountingCode": "Check", 
                            "salesTaxPayableAccountingCode": "Check"
                        }, 
                        "jurisdiction": "CALIFORNIA", 
                        "locationCode": "06", 
                        "memoItemId": "402890555a7e9791015a879f064d0055", 
                        "name": "STATE TAX", 
                        "sourceTaxItemId": "402890555a7d4022015a7db254e200c1", 
                        "taxAmount": 0.1, 
                        "taxCode": "ServiceTaxCode", 
                        "taxCodeDescription": "This is tax code description!", 
                        "taxDate": "2016-09-30", 
                        "taxRate": 0.0625, 
                        "taxRateDescription": "This is tax rate description!", 
                        "taxRateType": "Percentage"
                    }
                ]
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"taxationItems\": [\n        {\n            \"exemptAmount\": 0.0, \n            \"financeInformation\": {\n                \"onAccountAccountingCode\": \"Check\", \n                \"salesTaxPayableAccountingCode\": \"Check\"\n            }, \n            \"jurisdiction\": \"CALIFORNIA\", \n            \"locationCode\": \"06\", \n            \"memoItemId\": \"402890555a7e9791015a879f064d0055\", \n            \"name\": \"STATE TAX\", \n            \"sourceTaxItemId\": \"402890555a7d4022015a7db254e200c1\", \n            \"taxAmount\": 0.1, \n            \"taxCode\": \"ServiceTaxCode\", \n            \"taxCodeDescription\": \"This is tax code description!\", \n            \"taxDate\": \"2016-09-30\", \n            \"taxRate\": 0.0625, \n            \"taxRateDescription\": \"This is tax rate description!\", \n            \"taxRateType\": \"Percentage\"\n        }\n    ]\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/taxationitems")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"taxationItems\": [\n        {\n            \"exemptAmount\": 0.0, \n            \"financeInformation\": {\n                \"onAccountAccountingCode\": \"Check\", \n                \"salesTaxPayableAccountingCode\": \"Check\"\n            }, \n            \"jurisdiction\": \"CALIFORNIA\", \n            \"locationCode\": \"06\", \n            \"memoItemId\": \"402890555a7e9791015a879f064d0055\", \n            \"name\": \"STATE TAX\", \n            \"sourceTaxItemId\": \"402890555a7d4022015a7db254e200c1\", \n            \"taxAmount\": 0.1, \n            \"taxCode\": \"ServiceTaxCode\", \n            \"taxCodeDescription\": \"This is tax code description!\", \n            \"taxDate\": \"2016-09-30\", \n            \"taxRate\": 0.0625, \n            \"taxRateDescription\": \"This is tax rate description!\", \n            \"taxRateType\": \"Percentage\"\n        }\n    ]\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/creditmemos/{creditMemoId}/taxationitems", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/taxationitems")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"taxationItems\": [\n        {\n            \"exemptAmount\": 0.0, \n            \"financeInformation\": {\n                \"onAccountAccountingCode\": \"Check\", \n                \"salesTaxPayableAccountingCode\": \"Check\"\n            }, \n            \"jurisdiction\": \"CALIFORNIA\", \n            \"locationCode\": \"06\", \n            \"memoItemId\": \"402890555a7e9791015a879f064d0055\", \n            \"name\": \"STATE TAX\", \n            \"sourceTaxItemId\": \"402890555a7d4022015a7db254e200c1\", \n            \"taxAmount\": 0.1, \n            \"taxCode\": \"ServiceTaxCode\", \n            \"taxCodeDescription\": \"This is tax code description!\", \n            \"taxDate\": \"2016-09-30\", \n            \"taxRate\": 0.0625, \n            \"taxRateDescription\": \"This is tax rate description!\", \n            \"taxRateType\": \"Percentage\"\n        }\n    ]\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/taxationitems");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"taxationItems\": [\n        {\n            \"exemptAmount\": 0.0, \n            \"financeInformation\": {\n                \"onAccountAccountingCode\": \"Check\", \n                \"salesTaxPayableAccountingCode\": \"Check\"\n            }, \n            \"jurisdiction\": \"CALIFORNIA\", \n            \"locationCode\": \"06\", \n            \"memoItemId\": \"402890555a7e9791015a879f064d0055\", \n            \"name\": \"STATE TAX\", \n            \"sourceTaxItemId\": \"402890555a7d4022015a7db254e200c1\", \n            \"taxAmount\": 0.1, \n            \"taxCode\": \"ServiceTaxCode\", \n            \"taxCodeDescription\": \"This is tax code description!\", \n            \"taxDate\": \"2016-09-30\", \n            \"taxRate\": 0.0625, \n            \"taxRateDescription\": \"This is tax rate description!\", \n            \"taxRateType\": \"Percentage\"\n        }\n    ]\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/creditmemos/{creditMemoId}/unapply":
    put:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

        Unapplies an applied credit memo from one or more invoices and debit memos. The full applied amount from invoices and debit memos is transferred into the unapplied amount of the credit memo. 

        You can unapply a credit memo from an invoice or a debit memo only if you have the user permission. See [Billing Roles](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/A_Administrator_Settings/User_Roles/d_Billing_Roles) for more information.

        When you unapply a credit memo, the total number of credit memo items and the items that credit memo items to be unapplied from must be less than or equal to 10,000.

        If the limit is hit, you can follow the following instructions:

        - If you want to unapply one credit memo without specifying invoices or debit memos, you have to specify the invoices or debit memos in the request.
        - If you want to unapply one credit memo from multiple specified invoices or debit memos, decrease the number of invoices or debit memos in the request.
        - If you want to unapply one credit memo from a single invoice or debit memo with a large volume of items, you have to specify invoice items or debit memo items in the request. The maximum number of invoice items or debit memo items that you can specify in the request is 1,000.
        - If a credit memo has a large volume of items, you have to specify credit memo items in the request. The maximum number of credit memo items that you can specify in the request is 1,000.


        If the Proration application rule is used, when unapplying credit memos, the following quantity must be less than or equal to 10,000: 

        (number of invoice items + number of debit memo items) * number of credit memo items

        Otherwise, the First In First Out rule will be used instead of the Proration rule.
      operationId: PUT_UnapplyCreditMemo
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172.
          in: path
          name: creditMemoId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/UnapplyCreditMemoType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 4028905f5a87c0ff015a87d25ae90025
                    amount: 10.76
                    appliedAmount: 0
                    autoApplyUponPosting: false
                    cancelledById: null
                    cancelledOn: null
                    comment: ""
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-03-02 13:17:51
                    creditMemoDate: 2017-03-02
                    currency: USD
                    excludeFromAutoApplyRules: true
                    id: 4028905f5a890526015a8d73f73d0015
                    latestPDFFileId: 4028905f5a890526015a8d77af600036
                    number: CM00000001
                    postedById: 402881e522cf4f9b0122cf5d82860002
                    postedOn: 2017-03-02 13:21:55
                    reasonCode: Correcting invoice error
                    referredInvoiceId: 4028905f5a87c0ff015a87d3f8f10043
                    refundAmount: 7.1
                    source: AdhocFromPrpc
                    sourceId: null
                    status: Posted
                    success: true
                    targetDate: null
                    taxAmount: 0.76
                    taxMessage: null
                    taxStatus: null
                    totalTaxExemptAmount: 0
                    transferredToAccounting: No
                    unappliedAmount: 3.66
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-02 13:25:29
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETCreditMemoType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Unapply a credit memo
      tags:
        - Credit Memos
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "effectiveDate": "2017-03-02", 
                "invoices": [
                    {
                        "amount": 1, 
                        "invoiceId": "4028905f5a87c0ff015a87d3f8f10043", 
                        "items": [
                            {
                                "amount": 0.9, 
                                "creditMemoItemId": "4028905f5a890526015a8d73f74b0016", 
                                "invoiceItemId": "4028905f5a87c0ff015a87d3f90c0045"
                            }, 
                            {
                                "amount": 0.1, 
                                "creditTaxItemId": "4028905f5a890526015a8d73f90c0018", 
                                "taxItemId": "4028905f5a87c0ff015a87d3f884003f"
                            }
                        ]
                    }
                ]
            }' "https://rest.zuora.com/v1/creditmemos/{creditMemoId}/unapply"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/creditmemos/{creditMemoId}/unapply');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "effectiveDate": "2017-03-02", 
                "invoices": [
                    {
                        "amount": 1, 
                        "invoiceId": "4028905f5a87c0ff015a87d3f8f10043", 
                        "items": [
                            {
                                "amount": 0.9, 
                                "creditMemoItemId": "4028905f5a890526015a8d73f74b0016", 
                                "invoiceItemId": "4028905f5a87c0ff015a87d3f90c0045"
                            }, 
                            {
                                "amount": 0.1, 
                                "creditTaxItemId": "4028905f5a890526015a8d73f90c0018", 
                                "taxItemId": "4028905f5a87c0ff015a87d3f884003f"
                            }
                        ]
                    }
                ]
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"effectiveDate\": \"2017-03-02\", \n    \"invoices\": [\n        {\n            \"amount\": 1, \n            \"invoiceId\": \"4028905f5a87c0ff015a87d3f8f10043\", \n            \"items\": [\n                {\n                    \"amount\": 0.9, \n                    \"creditMemoItemId\": \"4028905f5a890526015a8d73f74b0016\", \n                    \"invoiceItemId\": \"4028905f5a87c0ff015a87d3f90c0045\"\n                }, \n                {\n                    \"amount\": 0.1, \n                    \"creditTaxItemId\": \"4028905f5a890526015a8d73f90c0018\", \n                    \"taxItemId\": \"4028905f5a87c0ff015a87d3f884003f\"\n                }\n            ]\n        }\n    ]\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/unapply")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"effectiveDate\": \"2017-03-02\", \n    \"invoices\": [\n        {\n            \"amount\": 1, \n            \"invoiceId\": \"4028905f5a87c0ff015a87d3f8f10043\", \n            \"items\": [\n                {\n                    \"amount\": 0.9, \n                    \"creditMemoItemId\": \"4028905f5a890526015a8d73f74b0016\", \n                    \"invoiceItemId\": \"4028905f5a87c0ff015a87d3f90c0045\"\n                }, \n                {\n                    \"amount\": 0.1, \n                    \"creditTaxItemId\": \"4028905f5a890526015a8d73f90c0018\", \n                    \"taxItemId\": \"4028905f5a87c0ff015a87d3f884003f\"\n                }\n            ]\n        }\n    ]\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/creditmemos/{creditMemoId}/unapply", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/unapply")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"effectiveDate\": \"2017-03-02\", \n    \"invoices\": [\n        {\n            \"amount\": 1, \n            \"invoiceId\": \"4028905f5a87c0ff015a87d3f8f10043\", \n            \"items\": [\n                {\n                    \"amount\": 0.9, \n                    \"creditMemoItemId\": \"4028905f5a890526015a8d73f74b0016\", \n                    \"invoiceItemId\": \"4028905f5a87c0ff015a87d3f90c0045\"\n                }, \n                {\n                    \"amount\": 0.1, \n                    \"creditTaxItemId\": \"4028905f5a890526015a8d73f90c0018\", \n                    \"taxItemId\": \"4028905f5a87c0ff015a87d3f884003f\"\n                }\n            ]\n        }\n    ]\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/unapply");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"effectiveDate\": \"2017-03-02\", \n    \"invoices\": [\n        {\n            \"amount\": 1, \n            \"invoiceId\": \"4028905f5a87c0ff015a87d3f8f10043\", \n            \"items\": [\n                {\n                    \"amount\": 0.9, \n                    \"creditMemoItemId\": \"4028905f5a890526015a8d73f74b0016\", \n                    \"invoiceItemId\": \"4028905f5a87c0ff015a87d3f90c0045\"\n                }, \n                {\n                    \"amount\": 0.1, \n                    \"creditTaxItemId\": \"4028905f5a890526015a8d73f90c0018\", \n                    \"taxItemId\": \"4028905f5a87c0ff015a87d3f884003f\"\n                }\n            ]\n        }\n    ]\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/creditmemos/{creditMemoId}/unpost":
    put:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Unposts a credit memo that is in Posted status. If a credit memo has been applied or refunded, you are not allowed to unpost it. After a credit memo is unposted, its status becomes Draft. 

        You can unpost credit memos only if you have the [Billing permissions](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/A_Administrator_Settings/User_Roles/d_Billing_Roles#Billing_Permissions).
      operationId: PUT_UnpostCreditMemo
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172.
          in: path
          name: creditMemoId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 402890555a7e9791015a7f15fe44001c
                    amount: 3.1
                    appliedAmount: 0
                    autoApplyUponPosting: false
                    cancelledById: null
                    cancelledOn: null
                    comment: ""
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-03-01 10:07:10
                    creditMemoDate: 2017-03-01
                    currency: USD
                    excludeFromAutoApplyRules: false
                    id: 402890555a7e9791015a879f064a0054
                    latestPDFFileId: null
                    number: CM00000012
                    postedById: 402881e522cf4f9b0122cf5d82860002
                    postedOn: 2017-03-01 14:28:06
                    reasonCode: Correcting invoice error
                    referredInvoiceId: 402890555a7e9791015a7f1756aa0035
                    refundAmount: 0
                    source: API
                    sourceId: null
                    status: Draft
                    success: true
                    targetDate: null
                    taxAmount: 0.1
                    taxMessage: null
                    taxStatus: null
                    totalTaxExemptAmount: 0
                    transferredToAccounting: No
                    unappliedAmount: 3.1
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 14:28:06
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETCreditMemoType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Unpost a credit memo
      tags:
        - Credit Memos
      x-code-samples:
        - lang: Curl
          source: "curl -X PUT -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" -d '{}' \"https://rest.zuora.com/v1/creditmemos/{creditMemoId}/unpost\""
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/creditmemos/{creditMemoId}/unpost');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/unpost")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/creditmemos/{creditMemoId}/unpost", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/unpost")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/creditmemos/{creditMemoId}/unpost");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/creditmemos/{creditmemoId}/refunds":
    post:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Refunds a full or partial posted credit memo to your customers. Only the amount of unapplied part could be refunded. 

        You can refund a credit memo only if you have the user permission. See [Billing Roles](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/A_Administrator_Settings/User_Roles/d_Billing_Roles) for more information.

        When you refund a credit memo, the total number of credit memo items to be refunded must be less than or equal to 10,000.

        For a use case of this operation, see [Refund processing](https://www.zuora.com/developer/api-guides/#Refund-processing).
      operationId: POST_RefundCreditMemo
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a credit memo. For example, 8a8082e65b27f6c3015ba45ff82c7172.
          in: path
          name: creditmemoId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PostNonRefRefundType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 4028905f5a87c0ff015a87d25ae90025
                    amount: 7.1
                    cancelledOn: null
                    comment: null
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-03-02 13:25:29
                    creditMemoId: 4028905f5a890526015a8d73f73d0015
                    financeInformation:
                      bankAccountAccountingCode: null
                      bankAccountAccountingCodeType: null
                      onAccountAccountingCode: null
                      onAccountAccountingCodeType: null
                      transferredToAccounting: No
                      unappliedPaymentAccountingCode: null
                      unappliedPaymentAccountingCodeType: null
                    gatewayId: null
                    gatewayResponse: null
                    gatewayResponseCode: null
                    gatewayState: NotSubmitted
                    id: 4028905f5a890526015a8d7af4280039
                    markedForSubmissionOn: null
                    methodType: CreditCard
                    number: R-00000002
                    paymentId: null
                    paymentMethodId: null
                    paymentMethodSnapshotId: null
                    reasonCode: Standard Refund
                    referenceId: null
                    refundDate: 2017-03-02
                    refundTransactionTime: null
                    secondRefundReferenceId: null
                    settledOn: null
                    softDescriptor: null
                    softDescriptorPhone: null
                    status: Processed
                    submittedOn: null
                    success: true
                    type: External
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-02 13:25:29
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRefundCreditMemoType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Refund a credit memo
      tags:
        - Credit Memos
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "gatewayOptions": {
                    "Comments": "test", 
                    "IPAddress": "192.168.1.1"
                }, 
                "items": [
                    {
                        "amount": 7, 
                        "creditMemoItemId": "4028905f5a890526015a8d73f74b0016"
                    }, 
                    {
                        "amount": 0.1, 
                        "creditTaxItemId": "4028905f5a890526015a8d73f90c0018"
                    }
                ], 
                "methodType": "CreditCard", 
                "refundDate": "2017-03-02", 
                "totalAmount": 7.1, 
                "type": "External"
            }' "https://rest.zuora.com/v1/creditmemos/{creditmemoId}/refunds"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/creditmemos/{creditmemoId}/refunds');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "gatewayOptions": {
                    "Comments": "test", 
                    "IPAddress": "192.168.1.1"
                }, 
                "items": [
                    {
                        "amount": 7, 
                        "creditMemoItemId": "4028905f5a890526015a8d73f74b0016"
                    }, 
                    {
                        "amount": 0.1, 
                        "creditTaxItemId": "4028905f5a890526015a8d73f90c0018"
                    }
                ], 
                "methodType": "CreditCard", 
                "refundDate": "2017-03-02", 
                "totalAmount": 7.1, 
                "type": "External"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"gatewayOptions\": {\n        \"Comments\": \"test\", \n        \"IPAddress\": \"192.168.1.1\"\n    }, \n    \"items\": [\n        {\n            \"amount\": 7, \n            \"creditMemoItemId\": \"4028905f5a890526015a8d73f74b0016\"\n        }, \n        {\n            \"amount\": 0.1, \n            \"creditTaxItemId\": \"4028905f5a890526015a8d73f90c0018\"\n        }\n    ], \n    \"methodType\": \"CreditCard\", \n    \"refundDate\": \"2017-03-02\", \n    \"totalAmount\": 7.1, \n    \"type\": \"External\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/creditmemos/{creditmemoId}/refunds")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"gatewayOptions\": {\n        \"Comments\": \"test\", \n        \"IPAddress\": \"192.168.1.1\"\n    }, \n    \"items\": [\n        {\n            \"amount\": 7, \n            \"creditMemoItemId\": \"4028905f5a890526015a8d73f74b0016\"\n        }, \n        {\n            \"amount\": 0.1, \n            \"creditTaxItemId\": \"4028905f5a890526015a8d73f90c0018\"\n        }\n    ], \n    \"methodType\": \"CreditCard\", \n    \"refundDate\": \"2017-03-02\", \n    \"totalAmount\": 7.1, \n    \"type\": \"External\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/creditmemos/{creditmemoId}/refunds", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/creditmemos/{creditmemoId}/refunds")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"gatewayOptions\": {\n        \"Comments\": \"test\", \n        \"IPAddress\": \"192.168.1.1\"\n    }, \n    \"items\": [\n        {\n            \"amount\": 7, \n            \"creditMemoItemId\": \"4028905f5a890526015a8d73f74b0016\"\n        }, \n        {\n            \"amount\": 0.1, \n            \"creditTaxItemId\": \"4028905f5a890526015a8d73f90c0018\"\n        }\n    ], \n    \"methodType\": \"CreditCard\", \n    \"refundDate\": \"2017-03-02\", \n    \"totalAmount\": 7.1, \n    \"type\": \"External\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/creditmemos/{creditmemoId}/refunds");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"gatewayOptions\": {\n        \"Comments\": \"test\", \n        \"IPAddress\": \"192.168.1.1\"\n    }, \n    \"items\": [\n        {\n            \"amount\": 7, \n            \"creditMemoItemId\": \"4028905f5a890526015a8d73f74b0016\"\n        }, \n        {\n            \"amount\": 0.1, \n            \"creditTaxItemId\": \"4028905f5a890526015a8d73f90c0018\"\n        }\n    ], \n    \"methodType\": \"CreditCard\", \n    \"refundDate\": \"2017-03-02\", \n    \"totalAmount\": 7.1, \n    \"type\": \"External\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/custom-exchange-rates/{currency}":
    get:
      description: |
        This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/). 

        This reference describes how to query custom foreign exchange rates from Zuora. You can use this API method to query exchange rates only if you use a custom exchange rate provider and upload rates with the Import Foreign Exchange Rates mass action. 
      operationId: GET_CustomExchangeRates
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The target base currency of the tenant. The exchange rates in the response are calculated in relation to the target currency.

            The value must be a three-letter currency code, for example, USD. 
          in: path
          name: currency
          required: true
          schema:
            type: string
        - description: |
            Start date of the date range for which you want to get exchange rates.

            The date must be in yyyy-mm-dd format, for example, 2016-01-15. The start date cannot be later than the end date.
          in: query
          name: startDate
          required: true
          schema:
            type: string
        - description: |
            End date of the date range for which you want to get exchange rates.

            The date must be in yyyy-mm-dd format, for example, 2016-01-16. The end date can be a maximum of 90 days after the start date.
          in: query
          name: endDate
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    inverse: false
                    rates:
                      2019-04-28:
                        GBP: 1.135239621
                        USD: 0.889028445
                        providerExchangeRateDate: 2019-04-28
                      2019-04-29:
                        GBP: 1.134623962
                        USD: 0.892140244
                        providerExchangeRateDate: 2019-04-29
                      2019-04-30:
                        GBP: 1.134589832
                        USD: 0.892243287
                        providerExchangeRateDate: 2019-04-30
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETCustomExchangeRatesType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List custom exchange rates by currency
      tags:
        - Custom Exchange Rates
      x-code-samples:
        - lang: Curl
          source: |
            curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.sandbox.eu.zuora.com/v1/custom-exchange-rates/EUR?startDate=2019-04-28&endDate=2019-04-30"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/custom-exchange-rates/{currency}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/custom-exchange-rates/{currency}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/custom-exchange-rates/{currency}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/custom-exchange-rates/{currency}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/custom-exchange-rates/{currency}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  /v1/debitmemos:
    get:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

        Retrieves the information about all debit memos associated with all customer accounts.

        ### Filtering

        You can use query parameters to restrict the data returned in the response. Each query parameter corresponds to one field in the response body.

        If the value of a filterable field is string, you can set the corresponding query parameter to `null` when filtering. Then, you can get the response data with this field value being `null`. 

        Examples:

        - /v1/debitmemos?status=Posted

        - /v1/debitmemos?referredInvoiceId=null&status=Draft

        - /v1/debitmemos?status=Posted&type=External&sort=+number
      operationId: GET_DebitMemos
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - description: |
            This parameter filters the response based on the `accountId` field.
          in: query
          name: accountId
          required: false
          schema:
            type: string
        - description: |
            This parameter filters the response based on the `amount` field.
          in: query
          name: amount
          required: false
          schema:
            format: double
            type: number
        - description: |
            This parameter filters the response based on the `balance` field.
          in: query
          name: balance
          required: false
          schema:
            format: double
            type: number
        - description: |
            This parameter filters the response based on the `beAppliedAmount` field.
          in: query
          name: beAppliedAmount
          required: false
          schema:
            format: double
            type: number
        - description: |
            This parameter filters the response based on the `createdById` field.
          in: query
          name: createdById
          required: false
          schema:
            type: string
        - description: |
            This parameter filters the response based on the `createdDate` field.
          in: query
          name: createdDate
          required: false
          schema:
            format: date-time
            type: string
        - description: |
            This parameter filters the response based on the `currency` field.
          in: query
          name: currency
          required: false
          schema:
            type: string
        - description: |
            This parameter filters the response based on the `debitMemoDate` field.
          in: query
          name: debitMemoDate
          required: false
          schema:
            format: date
            type: string
        - description: |
            This parameter filters the response based on the `dueDate` field.
          in: query
          name: dueDate
          required: false
          schema:
            format: date
            type: string
        - description: |
            This parameter filters the response based on the `number` field.
          in: query
          name: number
          required: false
          schema:
            type: string
        - description: |
            This parameter filters the response based on the `referredInvoiceId` field.
          in: query
          name: referredInvoiceId
          required: false
          schema:
            type: string
        - description: |
            This parameter filters the response based on the `status` field.
          in: query
          name: status
          required: false
          schema:
            enum:
              - Draft
              - Posted
              - Canceled
              - Error
              - PendingForTax
              - Generating
              - CancelInProgress
            type: string
        - description: |
            This parameter filters the response based on the `targetDate` field.
          in: query
          name: targetDate
          required: false
          schema:
            format: date
            type: string
        - description: |
            This parameter filters the response based on the `taxAmount` field.
          in: query
          name: taxAmount
          required: false
          schema:
            format: double
            type: number
        - description: |
            This parameter filters the response based on the `totalTaxExemptAmount` field.
          in: query
          name: totalTaxExemptAmount
          required: false
          schema:
            format: double
            type: number
        - description: |
            This parameter filters the response based on the `updatedById` field.
          in: query
          name: updatedById
          required: false
          schema:
            type: string
        - description: |
            This parameter filters the response based on the `updatedDate` field.
          in: query
          name: updatedDate
          required: false
          schema:
            format: date-time
            type: string
        - description: |
            This parameter restricts the order of the data returned in the response. You can use this parameter to supply a dimension you want to sort on.

            A sortable field uses the following form: 

            *operator* *field_name*

            You can use at most two sortable fields in one URL path. Use a comma to separate sortable fields. For example:  *operator* *field_name*, *operator* *field_name*  

            *operator* is used to mark the order of sequencing. The operator is optional. If you only specify the sortable field without any operator, the response data is sorted in descending order by this field.

              - The `-` operator indicates an ascending order.
              - The `+` operator indicates a descending order.

            By default, the response data is displayed in descending order by debit memo number.

            *field_name* indicates the name of a sortable field. The supported sortable fields of this operation are as below:

              - number
              - accountId
              - debitMemoDate
              - targetDate
              - dueDate
              - amount
              - taxAmount
              - totalTaxExemptAmount
              - balance
              - beAppliedAmount
              - referredInvoiceId
              - createdDate
              - createdById
              - updatedDate
              - updatedById
              
            Examples:

            - /v1/debitmemos?sort=+number

            - /v1/debitmemos?status=Processed&sort=-number,+amount
          in: query
          name: sort
          required: false
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    debitmemos:
                      - accountId: 402890555a7e9791015a7f15fe44001c
                        amount: 50
                        autoPay: true
                        balance: 50
                        beAppliedAmount: 0
                        cancelledById: null
                        cancelledOn: null
                        comment: the comment
                        createdById: 402881e522cf4f9b0122cf5d82860002
                        createdDate: 2017-03-01 17:24:14
                        debitMemoDate: 2017-10-17
                        dueDate: 2017-11-16
                        id: 402890555a87d7f5015a892f2ba10057
                        latestPDFFileId: 402890555a87d7f5015a892f2c5c0060
                        number: DM00000006
                        postedById: null
                        postedOn: null
                        reasonCode: Correcting invoice error
                        referredInvoiceId: null
                        status: Draft
                        targetDate: null
                        taxAmount: 0
                        taxMessage: null
                        taxStatus: null
                        totalTaxExemptAmount: 0
                        transferredToAccounting: No
                        updatedById: 402881e522cf4f9b0122cf5d82860002
                        updatedDate: 2017-03-01 17:24:14
                      - accountId: 402890555a7d4022015a7dabf5f60088
                        amount: 0.01
                        autoPay: true
                        balance: 0.01
                        beAppliedAmount: 0
                        cancelledById: null
                        cancelledOn: null
                        comment: the comment
                        createdById: 402881e522cf4f9b0122cf5d82860002
                        createdDate: 2017-03-01 17:13:15
                        debitMemoDate: 2017-11-30
                        dueDate: 2017-12-30
                        id: 402890555a87d7f5015a89251edc0045
                        latestPDFFileId: null
                        number: DM00000003
                        postedById: null
                        postedOn: null
                        reasonCode: Charge Dispute
                        referredInvoiceId: 402890555a7d4022015a7dadb3b300a4
                        status: Draft
                        targetDate: null
                        taxAmount: 0.01
                        taxMessage: null
                        taxStatus: null
                        totalTaxExemptAmount: 0
                        transferredToAccounting: No
                        updatedById: 402881e522cf4f9b0122cf5d82860002
                        updatedDate: 2017-03-01 17:13:15
                      - accountId: 402890555a7d4022015a7dabf5f60088
                        amount: 9
                        autoPay: true
                        balance: 9
                        beAppliedAmount: 0
                        cancelledById: null
                        cancelledOn: null
                        comment: ""
                        createdById: 402881e522cf4f9b0122cf5d82860002
                        createdDate: 2017-03-01 17:01:00
                        debitMemoDate: 2017-03-01
                        dueDate: 2017-03-31
                        id: 402890555a87d7f5015a8919e4fe002e
                        latestPDFFileId: 402890555a87d7f5015a8919e95d003a
                        number: DM00000002
                        postedById: null
                        postedOn: null
                        reasonCode: Correcting invoice error
                        referredInvoiceId: 402890555a7d4022015a7dadb3b300a4
                        status: Draft
                        targetDate: null
                        taxAmount: 8
                        taxMessage: null
                        taxStatus: null
                        totalTaxExemptAmount: 0
                        transferredToAccounting: No
                        updatedById: 402881e522cf4f9b0122cf5d82860002
                        updatedDate: 2017-03-01 17:01:00
                      - accountId: 402890555a7e9791015a7f15fe44001c
                        amount: 8.02
                        autoPay: true
                        balance: 8.02
                        beAppliedAmount: 0
                        cancelledById: null
                        cancelledOn: null
                        comment: ""
                        createdById: 402881e522cf4f9b0122cf5d82860002
                        createdDate: 2017-03-01 10:26:16
                        debitMemoDate: 2017-03-01
                        dueDate: 2017-03-31
                        id: 402890555a7e9791015a87b082940067
                        latestPDFFileId: 402890555a7e9791015a87b083f00072
                        number: DM00000001
                        postedById: null
                        postedOn: null
                        reasonCode: Correcting invoice error
                        referredInvoiceId: 402890555a7e9791015a7f1756aa0035
                        status: Draft
                        targetDate: null
                        taxAmount: 0.02
                        taxMessage: null
                        taxStatus: null
                        totalTaxExemptAmount: 0
                        transferredToAccounting: No
                        updatedById: 402881e522cf4f9b0122cf5d82860002
                        updatedDate: 2017-03-01 10:45:03
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETDebitMemoCollectionType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List debit memos
      tags:
        - Debit Memos
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/debitmemos"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/debitmemos');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/debitmemos")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/debitmemos", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/debitmemos")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/debitmemos");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    post:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Creates an ad-hoc debit memo from a product rate plan charge. Zuora supports the creation of debit memos from any type of product rate plan charge. The charges can also have any amount and any charge model, except for discout charge models.

        When debit memos are created from product rate plan charges, the specified amount with decimal places is now validated based on the decimal places supported by each currency.

        You can create a debit memo only if you have the user permission. See [Billing Roles](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/A_Administrator_Settings/User_Roles/d_Billing_Roles) for more information.
      operationId: POST_DebitMemoFromPrpc
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            
            The minor version of the Zuora REST API. See [Minor Version](https://www.zuora.com/developer/api-reference/#section/API-Versions/Minor-Version) for information about REST API version control. 

            This header affects the availability of the following request fields:
            * `charges` > `amount`
            * `charges` > `memoItemAmount`
            * `charges` > `chargeId`
            * `charges` > `productRatePlanChargeId`       
            * `charges` > `comment`
            * `charges` > `description`
          in: header
          name: zuora-version
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/DebitMemoFromChargeType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 402890555a7e9791015a7f15fe44001c
                    amount: 50
                    autoPay: true
                    balance: 50
                    beAppliedAmount: 0
                    cancelledById: null
                    cancelledOn: null
                    comment: the comment
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-03-01 17:24:14
                    debitMemoDate: 2017-10-17
                    dueDate: 2017-11-16
                    id: 402890555a87d7f5015a892f2ba10057
                    latestPDFFileId: null
                    number: DM00000006
                    postedById: null
                    postedOn: null
                    reasonCode: Correcting invoice error
                    referredInvoiceId: null
                    status: Draft
                    success: true
                    targetDate: null
                    taxAmount: 0
                    taxMessage: null
                    taxStatus: null
                    totalTaxExemptAmount: 0
                    transferredToAccounting: No
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 17:24:14
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETDebitMemoType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Create a debit memo from a charge
      tags:
        - Debit Memos
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "accountId": "402890555a7e9791015a7f15fe44001c", 
                "autoPay": true, 
                "autoPost": false, 
                "charges": [
                    {
                        "amount": 30, 
                        "chargeId": "402890555a87d7f5015a892cae910050", 
                        "comment": "this is comment1", 
                        "quantity": 1
                    }, 
                    {
                        "amount": 20, 
                        "chargeId": "402890555a87d7f5015a892dff7f0053", 
                        "comment": "this is comment2"
                    }
                ], 
                "comment": "the comment", 
                "effectiveDate": "2017-10-17", 
                "reasonCode": "Correcting invoice error"
            }' "https://rest.zuora.com/v1/debitmemos"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/debitmemos');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "accountId": "402890555a7e9791015a7f15fe44001c", 
                "autoPay": true, 
                "autoPost": false, 
                "charges": [
                    {
                        "amount": 30, 
                        "chargeId": "402890555a87d7f5015a892cae910050", 
                        "comment": "this is comment1", 
                        "quantity": 1
                    }, 
                    {
                        "amount": 20, 
                        "chargeId": "402890555a87d7f5015a892dff7f0053", 
                        "comment": "this is comment2"
                    }
                ], 
                "comment": "the comment", 
                "effectiveDate": "2017-10-17", 
                "reasonCode": "Correcting invoice error"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"accountId\": \"402890555a7e9791015a7f15fe44001c\", \n    \"autoPay\": true, \n    \"autoPost\": false, \n    \"charges\": [\n        {\n            \"amount\": 30, \n            \"chargeId\": \"402890555a87d7f5015a892cae910050\", \n            \"comment\": \"this is comment1\", \n            \"quantity\": 1\n        }, \n        {\n            \"amount\": 20, \n            \"chargeId\": \"402890555a87d7f5015a892dff7f0053\", \n            \"comment\": \"this is comment2\"\n        }\n    ], \n    \"comment\": \"the comment\", \n    \"effectiveDate\": \"2017-10-17\", \n    \"reasonCode\": \"Correcting invoice error\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/debitmemos")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"accountId\": \"402890555a7e9791015a7f15fe44001c\", \n    \"autoPay\": true, \n    \"autoPost\": false, \n    \"charges\": [\n        {\n            \"amount\": 30, \n            \"chargeId\": \"402890555a87d7f5015a892cae910050\", \n            \"comment\": \"this is comment1\", \n            \"quantity\": 1\n        }, \n        {\n            \"amount\": 20, \n            \"chargeId\": \"402890555a87d7f5015a892dff7f0053\", \n            \"comment\": \"this is comment2\"\n        }\n    ], \n    \"comment\": \"the comment\", \n    \"effectiveDate\": \"2017-10-17\", \n    \"reasonCode\": \"Correcting invoice error\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/debitmemos", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/debitmemos")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"accountId\": \"402890555a7e9791015a7f15fe44001c\", \n    \"autoPay\": true, \n    \"autoPost\": false, \n    \"charges\": [\n        {\n            \"amount\": 30, \n            \"chargeId\": \"402890555a87d7f5015a892cae910050\", \n            \"comment\": \"this is comment1\", \n            \"quantity\": 1\n        }, \n        {\n            \"amount\": 20, \n            \"chargeId\": \"402890555a87d7f5015a892dff7f0053\", \n            \"comment\": \"this is comment2\"\n        }\n    ], \n    \"comment\": \"the comment\", \n    \"effectiveDate\": \"2017-10-17\", \n    \"reasonCode\": \"Correcting invoice error\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/debitmemos");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"accountId\": \"402890555a7e9791015a7f15fe44001c\", \n    \"autoPay\": true, \n    \"autoPost\": false, \n    \"charges\": [\n        {\n            \"amount\": 30, \n            \"chargeId\": \"402890555a87d7f5015a892cae910050\", \n            \"comment\": \"this is comment1\", \n            \"quantity\": 1\n        }, \n        {\n            \"amount\": 20, \n            \"chargeId\": \"402890555a87d7f5015a892dff7f0053\", \n            \"comment\": \"this is comment2\"\n        }\n    ], \n    \"comment\": \"the comment\", \n    \"effectiveDate\": \"2017-10-17\", \n    \"reasonCode\": \"Correcting invoice error\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
    put:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

        Updates the due date for multiple debit memos in batches with one call. 
      operationId: PUT_BatchUpdateDebitMemos
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTBatchDebitMemosRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Update debit memos
      tags:
        - Debit Memos
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "debitMemos": [
                    {
                        "dueDate": "2017-12-28", 
                        "id": "402890d25f9f083f015f9f28041d0008"
                    }, 
                    {
                        "dueDate": "2017-12-20", 
                        "id": "402890555a87d7f5015a892f2ba10057"
                    }
                ]
            }' "https://rest.zuora.com/v1/debitmemos"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/debitmemos');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "debitMemos": [
                    {
                        "dueDate": "2017-12-28", 
                        "id": "402890d25f9f083f015f9f28041d0008"
                    }, 
                    {
                        "dueDate": "2017-12-20", 
                        "id": "402890555a87d7f5015a892f2ba10057"
                    }
                ]
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"debitMemos\": [\n        {\n            \"dueDate\": \"2017-12-28\", \n            \"id\": \"402890d25f9f083f015f9f28041d0008\"\n        }, \n        {\n            \"dueDate\": \"2017-12-20\", \n            \"id\": \"402890555a87d7f5015a892f2ba10057\"\n        }\n    ]\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/debitmemos")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"debitMemos\": [\n        {\n            \"dueDate\": \"2017-12-28\", \n            \"id\": \"402890d25f9f083f015f9f28041d0008\"\n        }, \n        {\n            \"dueDate\": \"2017-12-20\", \n            \"id\": \"402890555a87d7f5015a892f2ba10057\"\n        }\n    ]\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/debitmemos", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/debitmemos")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"debitMemos\": [\n        {\n            \"dueDate\": \"2017-12-28\", \n            \"id\": \"402890d25f9f083f015f9f28041d0008\"\n        }, \n        {\n            \"dueDate\": \"2017-12-20\", \n            \"id\": \"402890555a87d7f5015a892f2ba10057\"\n        }\n    ]\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/debitmemos");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"debitMemos\": [\n        {\n            \"dueDate\": \"2017-12-28\", \n            \"id\": \"402890d25f9f083f015f9f28041d0008\"\n        }, \n        {\n            \"dueDate\": \"2017-12-20\", \n            \"id\": \"402890555a87d7f5015a892f2ba10057\"\n        }\n    ]\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/debitmemos/{debitMemoId}":
    delete:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Deletes a debit memo. Only debit memos with the Cancelled status can be deleted. 

        You can delete a debit memo only if you have the user permission. See [Billing Roles](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/A_Administrator_Settings/User_Roles/d_Billing_Roles) for more information.
      operationId: DELETE_DebitMemo
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a debit memo. For example, 8a8082e65b27f6c3015ba419f3c2644e.
          in: path
          name: debitMemoId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Delete a debit memo
      tags:
        - Debit Memos
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/debitmemos/{debitMemoId}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/debitmemos/{debitMemoId}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/debitmemos/{debitMemoId}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/v1/debitmemos/{debitMemoId}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/debitmemos/{debitMemoId}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/debitmemos/{debitMemoId}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Retrieves the information about a specific debit memo.
      operationId: GET_DebitMemo
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a debit memo. For example, 8a8082e65b27f6c3015ba419f3c2644e.
          in: path
          name: debitMemoId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 402890555a7d4022015a7dabf5f60088
                    amount: 9
                    autoPay: true
                    balance: 9
                    beAppliedAmount: 0
                    cancelledById: null
                    cancelledOn: null
                    comment: ""
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-03-01 17:01:00
                    debitMemoDate: 2017-03-01
                    dueDate: 2017-03-31
                    id: 402890555a87d7f5015a8919e4fe002e
                    latestPDFFileId: 402890555a87d7f5015a8919e95d003a
                    number: DM00000002
                    postedById: null
                    postedOn: null
                    reasonCode: Correcting invoice error
                    referredInvoiceId: 402890555a7d4022015a7dadb3b300a4
                    status: Draft
                    success: true
                    targetDate: null
                    taxAmount: 8
                    taxMessage: null
                    taxStatus: null
                    totalTaxExemptAmount: 0
                    transferredToAccounting: No
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 17:01:00
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETDebitMemoType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a debit memo
      tags:
        - Debit Memos
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/debitmemos/{debitMemoId}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/debitmemos/{debitMemoId}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/debitmemos/{debitMemoId}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/debitmemos/{debitMemoId}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/debitmemos/{debitMemoId}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/debitmemos/{debitMemoId}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Updates the basic and finance information about a debit memo. Currently, Zuora supports updating tax-exclusive memo items, but does not support updating tax-inclusive memo items. 

        If the amount of a memo item is updated, the tax will be recalculated in the following conditions:
          - The memo is created from a product rate plan charge and you use Avalara to calculate the tax.
          - The memo is created from an invoice and you use Avalara or Zuora Tax to calculate the tax.

        You can update a debit memo only if you have the user permission. See [Billing Roles](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/A_Administrator_Settings/User_Roles/d_Billing_Roles) for more information.
      operationId: PUT_DebitMemo
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a debit memo. For example, 8a8082e65b27f6c3015ba419f3c2644e.
          in: path
          name: debitMemoId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTDebitMemoType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 4028905f5a87c0ff015a87d25ae90025
                    amount: 12.9
                    autoPay: true
                    balance: 12.9
                    beAppliedAmount: 0
                    cancelledById: null
                    cancelledOn: null
                    comment: ""
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-03-02 14:26:45
                    debitMemoDate: 2017-03-02
                    dueDate: 2017-04-01
                    id: 4028905f5a890526015a8db30954007a
                    latestPDFFileId: 4028905f5a890526015a8db30a570085
                    number: DM00000003
                    postedById: null
                    postedOn: null
                    reasonCode: Correcting invoice error
                    referredInvoiceId: 4028905f5a87c0ff015a87d3f8f10043
                    status: Draft
                    success: true
                    targetDate: null
                    taxAmount: 0.9
                    taxMessage: null
                    taxStatus: null
                    totalTaxExemptAmount: 0
                    transferredToAccounting: No
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-02 14:27:05
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETDebitMemoType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Update a debit memo
      tags:
        - Debit Memos
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "autoPay": true, 
                "comment": "new comment", 
                "dueDate": "2017-05-20", 
                "effectiveDate": "2017-04-17", 
                "items": [
                    {
                        "amount": 1, 
                        "comment": "This is comment!", 
                        "id": "402890555b797b57015b7986fc1a001c", 
                        "quantity": 1, 
                        "serviceEndDate": "2016-11-30", 
                        "serviceStartDate": "2016-11-01", 
                        "skuName": "SKU-1", 
                        "taxItems": [
                            {
                                "amount": 0.03, 
                                "id": "402890555b797b57015b7986fc3c001d", 
                                "jurisdiction": "CALIFORNIA", 
                                "locationCode": "06", 
                                "taxCode": null, 
                                "taxCodeDescription": "This is tax code description!", 
                                "taxDate": "2016-11-30", 
                                "taxExemptAmount": 0.0, 
                                "taxName": "STATE TAX1", 
                                "taxRate": 0.0625, 
                                "taxRateDescription": "This is tax rate description!", 
                                "taxRateType": "Percentage"
                            }
                        ], 
                        "unitOfMeasure": "Test_UOM"
                    }, 
                    {
                        "amount": 2, 
                        "comment": "This is comment!", 
                        "id": "402890555b797b57015b7986fc41001e", 
                        "serviceEndDate": "2016-11-30", 
                        "serviceStartDate": "2016-11-01", 
                        "skuName": "SKU-2", 
                        "taxItems": [
                            {
                                "amount": 0.06, 
                                "id": "402890555b797b57015b7986fc4c001f", 
                                "jurisdiction": "CALIFORNIA", 
                                "locationCode": "06", 
                                "taxCode": null, 
                                "taxCodeDescription": "This is tax code description!", 
                                "taxDate": "2016-11-30", 
                                "taxExemptAmount": 0.0, 
                                "taxName": "STATE TAX2", 
                                "taxRate": 0.0625, 
                                "taxRateDescription": "This is tax rate description!", 
                                "taxRateType": "Percentage"
                            }
                        ], 
                        "unitOfMeasure": "Test_UOM"
                    }
                ], 
                "reasonCode": "Correcting invoice error"
            }' "https://rest.zuora.com/v1/debitmemos/{debitMemoId}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/debitmemos/{debitMemoId}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "autoPay": true, 
                "comment": "new comment", 
                "dueDate": "2017-05-20", 
                "effectiveDate": "2017-04-17", 
                "items": [
                    {
                        "amount": 1, 
                        "comment": "This is comment!", 
                        "id": "402890555b797b57015b7986fc1a001c", 
                        "quantity": 1, 
                        "serviceEndDate": "2016-11-30", 
                        "serviceStartDate": "2016-11-01", 
                        "skuName": "SKU-1", 
                        "taxItems": [
                            {
                                "amount": 0.03, 
                                "id": "402890555b797b57015b7986fc3c001d", 
                                "jurisdiction": "CALIFORNIA", 
                                "locationCode": "06", 
                                "taxCode": null, 
                                "taxCodeDescription": "This is tax code description!", 
                                "taxDate": "2016-11-30", 
                                "taxExemptAmount": 0.0, 
                                "taxName": "STATE TAX1", 
                                "taxRate": 0.0625, 
                                "taxRateDescription": "This is tax rate description!", 
                                "taxRateType": "Percentage"
                            }
                        ], 
                        "unitOfMeasure": "Test_UOM"
                    }, 
                    {
                        "amount": 2, 
                        "comment": "This is comment!", 
                        "id": "402890555b797b57015b7986fc41001e", 
                        "serviceEndDate": "2016-11-30", 
                        "serviceStartDate": "2016-11-01", 
                        "skuName": "SKU-2", 
                        "taxItems": [
                            {
                                "amount": 0.06, 
                                "id": "402890555b797b57015b7986fc4c001f", 
                                "jurisdiction": "CALIFORNIA", 
                                "locationCode": "06", 
                                "taxCode": null, 
                                "taxCodeDescription": "This is tax code description!", 
                                "taxDate": "2016-11-30", 
                                "taxExemptAmount": 0.0, 
                                "taxName": "STATE TAX2", 
                                "taxRate": 0.0625, 
                                "taxRateDescription": "This is tax rate description!", 
                                "taxRateType": "Percentage"
                            }
                        ], 
                        "unitOfMeasure": "Test_UOM"
                    }
                ], 
                "reasonCode": "Correcting invoice error"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"autoPay\": true, \n    \"comment\": \"new comment\", \n    \"dueDate\": \"2017-05-20\", \n    \"effectiveDate\": \"2017-04-17\", \n    \"items\": [\n        {\n            \"amount\": 1, \n            \"comment\": \"This is comment!\", \n            \"id\": \"402890555b797b57015b7986fc1a001c\", \n            \"quantity\": 1, \n            \"serviceEndDate\": \"2016-11-30\", \n            \"serviceStartDate\": \"2016-11-01\", \n            \"skuName\": \"SKU-1\", \n            \"taxItems\": [\n                {\n                    \"amount\": 0.03, \n                    \"id\": \"402890555b797b57015b7986fc3c001d\", \n                    \"jurisdiction\": \"CALIFORNIA\", \n                    \"locationCode\": \"06\", \n                    \"taxCode\": null, \n                    \"taxCodeDescription\": \"This is tax code description!\", \n                    \"taxDate\": \"2016-11-30\", \n                    \"taxExemptAmount\": 0.0, \n                    \"taxName\": \"STATE TAX1\", \n                    \"taxRate\": 0.0625, \n                    \"taxRateDescription\": \"This is tax rate description!\", \n                    \"taxRateType\": \"Percentage\"\n                }\n            ], \n            \"unitOfMeasure\": \"Test_UOM\"\n        }, \n        {\n            \"amount\": 2, \n            \"comment\": \"This is comment!\", \n            \"id\": \"402890555b797b57015b7986fc41001e\", \n            \"serviceEndDate\": \"2016-11-30\", \n            \"serviceStartDate\": \"2016-11-01\", \n            \"skuName\": \"SKU-2\", \n            \"taxItems\": [\n                {\n                    \"amount\": 0.06, \n                    \"id\": \"402890555b797b57015b7986fc4c001f\", \n                    \"jurisdiction\": \"CALIFORNIA\", \n                    \"locationCode\": \"06\", \n                    \"taxCode\": null, \n                    \"taxCodeDescription\": \"This is tax code description!\", \n                    \"taxDate\": \"2016-11-30\", \n                    \"taxExemptAmount\": 0.0, \n                    \"taxName\": \"STATE TAX2\", \n                    \"taxRate\": 0.0625, \n                    \"taxRateDescription\": \"This is tax rate description!\", \n                    \"taxRateType\": \"Percentage\"\n                }\n            ], \n            \"unitOfMeasure\": \"Test_UOM\"\n        }\n    ], \n    \"reasonCode\": \"Correcting invoice error\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/debitmemos/{debitMemoId}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"autoPay\": true, \n    \"comment\": \"new comment\", \n    \"dueDate\": \"2017-05-20\", \n    \"effectiveDate\": \"2017-04-17\", \n    \"items\": [\n        {\n            \"amount\": 1, \n            \"comment\": \"This is comment!\", \n            \"id\": \"402890555b797b57015b7986fc1a001c\", \n            \"quantity\": 1, \n            \"serviceEndDate\": \"2016-11-30\", \n            \"serviceStartDate\": \"2016-11-01\", \n            \"skuName\": \"SKU-1\", \n            \"taxItems\": [\n                {\n                    \"amount\": 0.03, \n                    \"id\": \"402890555b797b57015b7986fc3c001d\", \n                    \"jurisdiction\": \"CALIFORNIA\", \n                    \"locationCode\": \"06\", \n                    \"taxCode\": null, \n                    \"taxCodeDescription\": \"This is tax code description!\", \n                    \"taxDate\": \"2016-11-30\", \n                    \"taxExemptAmount\": 0.0, \n                    \"taxName\": \"STATE TAX1\", \n                    \"taxRate\": 0.0625, \n                    \"taxRateDescription\": \"This is tax rate description!\", \n                    \"taxRateType\": \"Percentage\"\n                }\n            ], \n            \"unitOfMeasure\": \"Test_UOM\"\n        }, \n        {\n            \"amount\": 2, \n            \"comment\": \"This is comment!\", \n            \"id\": \"402890555b797b57015b7986fc41001e\", \n            \"serviceEndDate\": \"2016-11-30\", \n            \"serviceStartDate\": \"2016-11-01\", \n            \"skuName\": \"SKU-2\", \n            \"taxItems\": [\n                {\n                    \"amount\": 0.06, \n                    \"id\": \"402890555b797b57015b7986fc4c001f\", \n                    \"jurisdiction\": \"CALIFORNIA\", \n                    \"locationCode\": \"06\", \n                    \"taxCode\": null, \n                    \"taxCodeDescription\": \"This is tax code description!\", \n                    \"taxDate\": \"2016-11-30\", \n                    \"taxExemptAmount\": 0.0, \n                    \"taxName\": \"STATE TAX2\", \n                    \"taxRate\": 0.0625, \n                    \"taxRateDescription\": \"This is tax rate description!\", \n                    \"taxRateType\": \"Percentage\"\n                }\n            ], \n            \"unitOfMeasure\": \"Test_UOM\"\n        }\n    ], \n    \"reasonCode\": \"Correcting invoice error\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/debitmemos/{debitMemoId}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/debitmemos/{debitMemoId}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"autoPay\": true, \n    \"comment\": \"new comment\", \n    \"dueDate\": \"2017-05-20\", \n    \"effectiveDate\": \"2017-04-17\", \n    \"items\": [\n        {\n            \"amount\": 1, \n            \"comment\": \"This is comment!\", \n            \"id\": \"402890555b797b57015b7986fc1a001c\", \n            \"quantity\": 1, \n            \"serviceEndDate\": \"2016-11-30\", \n            \"serviceStartDate\": \"2016-11-01\", \n            \"skuName\": \"SKU-1\", \n            \"taxItems\": [\n                {\n                    \"amount\": 0.03, \n                    \"id\": \"402890555b797b57015b7986fc3c001d\", \n                    \"jurisdiction\": \"CALIFORNIA\", \n                    \"locationCode\": \"06\", \n                    \"taxCode\": null, \n                    \"taxCodeDescription\": \"This is tax code description!\", \n                    \"taxDate\": \"2016-11-30\", \n                    \"taxExemptAmount\": 0.0, \n                    \"taxName\": \"STATE TAX1\", \n                    \"taxRate\": 0.0625, \n                    \"taxRateDescription\": \"This is tax rate description!\", \n                    \"taxRateType\": \"Percentage\"\n                }\n            ], \n            \"unitOfMeasure\": \"Test_UOM\"\n        }, \n        {\n            \"amount\": 2, \n            \"comment\": \"This is comment!\", \n            \"id\": \"402890555b797b57015b7986fc41001e\", \n            \"serviceEndDate\": \"2016-11-30\", \n            \"serviceStartDate\": \"2016-11-01\", \n            \"skuName\": \"SKU-2\", \n            \"taxItems\": [\n                {\n                    \"amount\": 0.06, \n                    \"id\": \"402890555b797b57015b7986fc4c001f\", \n                    \"jurisdiction\": \"CALIFORNIA\", \n                    \"locationCode\": \"06\", \n                    \"taxCode\": null, \n                    \"taxCodeDescription\": \"This is tax code description!\", \n                    \"taxDate\": \"2016-11-30\", \n                    \"taxExemptAmount\": 0.0, \n                    \"taxName\": \"STATE TAX2\", \n                    \"taxRate\": 0.0625, \n                    \"taxRateDescription\": \"This is tax rate description!\", \n                    \"taxRateType\": \"Percentage\"\n                }\n            ], \n            \"unitOfMeasure\": \"Test_UOM\"\n        }\n    ], \n    \"reasonCode\": \"Correcting invoice error\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/debitmemos/{debitMemoId}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"autoPay\": true, \n    \"comment\": \"new comment\", \n    \"dueDate\": \"2017-05-20\", \n    \"effectiveDate\": \"2017-04-17\", \n    \"items\": [\n        {\n            \"amount\": 1, \n            \"comment\": \"This is comment!\", \n            \"id\": \"402890555b797b57015b7986fc1a001c\", \n            \"quantity\": 1, \n            \"serviceEndDate\": \"2016-11-30\", \n            \"serviceStartDate\": \"2016-11-01\", \n            \"skuName\": \"SKU-1\", \n            \"taxItems\": [\n                {\n                    \"amount\": 0.03, \n                    \"id\": \"402890555b797b57015b7986fc3c001d\", \n                    \"jurisdiction\": \"CALIFORNIA\", \n                    \"locationCode\": \"06\", \n                    \"taxCode\": null, \n                    \"taxCodeDescription\": \"This is tax code description!\", \n                    \"taxDate\": \"2016-11-30\", \n                    \"taxExemptAmount\": 0.0, \n                    \"taxName\": \"STATE TAX1\", \n                    \"taxRate\": 0.0625, \n                    \"taxRateDescription\": \"This is tax rate description!\", \n                    \"taxRateType\": \"Percentage\"\n                }\n            ], \n            \"unitOfMeasure\": \"Test_UOM\"\n        }, \n        {\n            \"amount\": 2, \n            \"comment\": \"This is comment!\", \n            \"id\": \"402890555b797b57015b7986fc41001e\", \n            \"serviceEndDate\": \"2016-11-30\", \n            \"serviceStartDate\": \"2016-11-01\", \n            \"skuName\": \"SKU-2\", \n            \"taxItems\": [\n                {\n                    \"amount\": 0.06, \n                    \"id\": \"402890555b797b57015b7986fc4c001f\", \n                    \"jurisdiction\": \"CALIFORNIA\", \n                    \"locationCode\": \"06\", \n                    \"taxCode\": null, \n                    \"taxCodeDescription\": \"This is tax code description!\", \n                    \"taxDate\": \"2016-11-30\", \n                    \"taxExemptAmount\": 0.0, \n                    \"taxName\": \"STATE TAX2\", \n                    \"taxRate\": 0.0625, \n                    \"taxRateDescription\": \"This is tax rate description!\", \n                    \"taxRateType\": \"Percentage\"\n                }\n            ], \n            \"unitOfMeasure\": \"Test_UOM\"\n        }\n    ], \n    \"reasonCode\": \"Correcting invoice error\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/debitmemos/{debitMemoId}/application-parts":
    get:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Retrieves information about the payments or credit memos that are applied to a specified debit memo.
      operationId: GET_DebitMemoApplicationParts
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a debit memo. For example, 8a8082e65b27f6c3015ba419f3c2644e.
          in: path
          name: debitMemoId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    applicationParts:
                      - appliedAmount: 22
                        createdById: 402881e522cf4f9b0122cf5d82860002
                        createdDate: 2018-01-02 11:42:16
                        creditMemoId: 4028905f60a165a50160b4f632ff023d
                        paymentId: null
                        updatedById: 402881e522cf4f9b0122cf5d82860002
                        updatedDate: 2018-01-02 11:42:16
                      - appliedAmount: 11
                        createdById: 402881e522cf4f9b0122cf5d82860002
                        createdDate: 2018-01-02 11:41:38
                        creditMemoId: null
                        paymentId: 4028905f60a165a50160b4f5d5cb0229
                        updatedById: 402881e522cf4f9b0122cf5d82860002
                        updatedDate: 2018-01-02 11:41:38
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GetDebitMemoApplicationPartCollectionType"
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List all application parts of a debit memo
      tags:
        - Debit Memos
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/debitmemos/{debitMemoId}/application-parts"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/debitmemos/{debitMemoId}/application-parts');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/debitmemos/{debitMemoId}/application-parts")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/debitmemos/{debitMemoId}/application-parts", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/debitmemos/{debitMemoId}/application-parts")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/debitmemos/{debitMemoId}/application-parts");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/debitmemos/{debitMemoId}/cancel":
    put:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Cancels a debit memo. Only debit memos with the Draft status can be cancelled. 

        You can cancel a debit memo only if you have the user permission. See [Billing Roles](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/A_Administrator_Settings/User_Roles/d_Billing_Roles) for more information.
      operationId: PUT_CancelDebitMemo
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a debit memo. For example, 8a8082e65b27f6c3015ba419f3c2644e.
          in: path
          name: debitMemoId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 402890555a7d4022015a7dabf5f60088
                    amount: 0.01
                    autoPay: true
                    balance: 0.01
                    beAppliedAmount: 0
                    cancelledById: 402881e522cf4f9b0122cf5d82860002
                    cancelledOn: 2017-09-01 19:59:07
                    comment: the comment
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-03-01 17:13:15
                    debitMemoDate: 2017-11-30
                    dueDate: 2017-12-30
                    id: 402890555a87d7f5015a89251edc0045
                    latestPDFFileId: null
                    number: DM00000003
                    postedById: null
                    postedOn: null
                    reasonCode: Charge Dispute
                    referredInvoiceId: 402890555a7d4022015a7dadb3b300a4
                    status: Canceled
                    success: true
                    targetDate: null
                    taxAmount: 0.01
                    taxMessage: null
                    taxStatus: null
                    totalTaxExemptAmount: 0
                    transferredToAccounting: No
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 17:57:26
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETDebitMemoType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Cancel a debit memo
      tags:
        - Debit Memos
      x-code-samples:
        - lang: Curl
          source: "curl -X PUT -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" -d '{}' \"https://rest.zuora.com/v1/debitmemos/{debitMemoId}/cancel\""
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/debitmemos/{debitMemoId}/cancel');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/debitmemos/{debitMemoId}/cancel")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/debitmemos/{debitMemoId}/cancel", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/debitmemos/{debitMemoId}/cancel")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/debitmemos/{debitMemoId}/cancel");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/debitmemos/{debitMemoId}/collect":
    post:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

        This API operation provides an easy way to let the client-side to collect an existing posted debit memo.
        It supports the following steps:
          1. Apply unapplied credit memos to the posted debit memo by Oldest-First-Largest-First rule if there are more than one unapplied credit memos.
          2. Apply unapplied payments to the posted debit memo by Oldest-First-Largest-First rule if there are more than one unapplied payments.
          3. Process payment to the posted debit memo if there is an open-balance on it.

        **Reistrictions**

        Since this API will do lots of works, and some of them are resource consuming, we need to resitrict the usage of this API by the following conditions:
          1. If the target debit memo gets more than 10 debit memo items, the request will be rejected.
          2. If `CreditMemo` is specified in `applicationOrder`, when there are more than 25 credit memos will be used to apply to the debit memo, the request will be rejected.
          3. If `CreditMemo` is specified in `applicationOrder`, when there are more than 100 credit memo items will be used to apply to the debit memo, the request will be rejected.
          4. If `UnappliedPayment` is specified in `applicationOrder`, when there are more than 25 payments will be used to apply to the debit memo, the request will be rejected.
      operationId: POST_DebitMemoCollect
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The ID of a posted debit memo. For example, 8a8082e65b27f6c3015ba419f3c2644e.
          in: path
          name: debitMemoId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/DebitMemoCollectRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    appliedCreditMemos:
                      - appliedAmount: 12.8
                        id: 2c98902f6f1de6d1016f1def4c003bd8
                        number: CM00000452
                        unappliedAmount: 0
                      - appliedAmount: 9.99
                        id: 2c98902f6f1de6d1016f1deef1b93bbe
                        number: CM00009201
                        unappliedAmount: 0
                    appliedPayments:
                      - appliedAmount: 3.33
                        id: 2c98902f6f1de6d1016f1defbf3e3bf5
                        number: P-00001602
                        unappliedAmount: 0
                      - appliedAmount: 1.2
                        id: 2c98902f6f1de6d1016f1def887f3bec
                        number: P-00001761
                        unappliedAmount: 0
                    debitMemo:
                      id: 2c98902f6f1de6d1016f1dfc86aa3c34
                      number: DM00003326
                    processedPayment:
                      amount: 12.68
                      gatewayId: 2c98902f6f1de6d1016f1ded559f3b9d
                      gatewayResponse: This transaction has been approved by Test gateway.
                      gatewayResponseCode: approve
                      id: 2c98902f6f1de6d1016f1dfc8ad23c68
                      number: P-00001803
                      paymentMethodId: 2c98902f6f1de6d1016f1dedba313ba2
                      status: Processed
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/DebitMemoCollectResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Collect a posted debit memo
      tags:
        - Debit Memos
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "applicationOrder": [
                    "CreditMemo", 
                    "UnappliedPayment"
                ], 
                "applyCredit": true, 
                "collect": true, 
                "payment": {
                    "gatewayId": "2c98902f6f1de6d1016f1ded559f3b9d", 
                    "paymentMethodId": "2c98902f6f1de6d1016f1dedba313ba2"
                }
            }' "https://rest.zuora.com/v1/debitmemos/{debitMemoId}/collect"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/debitmemos/{debitMemoId}/collect');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "applicationOrder": [
                    "CreditMemo", 
                    "UnappliedPayment"
                ], 
                "applyCredit": true, 
                "collect": true, 
                "payment": {
                    "gatewayId": "2c98902f6f1de6d1016f1ded559f3b9d", 
                    "paymentMethodId": "2c98902f6f1de6d1016f1dedba313ba2"
                }
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"applicationOrder\": [\n        \"CreditMemo\", \n        \"UnappliedPayment\"\n    ], \n    \"applyCredit\": true, \n    \"collect\": true, \n    \"payment\": {\n        \"gatewayId\": \"2c98902f6f1de6d1016f1ded559f3b9d\", \n        \"paymentMethodId\": \"2c98902f6f1de6d1016f1dedba313ba2\"\n    }\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/debitmemos/{debitMemoId}/collect")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"applicationOrder\": [\n        \"CreditMemo\", \n        \"UnappliedPayment\"\n    ], \n    \"applyCredit\": true, \n    \"collect\": true, \n    \"payment\": {\n        \"gatewayId\": \"2c98902f6f1de6d1016f1ded559f3b9d\", \n        \"paymentMethodId\": \"2c98902f6f1de6d1016f1dedba313ba2\"\n    }\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/debitmemos/{debitMemoId}/collect", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/debitmemos/{debitMemoId}/collect")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"applicationOrder\": [\n        \"CreditMemo\", \n        \"UnappliedPayment\"\n    ], \n    \"applyCredit\": true, \n    \"collect\": true, \n    \"payment\": {\n        \"gatewayId\": \"2c98902f6f1de6d1016f1ded559f3b9d\", \n        \"paymentMethodId\": \"2c98902f6f1de6d1016f1dedba313ba2\"\n    }\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/debitmemos/{debitMemoId}/collect");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"applicationOrder\": [\n        \"CreditMemo\", \n        \"UnappliedPayment\"\n    ], \n    \"applyCredit\": true, \n    \"collect\": true, \n    \"payment\": {\n        \"gatewayId\": \"2c98902f6f1de6d1016f1ded559f3b9d\", \n        \"paymentMethodId\": \"2c98902f6f1de6d1016f1dedba313ba2\"\n    }\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/debitmemos/{debitMemoId}/emails":
    post:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Sends a posted debit memo to the specified email addresses manually.



        ## Notes
          - You must activate the **Email Debit Memo | Manually email Debit Memo** notification before emailing debit memos. To include the debit memo PDF in the email, select the **Include Debit Memo PDF** check box in the **Edit notification** dialog from the Zuora UI. See [Create and Edit Notifications](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/Notifications/C_Create_Notifications#section_2) for more information.


          - Zuora sends the email messages based on the email template you set. You can set the email template to use in the **Delivery Options** panel of the **Edit notification** dialog from the Zuora UI. By default, the **Manual Email for Debit Memo Default Template** template is used. See [Create and Edit Email Templates](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/Notifications/Create_Email_Templates) for more information.


          - The debit memos are sent only to the work email addresses or personal email addresses of the Bill To contact if the following conditions are all met:

            * The `useEmailTemplateSetting` field is set to `false`.
            * The email addresses are not specified in the `emailAddresses` field.
      operationId: POST_EmailDebitMemo
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The ID of a posted debit memo. For example, 8a8082e65b27f6c3015ba419f3c2644e.
          in: path
          name: debitMemoId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PostDebitMemoEmailType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Email a debit memo
      tags:
        - Debit Memos
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "emailAddresses": "contact1@example.com,contact2@example.com", 
                "includeAdditionalEmailAddresses": false, 
                "useEmailTemplateSetting": false
            }' "https://rest.zuora.com/v1/debitmemos/{debitMemoId}/emails"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/debitmemos/{debitMemoId}/emails');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "emailAddresses": "contact1@example.com,contact2@example.com", 
                "includeAdditionalEmailAddresses": false, 
                "useEmailTemplateSetting": false
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"emailAddresses\": \"contact1@example.com,contact2@example.com\", \n    \"includeAdditionalEmailAddresses\": false, \n    \"useEmailTemplateSetting\": false\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/debitmemos/{debitMemoId}/emails")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"emailAddresses\": \"contact1@example.com,contact2@example.com\", \n    \"includeAdditionalEmailAddresses\": false, \n    \"useEmailTemplateSetting\": false\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/debitmemos/{debitMemoId}/emails", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/debitmemos/{debitMemoId}/emails")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"emailAddresses\": \"contact1@example.com,contact2@example.com\", \n    \"includeAdditionalEmailAddresses\": false, \n    \"useEmailTemplateSetting\": false\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/debitmemos/{debitMemoId}/emails");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"emailAddresses\": \"contact1@example.com,contact2@example.com\", \n    \"includeAdditionalEmailAddresses\": false, \n    \"useEmailTemplateSetting\": false\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/debitmemos/{debitMemoId}/files":
    post:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Uploads an externally generated PDF file for a debit memo that is in Draft or Posted status.

        To use this operation, you must enable the Modify Debit Memo permission. See [Billing Permissions](https://knowledgecenter.zuora.com/Billing/Tenant_Management/A_Administrator_Settings/User_Roles/d_Billing_Roles) for more information.

        This operation has the following restrictions:
        - Only the PDF file format is supported.
        - The maximum size of the PDF file to upload is 4 MB.
        - A maximum of 50 PDF files can be uploaded for one debit memo.
      operationId: POST_UploadFileForDebitMemo
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: |
            The ID of the debit memo that you want to upload a PDF file for. For example, 402890555a87d7f5015a8919e4fe002e.
          in: path
          name: debitMemoId
          required: true
          schema:
            type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              properties:
                file:
                  description: |
                    The PDF file to upload for the debit memo.
                  format: binary
                  type: string
              type: object
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    fileId: 40289f466463d683016463ef8b7301a3
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTUploadFileResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Upload a file for a debit memo
      tags:
        - Debit Memos
      x-code-samples:
        - lang: Curl
          source: |
            curl -X POST -H "Authorization: Bearer f21f017e4724445d8647b1f0de7ed6f1" -F "file=@DebitMemoFile.pdf" "https://rest.zuora.com/v1/debitmemos/402890555a87d7f5015a8919e4fe002e/files"
  "/v1/debitmemos/{debitMemoId}/items":
    get:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Retrieves the information about all items of a debit memo. A debit memo item is a single line item in a debit memo. 

        ### Filtering

        You can use query parameters to restrict the data returned in the response. Each query parameter corresponds to one field in the response body.

        If the value of a filterable field is string, you can set the corresponding query parameter to `null` when filtering. Then, you can get the response data with this field value being `null`. 

        Examples:

        - /v1/debitmemos/402890245c7ca371015c7cb40b28001f/items?amount=100

        - /v1/debitmemos/402890245c7ca371015c7cb40b28001f/items?amount=100&sort=createdDate
      operationId: GET_DebitMemoItems
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - description: |
            The unique ID of a debit memo. For example, 8a8082e65b27f6c3015ba419f3c2644e.
          in: path
          name: debitMemoId
          required: true
          schema:
            type: string
        - description: |
            
            The minor version of the Zuora REST API. See [Minor Version](https://www.zuora.com/developer/api-reference/#section/API-Versions/Minor-Version) for information about REST API version control. 

            This header affects the availability of the following response fields:
            * `items` > `taxItems`
            * `items` > `taxationItems`
            * `items` > `comment`
            * `items` > `description`
          in: header
          name: zuora-version
          required: false
          schema:
            type: string
        - description: |
            This parameter filters the response based on the `amount` field.
          in: query
          name: amount
          required: false
          schema:
            format: double
            type: number
        - description: |
            This parameter filters the response based on the `beAppliedAmount` field.
          in: query
          name: beAppliedAmount
          required: false
          schema:
            format: double
            type: number
        - description: |
            This parameter filters the response based on the `createdById` field.
          in: query
          name: createdById
          required: false
          schema:
            type: string
        - description: |
            This parameter filters the response based on the `createdDate` field.
          in: query
          name: createdDate
          required: false
          schema:
            format: date-time
            type: string
        - description: |
            This parameter filters the response based on the `id` field.
          in: query
          name: id
          required: false
          schema:
            type: string
        - description: |
            This parameter filters the response based on the `serviceEndDate` field.
          in: query
          name: serviceEndDate
          required: false
          schema:
            format: date
            type: string
        - description: |
            This parameter filters the response based on the `serviceStartDate` field.
          in: query
          name: serviceStartDate
          required: false
          schema:
            format: date
            type: string
        - description: |
            This parameter filters the response based on the `sku` field.
          in: query
          name: sku
          required: false
          schema:
            type: string
        - description: |
            This parameter filters the response based on the `skuName` field.
          in: query
          name: skuName
          required: false
          schema:
            type: string
        - description: |
            This parameter filters the response based on the `sourceItemId` field.
          in: query
          name: sourceItemId
          required: false
          schema:
            type: string
        - description: |
            This parameter filters the response based on the `subscriptionId` field.
          in: query
          name: subscriptionId
          required: false
          schema:
            type: string
        - description: |
            This parameter filters the response based on the `updatedById` field.
          in: query
          name: updatedById
          required: false
          schema:
            type: string
        - description: |
            This parameter filters the response based on the `updatedDate` field.
          in: query
          name: updatedDate
          required: false
          schema:
            format: date-time
            type: string
        - description: |
            This parameter restricts the order of the data returned in the response. You can use this parameter to supply a dimension you want to sort on.

            A sortable field uses the following form: 

            *operator* *field_name*

            You can use at most two sortable fields in one URL path. Use a comma to separate sortable fields. For example:  *operator* *field_name*, *operator* *field_name*  

            *operator* is used to mark the order of sequencing. The operator is optional. If you only specify the sortable field without any operator, the response data is sorted in descending order by this field.

              - The `-` operator indicates an ascending order.
              - The `+` operator indicates a descending order.

            By default, the response data is displayed in descending order by updated date.

            *field_name* indicates the name of a sortable field. The supported sortable fields of this operation are as below:

              - id
              - amount
              - beAppliedAmount
              - sku
              - skuName
              - serviceStartDate
              - serviceEndDate
              - sourceItemId
              - createdDate
              - createdById
              - updatedDate
              - updatedById
              - subscriptionId
              
            Examples:

            - /v1/debitmemos/402890245c7ca371015c7cb40b28001f/items?sort=createdDate

            - /v1/debitmemos/402890245c7ca371015c7cb40b28001f/items?amount=100&sort=createdDate
          in: query
          name: sort
          required: false
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    items:
                      - amount: 1
                        amountWithoutTax: 1
                        balance: 1
                        beAppliedAmount: 0
                        comment: This is comment!
                        createdById: 402881e522cf4f9b0122cf5d82860002
                        createdDate: 2017-03-01 17:13:15
                        financeInformation:
                          deferredRevenueAccountingCode: Subscription Revenue
                          deferredRevenueAccountingCodeType: SalesRevenue
                          recognizedRevenueAccountingCode: Subscription Revenue
                          recognizedRevenueAccountingCodeType: SalesRevenue
                        id: 402890555a87d7f5015a89251ede0046
                        quantity: 1
                        serviceEndDate: 2017-11-30
                        serviceStartDate: 2017-11-01
                        sku: SKU-00000002
                        skuName: SKU-30
                        sourceItemId: 402890555a7d4022015a7dadb3b700a6
                        sourceItemType: InvoiceDetail
                        subscriptionId: null
                        taxMode: TaxExclusive
                        taxationItems:
                          data:
                            - balance: 0.01
                              creditAmount: 0
                              exemptAmount: 0
                              financeInformation:
                                salesTaxPayableAccountingCode: null
                                salesTaxPayableAccountingCodeType: null
                              id: 402890555a87d7f5015a89251ef10047
                              jurisdiction: CALIFORNIA
                              locationCode: "06"
                              name: STATE TAX
                              paymentAmount: 0
                              sourceTaxItemId: 402890555a7d4022015a7dadb39b00a1
                              taxAmount: 0.01
                              taxCode: ZtaxCode
                              taxCodeDescription: ""
                              taxDate: 2017-11-30
                              taxRate: 0.0625
                              taxRateDescription: This is tax rate description!
                              taxRateType: Percentage
                        unitOfMeasure: Each
                        unitPrice: 1
                        updatedById: 402881e522cf4f9b0122cf5d82860002
                        updatedDate: 2017-03-01 17:13:15
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETDebitMemoItemCollectionType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List debit memo items
      tags:
        - Debit Memos
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/debitmemos/{debitMemoId}/items"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/debitmemos/{debitMemoId}/items');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/debitmemos/{debitMemoId}/items")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/debitmemos/{debitMemoId}/items", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/debitmemos/{debitMemoId}/items")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/debitmemos/{debitMemoId}/items");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/debitmemos/{debitMemoId}/items/{dmitemid}":
    get:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

        Retrieves information about a specific item of a debit memo. A debit memo item is a single line item in a debit memo.
      operationId: GET_DebitMemoItem
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a debit memo item. You can get the debit memo item ID from the response of [List debit memo items](https://www.zuora.com/developer/api-reference/#operation/GET_DebitMemoItems).
          in: path
          name: dmitemid
          required: true
          schema:
            type: string
        - description: |
            The unique ID of a debit memo. For example, 8a8082e65b27f6c3015ba419f3c2644e.
          in: path
          name: debitMemoId
          required: true
          schema:
            type: string
        - description: |
            
            The minor version of the Zuora REST API. See [Minor Version](https://www.zuora.com/developer/api-reference/#section/API-Versions/Minor-Version) for information about REST API version control. 

            This header affects the availability of the following response fields:
            * `taxItems`
            * `taxationItems`
            * `comment`
            * `description`
          in: header
          name: zuora-version
          required: false
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    amount: 1
                    amountWithoutTax: 1
                    balance: 1
                    beAppliedAmount: 0
                    comment: aa
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-03-01 17:01:00
                    financeInformation:
                      deferredRevenueAccountingCode: Subscription Revenue
                      deferredRevenueAccountingCodeType: SalesRevenue
                      recognizedRevenueAccountingCode: Subscription Revenue
                      recognizedRevenueAccountingCodeType: SalesRevenue
                    id: 402890555a87d7f5015a8919e500002f
                    quantity: 1
                    serviceEndDate: 2017-03-26
                    serviceStartDate: 2017-02-27
                    sku: SKU-00000002
                    skuName: ZTax Component
                    sourceItemId: 402890555a7d4022015a7dadb3b700a6
                    sourceItemType: InvoiceDetail
                    subscriptionId: null
                    success: true
                    taxMode: TaxExclusive
                    taxationItems:
                      data:
                        - balance: 5
                          creditAmount: 0
                          exemptAmount: 0
                          financeInformation:
                            salesTaxPayableAccountingCode: null
                            salesTaxPayableAccountingCodeType: null
                          id: 402890555a87d7f5015a8919e8450031
                          jurisdiction: USA
                          locationCode: ""
                          name: my tax
                          paymentAmount: 0
                          sourceTaxItemId: 402890555a7d4022015a7dadb39b00a1
                          taxAmount: 5
                          taxCode: ZtaxCode
                          taxCodeDescription: ""
                          taxDate: 2017-02-27
                          taxRate: 5
                          taxRateDescription: desc3
                          taxRateType: FlatFee
                    unitOfMeasure: Each
                    unitPrice: 1
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 17:01:00
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETDebitMemoItemType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a debit memo item
      tags:
        - Debit Memos
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/debitmemos/{debitMemoId}/items/{dmitemid}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/debitmemos/{debitMemoId}/items/{dmitemid}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/debitmemos/{debitMemoId}/items/{dmitemid}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/debitmemos/{debitMemoId}/items/{dmitemid}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/debitmemos/{debitMemoId}/items/{dmitemid}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/debitmemos/{debitMemoId}/items/{dmitemid}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/debitmemos/{debitMemoId}/items/{dmitemid}/taxation-items":
    get:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

        Retrieves information about the taxation items of a specific debit memo item.
      operationId: GET_TaxationItemsOfDebitMemoItem
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_page"
        - description: |
            The unique ID of a debit memo item. You can get the debit memo item ID from the response of [List debit memo items](https://www.zuora.com/developer/api-reference/#operation/GET_DebitMemoItems).
          in: path
          name: dmitemid
          required: true
          schema:
            type: string
        - description: |
            The unique ID of a debit memo. For example, 8a8082e65b27f6c3015ba419f3c2644e.
          in: path
          name: debitMemoId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    data:
                      - balance: 10
                        creditAmount: 0
                        exemptAmount: 10
                        financeInformation:
                          salesTaxPayableAccountingCode: null
                          salesTaxPayableAccountingCodeType: null
                        id: 402883836904567d01690530df760231
                        jurisdiction: Jurisdiction
                        locationCode: "8"
                        name: taxName_0
                        paymentAmount: 0
                        sourceTaxItemId: null
                        taxAmount: 10
                        taxCode: taxCode
                        taxCodeDescription: taxCodeDescription
                        taxDate: 2016-10-10
                        taxRate: 0.1
                        taxRateDescription: taxRateDescription
                        taxRateType: Percentage
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETTaxationItemsOfDebitMemoItemType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.        
              schema:
                maxLength: 64
                type: string
      summary: List all taxation items of a debit memo item
      tags:
        - Debit Memos
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/debitmemos/{debitMemoId}/items/{dmitemid}/taxation-items"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/debitmemos/{debitMemoId}/items/{dmitemid}/taxation-items');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/debitmemos/{debitMemoId}/items/{dmitemid}/taxation-items")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/debitmemos/{debitMemoId}/items/{dmitemid}/taxation-items", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/debitmemos/{debitMemoId}/items/{dmitemid}/taxation-items")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/debitmemos/{debitMemoId}/items/{dmitemid}/taxation-items");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/debitmemos/{debitMemoId}/pdfs":
    post:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

        Creates a PDF file for a specified debit memo. To access the generated PDF file, you can download it by clicking **View PDF** on the detailed debit memo page through the Zuora UI.

        This REST API operation can be used only if you have the billing document file generation feature and the Billing user permission "Regenerate PDF" enabled.
      operationId: POST_DebitMemoPDF
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of the debit memo that you want to create a PDF file for. For example, 8a8082e65b27f6c3015ba419f3c2644e.
          in: path
          name: debitMemoId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTMemoPdfResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Generate a debit memo PDF file
      tags:
        - Debit Memos
      x-code-samples:
        - lang: Curl
          source: "curl -X POST -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" -d '{}' \"https://rest.zuora.com/v1/debitmemos/{debitMemoId}/pdfs\""
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/debitmemos/{debitMemoId}/pdfs');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/debitmemos/{debitMemoId}/pdfs")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/debitmemos/{debitMemoId}/pdfs", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/debitmemos/{debitMemoId}/pdfs")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/debitmemos/{debitMemoId}/pdfs");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/debitmemos/{debitMemoId}/post":
    put:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Posts a debit memo to activate it. You can post debit memos only if you have the [Billing permissions](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/A_Administrator_Settings/User_Roles/d_Billing_Roles#Billing_Permissions).
      operationId: PUT_PostDebitMemo
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a debit memo. For example, 8a8082e65b27f6c3015ba419f3c2644e.
          in: path
          name: debitMemoId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 402890555a7d4022015a7dabf5f60088
                    amount: 9
                    autoPay: true
                    balance: 9
                    beAppliedAmount: 0
                    cancelledById: null
                    cancelledOn: null
                    comment: ""
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-03-01 17:01:00
                    debitMemoDate: 2017-03-01
                    dueDate: 2017-03-31
                    id: 402890555a87d7f5015a8919e4fe002e
                    latestPDFFileId: null
                    number: DM00000002
                    postedById: 402881e522cf4f9b0122cf5d82860002
                    postedOn: 2017-03-01 18:14:29
                    reasonCode: Correcting invoice error
                    referredInvoiceId: 402890555a7d4022015a7dadb3b300a4
                    status: Posted
                    success: true
                    targetDate: null
                    taxAmount: 8
                    taxMessage: null
                    taxStatus: null
                    totalTaxExemptAmount: 0
                    transferredToAccounting: No
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 18:14:29
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETDebitMemoType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Post a debit memo
      tags:
        - Debit Memos
      x-code-samples:
        - lang: Curl
          source: "curl -X PUT -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" -d '{}' \"https://rest.zuora.com/v1/debitmemos/{debitMemoId}/post\""
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/debitmemos/{debitMemoId}/post');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/debitmemos/{debitMemoId}/post")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/debitmemos/{debitMemoId}/post", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/debitmemos/{debitMemoId}/post")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/debitmemos/{debitMemoId}/post");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/debitmemos/{debitMemoId}/taxationitems":
    post:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

        Creates taxation items for a debit memo.
      operationId: POST_DM_TaxationItems
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a debit memo. For example, 8a8082e65b27f6c3015ba419f3c2644e.
          in: path
          name: debitMemoId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTTaxationItemListForDMType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
                    taxationItems:
                      - createdById: 402881e522cf4f9b0122cf5d82860002
                        createdDate: 2017-03-01 10:27:20
                        exemptAmount: 0
                        financeInformation:
                          onAccountAccountingCode: null
                          onAccountAccountingCodeType: null
                          salesTaxPayableAccountingCode: Check
                          salesTaxPayableAccountingCodeType: Cash
                        id: 402890555a7e9791015a87b17cee0076
                        jurisdiction: CALIFORNIA
                        locationCode: "06"
                        memoItemId: 402890555a7e9791015a87b082980068
                        name: STATE TAX
                        sourceTaxItemId: 402890555a7d4022015a7db254e200c2
                        taxAmount: 0.01
                        taxCode: ServiceTaxCode
                        taxCodeDescription: This is tax code description!
                        taxDate: 2016-06-05
                        taxRate: 0.0625
                        taxRateDescription: This is tax rate description!
                        taxRateType: Percentage
                        updatedById: 402881e522cf4f9b0122cf5d82860002
                        updatedDate: 2017-03-01 10:27:20
                      - createdById: 402881e522cf4f9b0122cf5d82860002
                        createdDate: 2017-03-01 10:27:20
                        exemptAmount: 0
                        financeInformation:
                          onAccountAccountingCode: null
                          onAccountAccountingCodeType: null
                          salesTaxPayableAccountingCode: Check
                          salesTaxPayableAccountingCodeType: Cash
                        id: 402890555a7e9791015a87b17cf10077
                        jurisdiction: CALIFORNIA
                        locationCode: "06"
                        memoItemId: 402890555a7e9791015a87b082d5006a
                        name: STATE TAX
                        taxAmount: 0.02
                        taxCode: ServiceTaxCode
                        taxCodeDescription: This is tax code description!
                        taxDate: 2016-06-05
                        taxRate: 0.0625
                        taxRateDescription: This is tax rate description!
                        taxRateType: Percentage
                        updatedById: 402881e522cf4f9b0122cf5d82860002
                        updatedDate: 2017-03-01 10:27:20
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETTaxationItemListType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Create taxation items for a debit memo
      tags:
        - Debit Memos
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "taxationItems": [
                    {
                        "exemptAmount": 0.0, 
                        "financeInformation": {
                            "salesTaxPayableAccountingCode": "Check"
                        }, 
                        "jurisdiction": "CALIFORNIA", 
                        "locationCode": "06", 
                        "memoItemId": "402890555a7e9791015a87b082980068", 
                        "name": "STATE TAX", 
                        "sourceTaxItemId": "402890555a7d4022015a7db254e200c2", 
                        "taxAmount": 0.01, 
                        "taxCode": "ServiceTaxCode", 
                        "taxCodeDescription": "This is tax code description!", 
                        "taxDate": "2016-06-05", 
                        "taxRate": 0.0625, 
                        "taxRateDescription": "This is tax rate description!", 
                        "taxRateType": "Percentage"
                    }, 
                    {
                        "exemptAmount": 0.0, 
                        "financeInformation": {
                            "salesTaxPayableAccountingCode": "Check"
                        }, 
                        "jurisdiction": "CALIFORNIA", 
                        "locationCode": "06", 
                        "memoItemId": "402890555a7e9791015a87b082d5006a", 
                        "name": "STATE TAX", 
                        "sourceTaxItemId": "402890555a7d4022015a7db254e200c3", 
                        "taxAmount": 0.02, 
                        "taxCode": "ServiceTaxCode", 
                        "taxCodeDescription": "This is tax code description!", 
                        "taxDate": "2016-06-05", 
                        "taxRate": 0.0625, 
                        "taxRateDescription": "This is tax rate description!", 
                        "taxRateType": "Percentage"
                    }
                ]
            }' "https://rest.zuora.com/v1/debitmemos/{debitMemoId}/taxationitems"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/debitmemos/{debitMemoId}/taxationitems');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "taxationItems": [
                    {
                        "exemptAmount": 0.0, 
                        "financeInformation": {
                            "salesTaxPayableAccountingCode": "Check"
                        }, 
                        "jurisdiction": "CALIFORNIA", 
                        "locationCode": "06", 
                        "memoItemId": "402890555a7e9791015a87b082980068", 
                        "name": "STATE TAX", 
                        "sourceTaxItemId": "402890555a7d4022015a7db254e200c2", 
                        "taxAmount": 0.01, 
                        "taxCode": "ServiceTaxCode", 
                        "taxCodeDescription": "This is tax code description!", 
                        "taxDate": "2016-06-05", 
                        "taxRate": 0.0625, 
                        "taxRateDescription": "This is tax rate description!", 
                        "taxRateType": "Percentage"
                    }, 
                    {
                        "exemptAmount": 0.0, 
                        "financeInformation": {
                            "salesTaxPayableAccountingCode": "Check"
                        }, 
                        "jurisdiction": "CALIFORNIA", 
                        "locationCode": "06", 
                        "memoItemId": "402890555a7e9791015a87b082d5006a", 
                        "name": "STATE TAX", 
                        "sourceTaxItemId": "402890555a7d4022015a7db254e200c3", 
                        "taxAmount": 0.02, 
                        "taxCode": "ServiceTaxCode", 
                        "taxCodeDescription": "This is tax code description!", 
                        "taxDate": "2016-06-05", 
                        "taxRate": 0.0625, 
                        "taxRateDescription": "This is tax rate description!", 
                        "taxRateType": "Percentage"
                    }
                ]
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"taxationItems\": [\n        {\n            \"exemptAmount\": 0.0, \n            \"financeInformation\": {\n                \"salesTaxPayableAccountingCode\": \"Check\"\n            }, \n            \"jurisdiction\": \"CALIFORNIA\", \n            \"locationCode\": \"06\", \n            \"memoItemId\": \"402890555a7e9791015a87b082980068\", \n            \"name\": \"STATE TAX\", \n            \"sourceTaxItemId\": \"402890555a7d4022015a7db254e200c2\", \n            \"taxAmount\": 0.01, \n            \"taxCode\": \"ServiceTaxCode\", \n            \"taxCodeDescription\": \"This is tax code description!\", \n            \"taxDate\": \"2016-06-05\", \n            \"taxRate\": 0.0625, \n            \"taxRateDescription\": \"This is tax rate description!\", \n            \"taxRateType\": \"Percentage\"\n        }, \n        {\n            \"exemptAmount\": 0.0, \n            \"financeInformation\": {\n                \"salesTaxPayableAccountingCode\": \"Check\"\n            }, \n            \"jurisdiction\": \"CALIFORNIA\", \n            \"locationCode\": \"06\", \n            \"memoItemId\": \"402890555a7e9791015a87b082d5006a\", \n            \"name\": \"STATE TAX\", \n            \"sourceTaxItemId\": \"402890555a7d4022015a7db254e200c3\", \n            \"taxAmount\": 0.02, \n            \"taxCode\": \"ServiceTaxCode\", \n            \"taxCodeDescription\": \"This is tax code description!\", \n            \"taxDate\": \"2016-06-05\", \n            \"taxRate\": 0.0625, \n            \"taxRateDescription\": \"This is tax rate description!\", \n            \"taxRateType\": \"Percentage\"\n        }\n    ]\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/debitmemos/{debitMemoId}/taxationitems")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"taxationItems\": [\n        {\n            \"exemptAmount\": 0.0, \n            \"financeInformation\": {\n                \"salesTaxPayableAccountingCode\": \"Check\"\n            }, \n            \"jurisdiction\": \"CALIFORNIA\", \n            \"locationCode\": \"06\", \n            \"memoItemId\": \"402890555a7e9791015a87b082980068\", \n            \"name\": \"STATE TAX\", \n            \"sourceTaxItemId\": \"402890555a7d4022015a7db254e200c2\", \n            \"taxAmount\": 0.01, \n            \"taxCode\": \"ServiceTaxCode\", \n            \"taxCodeDescription\": \"This is tax code description!\", \n            \"taxDate\": \"2016-06-05\", \n            \"taxRate\": 0.0625, \n            \"taxRateDescription\": \"This is tax rate description!\", \n            \"taxRateType\": \"Percentage\"\n        }, \n        {\n            \"exemptAmount\": 0.0, \n            \"financeInformation\": {\n                \"salesTaxPayableAccountingCode\": \"Check\"\n            }, \n            \"jurisdiction\": \"CALIFORNIA\", \n            \"locationCode\": \"06\", \n            \"memoItemId\": \"402890555a7e9791015a87b082d5006a\", \n            \"name\": \"STATE TAX\", \n            \"sourceTaxItemId\": \"402890555a7d4022015a7db254e200c3\", \n            \"taxAmount\": 0.02, \n            \"taxCode\": \"ServiceTaxCode\", \n            \"taxCodeDescription\": \"This is tax code description!\", \n            \"taxDate\": \"2016-06-05\", \n            \"taxRate\": 0.0625, \n            \"taxRateDescription\": \"This is tax rate description!\", \n            \"taxRateType\": \"Percentage\"\n        }\n    ]\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/debitmemos/{debitMemoId}/taxationitems", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/debitmemos/{debitMemoId}/taxationitems")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"taxationItems\": [\n        {\n            \"exemptAmount\": 0.0, \n            \"financeInformation\": {\n                \"salesTaxPayableAccountingCode\": \"Check\"\n            }, \n            \"jurisdiction\": \"CALIFORNIA\", \n            \"locationCode\": \"06\", \n            \"memoItemId\": \"402890555a7e9791015a87b082980068\", \n            \"name\": \"STATE TAX\", \n            \"sourceTaxItemId\": \"402890555a7d4022015a7db254e200c2\", \n            \"taxAmount\": 0.01, \n            \"taxCode\": \"ServiceTaxCode\", \n            \"taxCodeDescription\": \"This is tax code description!\", \n            \"taxDate\": \"2016-06-05\", \n            \"taxRate\": 0.0625, \n            \"taxRateDescription\": \"This is tax rate description!\", \n            \"taxRateType\": \"Percentage\"\n        }, \n        {\n            \"exemptAmount\": 0.0, \n            \"financeInformation\": {\n                \"salesTaxPayableAccountingCode\": \"Check\"\n            }, \n            \"jurisdiction\": \"CALIFORNIA\", \n            \"locationCode\": \"06\", \n            \"memoItemId\": \"402890555a7e9791015a87b082d5006a\", \n            \"name\": \"STATE TAX\", \n            \"sourceTaxItemId\": \"402890555a7d4022015a7db254e200c3\", \n            \"taxAmount\": 0.02, \n            \"taxCode\": \"ServiceTaxCode\", \n            \"taxCodeDescription\": \"This is tax code description!\", \n            \"taxDate\": \"2016-06-05\", \n            \"taxRate\": 0.0625, \n            \"taxRateDescription\": \"This is tax rate description!\", \n            \"taxRateType\": \"Percentage\"\n        }\n    ]\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/debitmemos/{debitMemoId}/taxationitems");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"taxationItems\": [\n        {\n            \"exemptAmount\": 0.0, \n            \"financeInformation\": {\n                \"salesTaxPayableAccountingCode\": \"Check\"\n            }, \n            \"jurisdiction\": \"CALIFORNIA\", \n            \"locationCode\": \"06\", \n            \"memoItemId\": \"402890555a7e9791015a87b082980068\", \n            \"name\": \"STATE TAX\", \n            \"sourceTaxItemId\": \"402890555a7d4022015a7db254e200c2\", \n            \"taxAmount\": 0.01, \n            \"taxCode\": \"ServiceTaxCode\", \n            \"taxCodeDescription\": \"This is tax code description!\", \n            \"taxDate\": \"2016-06-05\", \n            \"taxRate\": 0.0625, \n            \"taxRateDescription\": \"This is tax rate description!\", \n            \"taxRateType\": \"Percentage\"\n        }, \n        {\n            \"exemptAmount\": 0.0, \n            \"financeInformation\": {\n                \"salesTaxPayableAccountingCode\": \"Check\"\n            }, \n            \"jurisdiction\": \"CALIFORNIA\", \n            \"locationCode\": \"06\", \n            \"memoItemId\": \"402890555a7e9791015a87b082d5006a\", \n            \"name\": \"STATE TAX\", \n            \"sourceTaxItemId\": \"402890555a7d4022015a7db254e200c3\", \n            \"taxAmount\": 0.02, \n            \"taxCode\": \"ServiceTaxCode\", \n            \"taxCodeDescription\": \"This is tax code description!\", \n            \"taxDate\": \"2016-06-05\", \n            \"taxRate\": 0.0625, \n            \"taxRateDescription\": \"This is tax rate description!\", \n            \"taxRateType\": \"Percentage\"\n        }\n    ]\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/debitmemos/{debitMemoId}/unpost":
    put:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Unposts a debit memo that is in Posted status. If any credit memo or payment has been applied to a debit memo, you are not allowed to unpost the debit memo. After a debit memo is unposted, its status becomes Draft.

        You can unpost debit memos only if you have the [Billing permissions](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/A_Administrator_Settings/User_Roles/d_Billing_Roles#Billing_Permissions).
      operationId: PUT_UnpostDebitMemo
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a debit memo. For example, 8a8082e65b27f6c3015ba419f3c2644e.
          in: path
          name: debitMemoId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 402890555a7d4022015a7dabf5f60088
                    amount: 9
                    autoPay: true
                    balance: 9
                    beAppliedAmount: 0
                    cancelledById: null
                    cancelledOn: null
                    comment: ""
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-03-01 17:01:00
                    debitMemoDate: 2017-03-01
                    dueDate: 2017-03-31
                    id: 402890555a87d7f5015a8919e4fe002e
                    latestPDFFileId: null
                    number: DM00000002
                    postedById: 402881e522cf4f9b0122cf5d82860002
                    postedOn: 2017-03-01 18:14:29
                    reasonCode: Correcting invoice error
                    referredInvoiceId: 402890555a7d4022015a7dadb3b300a4
                    status: Draft
                    success: true
                    targetDate: null
                    taxAmount: 8
                    taxMessage: null
                    taxStatus: null
                    totalTaxExemptAmount: 0
                    transferredToAccounting: No
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 18:14:29
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETDebitMemoType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Unpost a debit memo
      tags:
        - Debit Memos
      x-code-samples:
        - lang: Curl
          source: "curl -X PUT -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" -d '{}' \"https://rest.zuora.com/v1/debitmemos/{debitMemoId}/unpost\""
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/debitmemos/{debitMemoId}/unpost');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/debitmemos/{debitMemoId}/unpost")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/debitmemos/{debitMemoId}/unpost", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/debitmemos/{debitMemoId}/unpost")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/debitmemos/{debitMemoId}/unpost");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/describe/{object}":
    get:
      description: |
        Provides a reference listing of each object that is available in your Zuora tenant.

        The information returned by this call is useful if you are using [CRUD: Create Export](https://www.zuora.com/developer/api-reference/#operation/Object_POSTExport) or the [AQuA API](https://knowledgecenter.zuora.com/DC_Developers/T_Aggregate_Query_API) to create a data source export. See [Export ZOQL](https://knowledgecenter.zuora.com/DC_Developers/M_Export_ZOQL) for more information.

        ## Response
        The response contains an XML document that lists the fields of the specified object. Each of the object's fields is represented by a `<field>` element in the XML document.
            
        Each `<field>` element contains the following elements:

        | Element      | Description                                                                                                                                                                                                                                                                                  |
        |--------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
        | `<name>`     | API name of the field.                                                                                                                                                                                                                                                                       |
        | `<label>`    | Name of the field in the Zuora user interface.                                                                                                                                                                                                                                               |
        | `<type>`     | Data type of the field. The possible data types are: `boolean`, `date`, `datetime`, `decimal`, `integer`, `picklist`, `text`, `timestamp`, and `ZOQL`. If the data type is `picklist`, the `<field>` element contains an `<options>` element that lists the possible values of the field.    |
        | `<contexts>` | Specifies the availability of the field. If the `<contexts>` element lists the `export` context, the field is available for use in data source exports.                                                                                                                                                |

        The `<field>` element contains other elements that provide legacy information about the field. This information is not directly related to the REST API.

        Response sample:
        ```xml
        <?xml version="1.0" encoding="UTF-8"?>
        <object>
          <name>ProductRatePlanCharge</name>
          <label>Product Rate Plan Charge</label>
          <fields>
            ...
            <field>
              <name>TaxMode</name>
              <label>Tax Mode</label>
              <type>picklist</type>
              <options>
                <option>TaxExclusive</option>
                <option>TaxInclusive</option>
              </options>
              <contexts>
                <context>export</context>
              </contexts>
              ...
            </field>
            ...
          </fields>
        </object>
        ```

        It is strongly recommended that your integration checks `<contexts>` elements in the response. If your integration does not check `<contexts>` elements, your integration may process fields that are not available for use in data source exports. See [Changes to the Describe API](https://knowledgecenter.zuora.com/DC_Developers/M_Export_ZOQL/Changes_to_the_Describe_API) for more information.
      operationId: GET_Describe
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            API name of an object in your Zuora tenant. For example, `InvoiceItem`. See [Zuora Object Model](https://www.zuora.com/developer/api-reference/#section/Zuora-Object-Model) for the list of valid object names.

            Depending on the features enabled in your Zuora tenant, you may not be able to list the fields of some objects.
          in: path
          name: object
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            text/xml; charset=utf-8:
              schema:
                type: string
          description: |
            Returns an XML document that lists the fields of the specified object
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            text/xml; charset=utf-8:
              schema:
                type: string
          description: |
            Returns an XML document that indicates the error
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Describe an object
      tags:
        - Describe
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/describe/{object}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/describe/{object}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/describe/{object}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/describe/{object}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/describe/{object}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/describe/{object}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  /v1/document-properties:
    post:
      description: |
        **Note:** This feature is available only if you have the Billing Document Properties Setup feature enabled. The Billing Document Properties Setup feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).

        Creates custom document properties for a billing document. For example, a document property can be a custom name used for files generated for billing documents. Billing documents include invoices, credit memos, and debit memos.

        If you want to configure custom file names for billing documents created through API operations, you have to call this operation before posting the billing documents. 

        **Note:** You can create document properties for credit and debit memos only if you have the Invoice Settlement feature enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
      operationId: POST_DocumentProperties
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTDocumentPropertiesType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    customFileName: testCreditMemo
                    documentId: 40288af1614cee0b01614cf2ec25000a
                    documentType: CreditMemo
                    id: 402892c74c9193cd014c96bbe7c101f9
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETDocumentPropertiesResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Create document properties
      tags:
        - Document Properties
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "customFileName": "testCreditMemo", 
                "documentId": "40288af1614cee0b01614cf2ec25000a", 
                "documentType": "CreditMemo"
            }' "https://rest.zuora.com/v1/document-properties"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/document-properties');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "customFileName": "testCreditMemo", 
                "documentId": "40288af1614cee0b01614cf2ec25000a", 
                "documentType": "CreditMemo"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"customFileName\": \"testCreditMemo\", \n    \"documentId\": \"40288af1614cee0b01614cf2ec25000a\", \n    \"documentType\": \"CreditMemo\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/document-properties")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"customFileName\": \"testCreditMemo\", \n    \"documentId\": \"40288af1614cee0b01614cf2ec25000a\", \n    \"documentType\": \"CreditMemo\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/document-properties", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/document-properties")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"customFileName\": \"testCreditMemo\", \n    \"documentId\": \"40288af1614cee0b01614cf2ec25000a\", \n    \"documentType\": \"CreditMemo\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/document-properties");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"customFileName\": \"testCreditMemo\", \n    \"documentId\": \"40288af1614cee0b01614cf2ec25000a\", \n    \"documentType\": \"CreditMemo\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/document-properties/{documentPropertiesId}":
    delete:
      description: |
        **Note:** This feature is available only if you have the Billing Document Properties Setup feature enabled. The Billing Document Properties Setup feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).

        Deletes document properties with a specific ID for a billing document. Billing documents include invoices, credit memos, and debit memos.

        **Note:** You can delete document properties for credit and debit memos only if you have the Invoice Settlement feature enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
      operationId: DELETE_DocumentProperties
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: |
            The unique ID of document properties. For example, 402892c74c9193cd014c96bbe7c101f9.
          in: path
          name: documentPropertiesId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Delete document properties
      tags:
        - Document Properties
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/document-properties/{documentPropertiesId}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/document-properties/{documentPropertiesId}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/document-properties/{documentPropertiesId}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/v1/document-properties/{documentPropertiesId}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/document-properties/{documentPropertiesId}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/document-properties/{documentPropertiesId}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: |
        **Note:** This feature is available only if you have the Billing Document Properties Setup feature enabled. The Billing Document Properties Setup feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).

        Updates document properties with a specific ID for a billing document. Billing documents include invoices, credit memos, and debit memos.

        **Note:** You can update document properties for credit and debit memos only if you have the Invoice Settlement feature enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
      operationId: PUT_DocumentProperties
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: |
            The unique ID of document properties to be updated. For example, 402892c74c9193cd014c96bbe7c101f9.
          in: path
          name: documentPropertiesId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTDocumentPropertiesType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    customFileName: customPDFName
                    documentId: 40288af1614cee0b01614cf2ec25000a
                    documentType: CreditMemo
                    id: 402892c74c9193cd014c96bbe7c101f9
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETDocumentPropertiesResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Update document properties
      tags:
        - Document Properties
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "customFileName": "exampleCreditMemo"
            }' "https://rest.zuora.com/v1/document-properties/{documentPropertiesId}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/document-properties/{documentPropertiesId}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "customFileName": "exampleCreditMemo"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"customFileName\": \"exampleCreditMemo\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/document-properties/{documentPropertiesId}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"customFileName\": \"exampleCreditMemo\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/document-properties/{documentPropertiesId}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/document-properties/{documentPropertiesId}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"customFileName\": \"exampleCreditMemo\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/document-properties/{documentPropertiesId}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"customFileName\": \"exampleCreditMemo\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/document-properties/{documentType}/{documentId}":
    get:
      description: |
        **Note:** This feature is available only if you have the Billing Document Properties Setup feature enabled. The Billing Document Properties Setup feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).

         Retrieve information about document properties of a billing document. Billing documents include invoices, credit memos, and debit memos.
         
         **Note:** You can retrieve information about document properties of credit and debit memos only if you have the Invoice Settlement feature enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
      operationId: GET_DocumentProperies
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: |
            The type of the billing document. 
          in: path
          name: documentType
          required: true
          schema:
            enum:
              - Invoice
              - CreditMemo
              - DebitMemo
            type: string
        - description: |
            The unique ID of document properties to be retrieved. For example, 402892c74c9193cd014c96bbe7c101f9.
          in: path
          name: documentId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    customFileName: customPDFName
                    documentId: 40288af1614cee0b01614cf2ec25000a
                    documentType: CreditMemo
                    id: 402892c74c9193cd014c96bbe7c101f9
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETDocumentPropertiesResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List all properties of a billing document
      tags:
        - Document Properties
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/document-properties/{documentType}/{documentId}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/document-properties/{documentType}/{documentId}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/document-properties/{documentType}/{documentId}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/document-properties/{documentType}/{documentId}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/document-properties/{documentType}/{documentId}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/document-properties/{documentType}/{documentId}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  /v1/entities:
    get:
      description: |
        **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](http://support.zuora.com/). 


        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.
      operationId: GET_Entities
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            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.
          in: query
          name: provisioned
          required: false
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    entities:
                      - displayName: Acme Corporation
                        id: 8a808255557baba1015580e12fa5083a
                        locale: en_US
                        name: Acme Corporation
                        parentId: null
                        status: Provisioned
                        tenantId: "6398"
                        timezone: GMT
                      - displayName: Acme-Americas
                        id: 8a80825555a3c7a10155b460f53858e6
                        locale: en_US
                        name: Acme-Americas
                        parentId: 8a808255557baba1015580e12fa5083a
                        status: Provisioned
                        tenantId: "6398"
                        timezone: America/Los_Angeles
                      - displayName: Acme-US
                        id: 8a80825555a3c7a10155b46120d058e7
                        locale: en_US
                        name: Acme-US
                        parentId: 8a80825555a3c7a10155b460f53858e6
                        status: Provisioned
                        tenantId: "6398"
                        timezone: America/Los_Angeles
                      - displayName: Acme-Europe
                        id: 8a80825556ff28a4015708ba29312ecc
                        locale: en_US
                        name: Acme-Europe
                        parentId: 8a808255557baba1015580e12fa5083a
                        status: Provisioned
                        tenantId: "6398"
                        timezone: Europe/Paris
                      - displayName: Acme-UK
                        id: 8a80825556ff28a4015708bac1d8305f
                        locale: en_US
                        name: Acme-UK
                        parentId: 8a80825556ff28a4015708ba29312ecc
                        status: Unprovisioned
                        tenantId: "6398"
                        timezone: Europe/London
                      - displayName: Acme-France
                        id: 8a80825556ff28a4015708bb21963060
                        locale: en_US
                        name: Acme-France
                        parentId: 8a80825556ff28a4015708ba29312ecc
                        status: Unprovisioned
                        tenantId: "6398"
                        timezone: Europe/Paris
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETEntitiesResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "Multi-entity: List entities"
      tags:
        - Entities
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/entities"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/entities');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/entities")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/entities", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/entities")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/entities");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    post:
      description: |
        **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](http://support.zuora.com/). 

        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.
      operationId: POST_Entities
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/CreateEntityType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    displayName: Acme-Asia
                    id: 8a80825556ff28a4015709096c5d6f5d
                    locale: zh_CN
                    name: Acme-Asia
                    parentId: 8a808255557baba1015580e12fa5083a
                    status: Unprovisioned
                    success: true
                    tenantId: "6398"
                    timezone: Asia/Harbin
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CreateEntityResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "Multi-entity: Create an entity"
      tags:
        - Entities
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "displayName": "Acme-Asia", 
                "locale": "zh_CN", 
                "name": "Acme-Asia", 
                "parentId": "8a808255557baba1015580e12fa5083a", 
                "timezone": "Asia/Harbin"
            }' "https://rest.zuora.com/v1/entities"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/entities');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "displayName": "Acme-Asia", 
                "locale": "zh_CN", 
                "name": "Acme-Asia", 
                "parentId": "8a808255557baba1015580e12fa5083a", 
                "timezone": "Asia/Harbin"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"displayName\": \"Acme-Asia\", \n    \"locale\": \"zh_CN\", \n    \"name\": \"Acme-Asia\", \n    \"parentId\": \"8a808255557baba1015580e12fa5083a\", \n    \"timezone\": \"Asia/Harbin\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/entities")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"displayName\": \"Acme-Asia\", \n    \"locale\": \"zh_CN\", \n    \"name\": \"Acme-Asia\", \n    \"parentId\": \"8a808255557baba1015580e12fa5083a\", \n    \"timezone\": \"Asia/Harbin\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/entities", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/entities")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"displayName\": \"Acme-Asia\", \n    \"locale\": \"zh_CN\", \n    \"name\": \"Acme-Asia\", \n    \"parentId\": \"8a808255557baba1015580e12fa5083a\", \n    \"timezone\": \"Asia/Harbin\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/entities");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"displayName\": \"Acme-Asia\", \n    \"locale\": \"zh_CN\", \n    \"name\": \"Acme-Asia\", \n    \"parentId\": \"8a808255557baba1015580e12fa5083a\", \n    \"timezone\": \"Asia/Harbin\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/entities/{id}":
    delete:
      description: |
        **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](http://support.zuora.com/). 

        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.   
      operationId: DELETE_Entities
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: Specify the Id of the entity that you want to delete. You can get the entity Id from the GET Entities call.
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/DELETEntityResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "Multi-entity: Delete an entity"
      tags:
        - Entities
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/entities/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/entities/{id}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/entities/{id}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/v1/entities/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/entities/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/entities/{id}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      description: |
        **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](http://support.zuora.com/). 

        Retrieves detailed information about a specified entity.

        ## User Access Permission
        You can make the call as any entity user.     
      operationId: GET_EntityById
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: Specify the Id of the entity that you want to retrieve. You can get the entity Id from the GET Entities call.
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    displayName: Acme-Americas
                    id: 8a80825555a3c7a10155b460f53858e6
                    locale: en_US
                    name: Acme-Americas
                    parentId: 8a808255557baba1015580e12fa5083a
                    status: Provisioned
                    success: true
                    tenantId: "6398"
                    timezone: America/Los_Angeles
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETEntitiesResponseTypeWithId"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "Multi-entity: Retrieve an entity"
      tags:
        - Entities
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/entities/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/entities/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/entities/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/entities/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/entities/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/entities/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: |
        **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](http://support.zuora.com/). 

        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.
      operationId: PUT_Entities
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: The Id of the entity that you want to edit. You can get the entity Id from the GET Entities call.
          in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/UpdateEntityType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/UpdateEntityResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "Multi-entity: Update an entity"
      tags:
        - Entities
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "displayName": "Acme-Italy", 
                "locale": "en_GB", 
                "name": "Acme-Italy", 
                "timezone": "Europe/Rome"
            }' "https://rest.zuora.com/v1/entities/{id}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/entities/{id}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "displayName": "Acme-Italy", 
                "locale": "en_GB", 
                "name": "Acme-Italy", 
                "timezone": "Europe/Rome"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"displayName\": \"Acme-Italy\", \n    \"locale\": \"en_GB\", \n    \"name\": \"Acme-Italy\", \n    \"timezone\": \"Europe/Rome\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/entities/{id}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"displayName\": \"Acme-Italy\", \n    \"locale\": \"en_GB\", \n    \"name\": \"Acme-Italy\", \n    \"timezone\": \"Europe/Rome\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/entities/{id}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/entities/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"displayName\": \"Acme-Italy\", \n    \"locale\": \"en_GB\", \n    \"name\": \"Acme-Italy\", \n    \"timezone\": \"Europe/Rome\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/entities/{id}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"displayName\": \"Acme-Italy\", \n    \"locale\": \"en_GB\", \n    \"name\": \"Acme-Italy\", \n    \"timezone\": \"Europe/Rome\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/entities/{id}/provision":
    put:
      description: |
        **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](http://support.zuora.com/). 

        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. 
      operationId: PUT_ProvisionEntity
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: Specify the Id of the entity that you want to provision.  You can get the entity Id from the GET Entities call.
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProvisionEntityResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "Multi-entity: Provision an entity"
      tags:
        - Entities
      x-code-samples:
        - lang: Curl
          source: "curl -X PUT -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" -d '{}' \"https://rest.zuora.com/v1/entities/{id}/provision\""
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/entities/{id}/provision');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/entities/{id}/provision")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/entities/{id}/provision", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/entities/{id}/provision")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/entities/{id}/provision");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/entity-connections:
    get:
      description: |
        **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](http://support.zuora.com/).

        Retrieves information about certain connections for a specified entity. You can specify the entity to retrieve in the `Zuora-Entity-Ids` request header.

        You can retrieve:
         - Inbound connections
         - Outbound connections
         - Both inbound and outbound connections

        ## User Access Permission
        You can make the call as any entity user. 
      operationId: GET_EntityConnections
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize_entityConnection"
        - description: |
            Specifies whether to retrieve inbound or outbound connections for an entity.

            Possible values:
             - `inbound`: All the incoming connections to the entity.
             - `outbound`: All the outgoing connections from the entity.

            If you do not specify this field in the request, both the inbound and outbound connections are returned.
          in: query
          name: type
          required: false
          schema:
            enum:
              - inbound
              - outbound
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    entityConnections:
                      - id: 8a80825555a3c7a10155b54a63821c0d
                        sourceEntityId: 8a80825555a3c7a10155b46120d058e7
                        status: Connected
                        targetEntityId: 8a808255557baba1015580e12fa5083a
                      - id: 8a80825555a3c7a10155b466736c5c3f
                        sourceEntityId: 8a808255557baba1015580e12fa5083a
                        status: Connected
                        targetEntityId: 8a80825555a3c7a10155b460f53858e6
                      - id: 8a808255575bdae401576a914a140420
                        sourceEntityId: 8a808255557baba1015580e12fa5083a
                        status: Connected
                        targetEntityId: 8a80825556ff28a4015708ba29312ecc
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETEntityConnectionsResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "Multi-entity: List connections"
      tags:
        - Entity Connections
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/entity-connections"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/entity-connections');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/entity-connections")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/entity-connections", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/entity-connections")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/entity-connections");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    post:
      description: |
        **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](http://support.zuora.com/).

        Initiates a connection request from a source entity to a target entity.

        ## User Access Permission
        You must make the call as a source entity administrator. Also, this administrator must have permission to access to the target entity.
      operationId: POST_EntityConnections
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTEntityConnectionsType"
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    id: 8a808255575bdae401576a914a140420
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTEntityConnectionsResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "Multi-entity: Initiate a connection request"
      tags:
        - Entity Connections
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "targetEntityId": "8a80825556ff28a4015708ba29312ecc"
            }' "https://rest.zuora.com/v1/entity-connections"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/entity-connections');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "targetEntityId": "8a80825556ff28a4015708ba29312ecc"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"targetEntityId\": \"8a80825556ff28a4015708ba29312ecc\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/entity-connections")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"targetEntityId\": \"8a80825556ff28a4015708ba29312ecc\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/entity-connections", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/entity-connections")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"targetEntityId\": \"8a80825556ff28a4015708ba29312ecc\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/entity-connections");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"targetEntityId\": \"8a80825556ff28a4015708ba29312ecc\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/entity-connections/{connection-id}/accept":
    put:
      description: |
        **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](http://support.zuora.com/).

        Accepts a connection request.

        ## User Access Permission
        You must make the call as an entity administrator to accept a connection request.
      operationId: PUT_EntityConnectionsAccept
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The ID of the connection that you want to accept.
          in: path
          name: connection-id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PUTEntityConnectionsAcceptResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "Multi-entity: Accept a connection request"
      tags:
        - Entity Connections
      x-code-samples:
        - lang: Curl
          source: "curl -X PUT -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" -d '{}' \"https://rest.zuora.com/v1/entity-connections/{connection-id}/accept\""
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/entity-connections/{connection-id}/accept');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/entity-connections/{connection-id}/accept")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/entity-connections/{connection-id}/accept", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/entity-connections/{connection-id}/accept")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/entity-connections/{connection-id}/accept");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/entity-connections/{connection-id}/deny":
    put:
      description: |
        **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](http://support.zuora.com/).

        Denies a connection request.

        ## User Access Permission
        You must make the call as an entity administrator to deny a connection request.
      operationId: PUT_EntityConnectionsDeny
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The ID of the connection that you want to deny.
          in: path
          name: connection-id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PUTEntityConnectionsDenyResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "Multi-entity: Deny a connection request"
      tags:
        - Entity Connections
      x-code-samples:
        - lang: Curl
          source: "curl -X PUT -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" -d '{}' \"https://rest.zuora.com/v1/entity-connections/{connection-id}/deny\""
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/entity-connections/{connection-id}/deny');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/entity-connections/{connection-id}/deny")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/entity-connections/{connection-id}/deny", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/entity-connections/{connection-id}/deny")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/entity-connections/{connection-id}/deny");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/entity-connections/{connection-id}/disconnect":
    put:
      description: |
        **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](http://support.zuora.com/).

        Disconnects an established connection. If you have shared objects from a global entity to a target entity, disconnecting the connection will break the mapping relationship between these entities and cannot be recovered later.

        ## User Access Permission
        You must make the call as an administrator of the target entity or source entity.
      operationId: PUT_EntityConnectionsDisconnect
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The ID of the connection that you want to disconnect.
          in: path
          name: connection-id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PUTEntityConnectionsDisconnectResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "Multi-entity: Disconnect a connection"
      tags:
        - Entity Connections
      x-code-samples:
        - lang: Curl
          source: "curl -X PUT -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" -d '{}' \"https://rest.zuora.com/v1/entity-connections/{connection-id}/disconnect\""
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/entity-connections/{connection-id}/disconnect');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/entity-connections/{connection-id}/disconnect")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/entity-connections/{connection-id}/disconnect", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/entity-connections/{connection-id}/disconnect")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/entity-connections/{connection-id}/disconnect");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/files/{file-id}":
    get:
      description: |
        Retrieve files such as export results, invoices, and accounting period reports.

        The response content type depends on the type of file that you retrieve.
        For example, if you retrieve an invoice PDF, the value of the `Content-Type`
        header in the response is `application/pdf;charset=UTF-8`.

        Other content types include:

        - `text/csv` for CSV files
        - `application/msword` for Microsoft Word files
        - `application/vnd.ms-excel` and `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`
          for Microsoft Excel files (*.xls* and *.xlsx* respectively)
        - `application/zip` and `application/x-gzip` for ZIP and Gzip files respectively
        - `text/html` for HTML files
        - `text/plain` for text files

        The response always contains character encoding information in the `Content-Type` header.
        For example, `Content-Type: application/zip;charset=UTF-8`.

        **Note:** The maximum file size is 2,047 MB. If you have a data request that exceeds this limit, Zuora returns the following 403 response: `<security:max-object-size>2047MB</security:max-object-size>`. Submit a request at <a href="http://support.zuora.com/" target="_blank">Zuora Global Support</a> to determine if large file optimization is an option for you.
      operationId: GET_Files
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The Zuora ID of the file to retrieve.
          in: path
          name: file-id
          required: true
          schema:
            type: string
      responses:
        "200":
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a file
      tags:
        - Files
      x-code-samples:
        - lang: Curl
          source: |
            curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Accept: application/pdf" "https://rest.zuora.com/v1/files/2c92c08c55534cf00155581fb474314d" -o invoice.pdf
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/files/{file-id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/files/{file-id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/files/{file-id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/files/{file-id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/files/{file-id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/gateway-settlement/payments/{payment-id}/chargeback":
    post:
      description: |
        Sets the Payment status to "Reversed", creates a refund for the amount specified in the request, and returns the Refund object as response.
      operationId: POST_ReversePayment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: Unique ID of the payment.
          in: path
          name: payment-id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTReversePaymentRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 2c90c8e26a6a5271016a6fda7f922c10
                    amount: 121
                    cancelledOn: null
                    comment: null
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2019-05-06 11:57:38
                    creditMemoId: null
                    financeInformation: null
                    gatewayId: null
                    gatewayResponse: Insufficient funds latest msg 1
                    gatewayResponseCode: "0231"
                    gatewayState: Settled
                    id: 2c90c8e26a6a5271016a8e8232892e60
                    markedForSubmissionOn: null
                    methodType: CreditCard
                    number: R-00000001
                    paymentId: 2c90c8e26a6a5271016a8e80de242e56
                    paymentMethodId: 2c90c8e26a6a5271016a749380452cfc
                    paymentMethodSnapshotId: null
                    reasonCode: Payment Reversal
                    referenceId: "825522036728874689"
                    refundDate: 2019-05-06
                    refundTransactionTime: null
                    secondRefundReferenceId: "825522036690700110"
                    settledOn: 2019-05-07 20:56:32
                    softDescriptor: null
                    softDescriptorPhone: null
                    status: Processed
                    submittedOn: null
                    success: true
                    type: External
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2019-05-06 11:57:38
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTReversePaymentResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Reverse a payment
      tags:
        - Payment Gateway Reconciliation
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "amount": 100, 
                "gatewayResponse": "Insufficient funds", 
                "gatewayResponseCode": "023", 
                "referenceId": "825522036728874689", 
                "secondReferenceId": "825522036690700110", 
                "settledOn": "2019-05-07 20:56:32.981"
            }' "https://rest.zuora.com/v1/gateway-settlement/payments/{payment-id}/chargeback"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/gateway-settlement/payments/{payment-id}/chargeback');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "amount": 100, 
                "gatewayResponse": "Insufficient funds", 
                "gatewayResponseCode": "023", 
                "referenceId": "825522036728874689", 
                "secondReferenceId": "825522036690700110", 
                "settledOn": "2019-05-07 20:56:32.981"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"amount\": 100, \n    \"gatewayResponse\": \"Insufficient funds\", \n    \"gatewayResponseCode\": \"023\", \n    \"referenceId\": \"825522036728874689\", \n    \"secondReferenceId\": \"825522036690700110\", \n    \"settledOn\": \"2019-05-07 20:56:32.981\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/gateway-settlement/payments/{payment-id}/chargeback")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"amount\": 100, \n    \"gatewayResponse\": \"Insufficient funds\", \n    \"gatewayResponseCode\": \"023\", \n    \"referenceId\": \"825522036728874689\", \n    \"secondReferenceId\": \"825522036690700110\", \n    \"settledOn\": \"2019-05-07 20:56:32.981\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/gateway-settlement/payments/{payment-id}/chargeback", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/gateway-settlement/payments/{payment-id}/chargeback")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"amount\": 100, \n    \"gatewayResponse\": \"Insufficient funds\", \n    \"gatewayResponseCode\": \"023\", \n    \"referenceId\": \"825522036728874689\", \n    \"secondReferenceId\": \"825522036690700110\", \n    \"settledOn\": \"2019-05-07 20:56:32.981\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/gateway-settlement/payments/{payment-id}/chargeback");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"amount\": 100, \n    \"gatewayResponse\": \"Insufficient funds\", \n    \"gatewayResponseCode\": \"023\", \n    \"referenceId\": \"825522036728874689\", \n    \"secondReferenceId\": \"825522036690700110\", \n    \"settledOn\": \"2019-05-07 20:56:32.981\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/gateway-settlement/payments/{payment-id}/reject":
    post:
      description: |
        Sets the Payment status to "Rejected", creates a refund for the payment amount, and returns the Refund object as response.
      operationId: POST_RejectPayment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: Unique ID of the payment.
          in: path
          name: payment-id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTRejectPaymentRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 2c90c8e26a6a5271016a6fda7f922c10
                    amount: 121
                    cancelledOn: null
                    comment: null
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2019-05-06 11:57:38
                    creditMemoId: null
                    financeInformation: null
                    gatewayId: null
                    gatewayResponse: Insufficient funds latest msg 1
                    gatewayResponseCode: "0231"
                    gatewayState: Settled
                    id: 2c90c8e26a6a5271016a8e8232892e60
                    markedForSubmissionOn: null
                    methodType: CreditCard
                    number: R-00000001
                    paymentId: 2c90c8e26a6a5271016a8e80de242e56
                    paymentMethodId: 2c90c8e26a6a5271016a749380452cfc
                    paymentMethodSnapshotId: null
                    reasonCode: Payment Rejection
                    referenceId: "825522036728874689"
                    refundDate: 2019-05-06
                    refundTransactionTime: null
                    secondRefundReferenceId: "825522036690700110"
                    settledOn: 2019-05-07 20:56:32
                    softDescriptor: null
                    softDescriptorPhone: null
                    status: Processed
                    submittedOn: null
                    success: true
                    type: External
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2019-05-06 11:57:38
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTRejectPaymentResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Reject a payment
      tags:
        - Payment Gateway Reconciliation
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "gatewayResponse": "Insufficient funds", 
                "gatewayResponseCode": "023", 
                "referenceId": "825522036728874689", 
                "secondReferenceId": "825522036690700110", 
                "settledOn": "2019-05-07 20:56:32.981"
            }' "https://rest.zuora.com/v1/gateway-settlement/payments/{payment-id}/reject"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/gateway-settlement/payments/{payment-id}/reject');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "gatewayResponse": "Insufficient funds", 
                "gatewayResponseCode": "023", 
                "referenceId": "825522036728874689", 
                "secondReferenceId": "825522036690700110", 
                "settledOn": "2019-05-07 20:56:32.981"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"gatewayResponse\": \"Insufficient funds\", \n    \"gatewayResponseCode\": \"023\", \n    \"referenceId\": \"825522036728874689\", \n    \"secondReferenceId\": \"825522036690700110\", \n    \"settledOn\": \"2019-05-07 20:56:32.981\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/gateway-settlement/payments/{payment-id}/reject")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"gatewayResponse\": \"Insufficient funds\", \n    \"gatewayResponseCode\": \"023\", \n    \"referenceId\": \"825522036728874689\", \n    \"secondReferenceId\": \"825522036690700110\", \n    \"settledOn\": \"2019-05-07 20:56:32.981\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/gateway-settlement/payments/{payment-id}/reject", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/gateway-settlement/payments/{payment-id}/reject")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"gatewayResponse\": \"Insufficient funds\", \n    \"gatewayResponseCode\": \"023\", \n    \"referenceId\": \"825522036728874689\", \n    \"secondReferenceId\": \"825522036690700110\", \n    \"settledOn\": \"2019-05-07 20:56:32.981\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/gateway-settlement/payments/{payment-id}/reject");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"gatewayResponse\": \"Insufficient funds\", \n    \"gatewayResponseCode\": \"023\", \n    \"referenceId\": \"825522036728874689\", \n    \"secondReferenceId\": \"825522036690700110\", \n    \"settledOn\": \"2019-05-07 20:56:32.981\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/gateway-settlement/payments/{payment-id}/settle":
    post:
      description: |
        Sets the Payment status to "Settled" and returns the Payment object as response.
      operationId: POST_SettlePayment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: Unique ID of the payment.
          in: path
          name: payment-id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTSettlePaymentRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 2c90c8e26a6a5271016a6fda7f922c10
                    amount: 332
                    appliedAmount: 0
                    authTransactionId: null
                    bankIdentificationNumber: "411111"
                    cancelledOn: null
                    comment: ""
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2019-05-06 11:47:17
                    creditBalanceAmount: 0
                    currency: USD
                    effectiveDate: 2019-05-06
                    financeInformation: null
                    gatewayId: 2c90c8e26a6a5271016a74321ba82ce0
                    gatewayOrderId: null
                    gatewayResponse: Approved
                    gatewayResponseCode: "100"
                    gatewayState: Settled
                    id: 2c90c8e26a6a5271016a8e78ba502e4b
                    markedForSubmissionOn: null
                    number: P-00000017
                    paymentMethodId: 2c90c8e26a6a5271016a6fdf9b5f2caa
                    paymentMethodSnapshotId: 2c90c8e26a6a5271016a8e78ba4a2e4a
                    referenceId: "5571684390686343603009"
                    refundAmount: 0
                    secondPaymentReferenceId: "549536"
                    settledOn: 2019-04-06 23:00:00
                    softDescriptor: null
                    softDescriptorPhone: null
                    status: Processed
                    submittedOn: 2019-05-06 11:47:19
                    success: true
                    type: Electronic
                    unappliedAmount: 0
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2019-05-06 12:11:05
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTSettlePaymentResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Settle a payment
      tags:
        - Payment Gateway Reconciliation
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "settledOn": "2019-05-07 20:56:32.981"
            }' "https://rest.zuora.com/v1/gateway-settlement/payments/{payment-id}/settle"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/gateway-settlement/payments/{payment-id}/settle');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "settledOn": "2019-05-07 20:56:32.981"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"settledOn\": \"2019-05-07 20:56:32.981\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/gateway-settlement/payments/{payment-id}/settle")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"settledOn\": \"2019-05-07 20:56:32.981\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/gateway-settlement/payments/{payment-id}/settle", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/gateway-settlement/payments/{payment-id}/settle")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"settledOn\": \"2019-05-07 20:56:32.981\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/gateway-settlement/payments/{payment-id}/settle");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"settledOn\": \"2019-05-07 20:56:32.981\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/hmac-signatures:
    post:
      description: |
        This REST API reference describes how to return unique signature and token values that used to process a CORS enabled API call.
      operationId: POST_HMACSignatures
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTHMACSignatureType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    signature: ZmI0ZjE2ZTMxMWY1YjA0ZTc4MTg1ZDhlYWRkMTEwNDE3M2RiMzNiNQ==
                    success: true
                    token: gCH6gYqQffQCsFKSLuxyagXsuXcIK0uf
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTHMACSignatureResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Generate an HMAC signature
      tags:
        - HMAC Signatures
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "accountKey": "A00000001", 
                "method": "POST", 
                "uri": "https://rest.zuora.com/v1/payment-methods/credit-cards"
            }' "https://rest.zuora.com/v1/hmac-signatures"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/hmac-signatures');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "accountKey": "A00000001", 
                "method": "POST", 
                "uri": "https://rest.zuora.com/v1/payment-methods/credit-cards"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"accountKey\": \"A00000001\", \n    \"method\": \"POST\", \n    \"uri\": \"https://rest.zuora.com/v1/payment-methods/credit-cards\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/hmac-signatures")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"accountKey\": \"A00000001\", \n    \"method\": \"POST\", \n    \"uri\": \"https://rest.zuora.com/v1/payment-methods/credit-cards\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/hmac-signatures", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/hmac-signatures")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"accountKey\": \"A00000001\", \n    \"method\": \"POST\", \n    \"uri\": \"https://rest.zuora.com/v1/payment-methods/credit-cards\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/hmac-signatures");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"accountKey\": \"A00000001\", \n    \"method\": \"POST\", \n    \"uri\": \"https://rest.zuora.com/v1/payment-methods/credit-cards\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/hostedpages:
    get:
      description: |
        Returns the Payment Pages configuration metadata,
        specifically, page ID, page version, payment method type.

        The following are the version-specific and general REST requests for Payment Pages:

        * The request for Payment Pages 1.0 configuration information: `GET <BaseURL>/hostedpages?version=1`
        * The request for Payment Pages 2.0 configuration information: `GET <BaseURL>/hostedpages?version=2`
        * The request for all versions of Payment Pages configuration information: `GET <BaseURL>/hostedpages`

        ## Notes
        If you do not have the corresponding tenant setting enabled, e.g., the request `version` parameter set to 2 with the Payment Pages 2.0 setting disabled, you will receive an error.
      operationId: Get_HostedPages
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            Version of the Payment Pages for which you want to retrieve the configuration information. Specify 1 for Payment Pages 1.0 or 2 for Payment Pages 2.0. If omitted, information for all versions of Payment Pages are returned.

            The response also depends on your tenant settings for Payment Pages 1.0 and Payment Pages 2.0. For example, if only the tenant setting for Payment Pages 2.0 is enabled, the response will only contain information for Payment Pages 2.0 forms even when this parameter is omitted.
          in: query
          name: versionNumber
          required: false
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    hostedpages:
                      - pageId: 8a85858f49a3f2230149abccaa2e004a
                        pageType: ACH
                        pageVersion: 2
                      - pageId: 8a85858f49a3f2230149abcd99090057
                        pageType: Bank Transfer
                        pageVersion: 2
                      - pageId: 8a85858f49a3f2230149a71083d40019
                        pageType: Credit Card
                        pageVersion: 2
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GetHostedPagesType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List hosted pages
      tags:
        - Hosted Pages
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/hostedpages"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/hostedpages');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/hostedpages")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/hostedpages", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/hostedpages")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/hostedpages");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  /v1/invoices:
    post:
      description: |
        **Note:** This operation is only available if you have Unified Invoicing enabled. The Unified Invoicing feature is in the Early Adopter phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. If you want to join this early adopter program, submit a request at [Zuora Global Support](http://support.zuora.com/).

        Creates a standalone invoice for selling physical goods, services or other items on a non-recurring basis to your subscription customers.

        To use this operation, you must have the Create Standalone Invoice and Modify Invoice user permissions. See [Billing Roles](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/A_Administrator_Settings/User_Roles/d_Billing_Roles) for more information.
      operationId: POST_StandaloneInvoice
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PostInvoiceType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 2c9890247abd5bcd017ac878dbf80002
                    amount: 309
                    amountWithoutTax: 300
                    autoPay: false
                    comments: comments
                    dueDate: 2020-03-02
                    id: 2c9890247abd5bcd017ac87ddf8f0011
                    invoiceDate: 2020-02-01
                    invoiceNumber: INV00000003
                    status: Draft
                    success: true
                    taxAmount: 9
                    taxExemptAmount: 0
                    transferredToAccounting: null
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PostInvoiceResponse"
          description: ""
          headers:
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Create a standalone invoice
      tags:
        - Invoices
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "accountId": "2c9890207863df710178642433c407a5", 
                "autoPay": false, 
                "comments": "comments", 
                "invoiceDate": "2020-02-01", 
                "invoiceItems": [
                    {
                        "amount": 300, 
                        "bookingReference": "bookingReference", 
                        "chargeDate": 1580544000000, 
                        "chargeName": "charge with tax amount 9", 
                        "description": "description", 
                        "quantity": 2, 
                        "serviceEndDate": "2020-02-10", 
                        "serviceStartDate": "2020-02-01", 
                        "taxItems": [
                            {
                                "exemptAmount": 0, 
                                "jurisdiction": "juristiction", 
                                "locationCode": "locationCode", 
                                "name": "country tax", 
                                "taxAmount": 9, 
                                "taxCode": "tax code", 
                                "taxCodeDescription": "tax code description", 
                                "taxDate": "2020-02-01", 
                                "taxMode": "TaxExclusive", 
                                "taxRate": 0.03, 
                                "taxRateDescription": "tax rate description", 
                                "taxRateType": "Percentage"
                            }
                        ]
                    }
                ]
            }' "https://rest.zuora.com/v1/invoices"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/invoices');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "accountId": "2c9890207863df710178642433c407a5", 
                "autoPay": false, 
                "comments": "comments", 
                "invoiceDate": "2020-02-01", 
                "invoiceItems": [
                    {
                        "amount": 300, 
                        "bookingReference": "bookingReference", 
                        "chargeDate": 1580544000000, 
                        "chargeName": "charge with tax amount 9", 
                        "description": "description", 
                        "quantity": 2, 
                        "serviceEndDate": "2020-02-10", 
                        "serviceStartDate": "2020-02-01", 
                        "taxItems": [
                            {
                                "exemptAmount": 0, 
                                "jurisdiction": "juristiction", 
                                "locationCode": "locationCode", 
                                "name": "country tax", 
                                "taxAmount": 9, 
                                "taxCode": "tax code", 
                                "taxCodeDescription": "tax code description", 
                                "taxDate": "2020-02-01", 
                                "taxMode": "TaxExclusive", 
                                "taxRate": 0.03, 
                                "taxRateDescription": "tax rate description", 
                                "taxRateType": "Percentage"
                            }
                        ]
                    }
                ]
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"accountId\": \"2c9890207863df710178642433c407a5\", \n    \"autoPay\": false, \n    \"comments\": \"comments\", \n    \"invoiceDate\": \"2020-02-01\", \n    \"invoiceItems\": [\n        {\n            \"amount\": 300, \n            \"bookingReference\": \"bookingReference\", \n            \"chargeDate\": 1580544000000, \n            \"chargeName\": \"charge with tax amount 9\", \n            \"description\": \"description\", \n            \"quantity\": 2, \n            \"serviceEndDate\": \"2020-02-10\", \n            \"serviceStartDate\": \"2020-02-01\", \n            \"taxItems\": [\n                {\n                    \"exemptAmount\": 0, \n                    \"jurisdiction\": \"juristiction\", \n                    \"locationCode\": \"locationCode\", \n                    \"name\": \"country tax\", \n                    \"taxAmount\": 9, \n                    \"taxCode\": \"tax code\", \n                    \"taxCodeDescription\": \"tax code description\", \n                    \"taxDate\": \"2020-02-01\", \n                    \"taxMode\": \"TaxExclusive\", \n                    \"taxRate\": 0.03, \n                    \"taxRateDescription\": \"tax rate description\", \n                    \"taxRateType\": \"Percentage\"\n                }\n            ]\n        }\n    ]\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/invoices")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"accountId\": \"2c9890207863df710178642433c407a5\", \n    \"autoPay\": false, \n    \"comments\": \"comments\", \n    \"invoiceDate\": \"2020-02-01\", \n    \"invoiceItems\": [\n        {\n            \"amount\": 300, \n            \"bookingReference\": \"bookingReference\", \n            \"chargeDate\": 1580544000000, \n            \"chargeName\": \"charge with tax amount 9\", \n            \"description\": \"description\", \n            \"quantity\": 2, \n            \"serviceEndDate\": \"2020-02-10\", \n            \"serviceStartDate\": \"2020-02-01\", \n            \"taxItems\": [\n                {\n                    \"exemptAmount\": 0, \n                    \"jurisdiction\": \"juristiction\", \n                    \"locationCode\": \"locationCode\", \n                    \"name\": \"country tax\", \n                    \"taxAmount\": 9, \n                    \"taxCode\": \"tax code\", \n                    \"taxCodeDescription\": \"tax code description\", \n                    \"taxDate\": \"2020-02-01\", \n                    \"taxMode\": \"TaxExclusive\", \n                    \"taxRate\": 0.03, \n                    \"taxRateDescription\": \"tax rate description\", \n                    \"taxRateType\": \"Percentage\"\n                }\n            ]\n        }\n    ]\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/invoices", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/invoices")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"accountId\": \"2c9890207863df710178642433c407a5\", \n    \"autoPay\": false, \n    \"comments\": \"comments\", \n    \"invoiceDate\": \"2020-02-01\", \n    \"invoiceItems\": [\n        {\n            \"amount\": 300, \n            \"bookingReference\": \"bookingReference\", \n            \"chargeDate\": 1580544000000, \n            \"chargeName\": \"charge with tax amount 9\", \n            \"description\": \"description\", \n            \"quantity\": 2, \n            \"serviceEndDate\": \"2020-02-10\", \n            \"serviceStartDate\": \"2020-02-01\", \n            \"taxItems\": [\n                {\n                    \"exemptAmount\": 0, \n                    \"jurisdiction\": \"juristiction\", \n                    \"locationCode\": \"locationCode\", \n                    \"name\": \"country tax\", \n                    \"taxAmount\": 9, \n                    \"taxCode\": \"tax code\", \n                    \"taxCodeDescription\": \"tax code description\", \n                    \"taxDate\": \"2020-02-01\", \n                    \"taxMode\": \"TaxExclusive\", \n                    \"taxRate\": 0.03, \n                    \"taxRateDescription\": \"tax rate description\", \n                    \"taxRateType\": \"Percentage\"\n                }\n            ]\n        }\n    ]\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/invoices");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"accountId\": \"2c9890207863df710178642433c407a5\", \n    \"autoPay\": false, \n    \"comments\": \"comments\", \n    \"invoiceDate\": \"2020-02-01\", \n    \"invoiceItems\": [\n        {\n            \"amount\": 300, \n            \"bookingReference\": \"bookingReference\", \n            \"chargeDate\": 1580544000000, \n            \"chargeName\": \"charge with tax amount 9\", \n            \"description\": \"description\", \n            \"quantity\": 2, \n            \"serviceEndDate\": \"2020-02-10\", \n            \"serviceStartDate\": \"2020-02-01\", \n            \"taxItems\": [\n                {\n                    \"exemptAmount\": 0, \n                    \"jurisdiction\": \"juristiction\", \n                    \"locationCode\": \"locationCode\", \n                    \"name\": \"country tax\", \n                    \"taxAmount\": 9, \n                    \"taxCode\": \"tax code\", \n                    \"taxCodeDescription\": \"tax code description\", \n                    \"taxDate\": \"2020-02-01\", \n                    \"taxMode\": \"TaxExclusive\", \n                    \"taxRate\": 0.03, \n                    \"taxRateDescription\": \"tax rate description\", \n                    \"taxRateType\": \"Percentage\"\n                }\n            ]\n        }\n    ]\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
    put:
      description: |
        Updates multiple invoices in batches with one call. 

        ## Limitations 

        This operation has the following limitations:

        * You can update a maximum of 50 invoices by one call.
      operationId: PUT_BatchUpdateInvoices
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PutBatchInvoiceType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Update invoices
      tags:
        - Invoices
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "invoices": [
                    {
                        "autoPay": false, 
                        "dueDate": "2017-12-16", 
                        "id": "2c93808457d787030157e031d86c4c57", 
                        "transferredToAccounting": "Yes"
                    }, 
                    {
                        "autoPay": false, 
                        "dueDate": "2017-12-27", 
                        "id": "2c92c8955bd63cc1015bd7c151af02ab", 
                        "transferredToAccounting": "Yes"
                    }, 
                    {
                        "id": "2c92c8955bd63cc1015bd7c151af02dc", 
                        "invoiceDate": "2017-11-27"
                    }
                ]
            }' "https://rest.zuora.com/v1/invoices"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/invoices');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "invoices": [
                    {
                        "autoPay": false, 
                        "dueDate": "2017-12-16", 
                        "id": "2c93808457d787030157e031d86c4c57", 
                        "transferredToAccounting": "Yes"
                    }, 
                    {
                        "autoPay": false, 
                        "dueDate": "2017-12-27", 
                        "id": "2c92c8955bd63cc1015bd7c151af02ab", 
                        "transferredToAccounting": "Yes"
                    }, 
                    {
                        "id": "2c92c8955bd63cc1015bd7c151af02dc", 
                        "invoiceDate": "2017-11-27"
                    }
                ]
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"invoices\": [\n        {\n            \"autoPay\": false, \n            \"dueDate\": \"2017-12-16\", \n            \"id\": \"2c93808457d787030157e031d86c4c57\", \n            \"transferredToAccounting\": \"Yes\"\n        }, \n        {\n            \"autoPay\": false, \n            \"dueDate\": \"2017-12-27\", \n            \"id\": \"2c92c8955bd63cc1015bd7c151af02ab\", \n            \"transferredToAccounting\": \"Yes\"\n        }, \n        {\n            \"id\": \"2c92c8955bd63cc1015bd7c151af02dc\", \n            \"invoiceDate\": \"2017-11-27\"\n        }\n    ]\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/invoices")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"invoices\": [\n        {\n            \"autoPay\": false, \n            \"dueDate\": \"2017-12-16\", \n            \"id\": \"2c93808457d787030157e031d86c4c57\", \n            \"transferredToAccounting\": \"Yes\"\n        }, \n        {\n            \"autoPay\": false, \n            \"dueDate\": \"2017-12-27\", \n            \"id\": \"2c92c8955bd63cc1015bd7c151af02ab\", \n            \"transferredToAccounting\": \"Yes\"\n        }, \n        {\n            \"id\": \"2c92c8955bd63cc1015bd7c151af02dc\", \n            \"invoiceDate\": \"2017-11-27\"\n        }\n    ]\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/invoices", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/invoices")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"invoices\": [\n        {\n            \"autoPay\": false, \n            \"dueDate\": \"2017-12-16\", \n            \"id\": \"2c93808457d787030157e031d86c4c57\", \n            \"transferredToAccounting\": \"Yes\"\n        }, \n        {\n            \"autoPay\": false, \n            \"dueDate\": \"2017-12-27\", \n            \"id\": \"2c92c8955bd63cc1015bd7c151af02ab\", \n            \"transferredToAccounting\": \"Yes\"\n        }, \n        {\n            \"id\": \"2c92c8955bd63cc1015bd7c151af02dc\", \n            \"invoiceDate\": \"2017-11-27\"\n        }\n    ]\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/invoices");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"invoices\": [\n        {\n            \"autoPay\": false, \n            \"dueDate\": \"2017-12-16\", \n            \"id\": \"2c93808457d787030157e031d86c4c57\", \n            \"transferredToAccounting\": \"Yes\"\n        }, \n        {\n            \"autoPay\": false, \n            \"dueDate\": \"2017-12-27\", \n            \"id\": \"2c92c8955bd63cc1015bd7c151af02ab\", \n            \"transferredToAccounting\": \"Yes\"\n        }, \n        {\n            \"id\": \"2c92c8955bd63cc1015bd7c151af02dc\", \n            \"invoiceDate\": \"2017-11-27\"\n        }\n    ]\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/invoices/{invoiceId}":
    put:
      description: |
        Updates a specific invoice. 
      operationId: PUT_UpdateInvoice
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The ID of the invoice. For example,
            2c92c8955bd63cc1015bd7c151af02ab.
          in: path
          name: invoiceId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PutInvoiceType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 40288ae9600808280160081db1533506
                    amount: 100
                    autoPay: false
                    balance: 100
                    cancelledById: null,
                    cancelledOn: null,
                    comment: ""
                    createdById: 40288ae9600808280160081d833a311a
                    createdDate: 2017-11-29 22:10:58
                    creditBalanceAdjustmentAmount: 0
                    currency: USD
                    dueDate: 2017-12-18
                    id: 40288ae9600808280160081dc9c13f15
                    invoiceDate: 2017-11-29
                    number: INV00000090
                    postedById: null
                    postedOn: null
                    status: Draft
                    success: true
                    targetDate: 2017-11-29
                    taxAmount: 0
                    totalTaxExemptAmount: 0
                    transferredToAccounting: No
                    updatedById: 40288ae9600808280160081d833a311a
                    updatedDate: 2017-11-30 13:47:52
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PutInvoiceResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Update an invoice
      tags:
        - Invoices
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "autoPay": false, 
                "invoiceDate": "2017-02-20", 
                "transferredToAccounting": "Yes"
            }' "https://rest.zuora.com/v1/invoices/{invoiceId}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/invoices/{invoiceId}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "autoPay": false, 
                "invoiceDate": "2017-02-20", 
                "transferredToAccounting": "Yes"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"autoPay\": false, \n    \"invoiceDate\": \"2017-02-20\", \n    \"transferredToAccounting\": \"Yes\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/invoices/{invoiceId}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"autoPay\": false, \n    \"invoiceDate\": \"2017-02-20\", \n    \"transferredToAccounting\": \"Yes\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/invoices/{invoiceId}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/invoices/{invoiceId}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"autoPay\": false, \n    \"invoiceDate\": \"2017-02-20\", \n    \"transferredToAccounting\": \"Yes\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/invoices/{invoiceId}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"autoPay\": false, \n    \"invoiceDate\": \"2017-02-20\", \n    \"transferredToAccounting\": \"Yes\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/invoices/{invoiceId}/application-parts":
    get:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

        Retrieves information about the payments or credit memos that are applied to a specified invoice.
      operationId: GET_InvoiceApplicationParts
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of an invoice. For example, 2c92c8955bd63cc1015bd7c151af02ab.
          in: path
          name: invoiceId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    applicationParts:
                      - appliedAmount: 22
                        createdById: 402881e522cf4f9b0122cf5d82860002
                        createdDate: 2018-01-02 11:42:16
                        creditMemoId: 4028905f60a165a50160b4f632ff023d
                        paymentId: null
                        updatedById: 402881e522cf4f9b0122cf5d82860002
                        updatedDate: 2018-01-02 11:42:16
                      - appliedAmount: 11
                        createdById: 402881e522cf4f9b0122cf5d82860002
                        createdDate: 2018-01-02 11:41:38
                        creditMemoId: null
                        paymentId: 4028905f60a165a50160b4f5d5cb0229
                        updatedById: 402881e522cf4f9b0122cf5d82860002
                        updatedDate: 2018-01-02 11:41:38
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GetInvoiceApplicationPartCollectionType"
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List all application parts of an invoice
      tags:
        - Invoices
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/invoices/{invoiceId}/application-parts"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/invoices/{invoiceId}/application-parts');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/invoices/{invoiceId}/application-parts")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/invoices/{invoiceId}/application-parts", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/invoices/{invoiceId}/application-parts")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/invoices/{invoiceId}/application-parts");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/invoices/{invoiceId}/creditmemos":
    post:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Creates an ad-hoc credit memo from an invoice.

        You can create a credit memo from an invoice only if you have the user permission. See [Billing Roles](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/A_Administrator_Settings/User_Roles/d_Billing_Roles) for more information.

        For a use case of this operation, see [Create credit memo](https://www.zuora.com/developer/api-guides/#Create-credit-memo).
      operationId: POST_CreditMemoFromInvoice
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            
            The minor version of the Zuora REST API. See [Minor Version](https://www.zuora.com/developer/api-reference/#section/API-Versions/Minor-Version) for information about REST API version control. 

            This header affects the availability of the following request fields:
            * `items` > `comment`
            * `items` > `description`
          in: header
          name: zuora-version
          required: false
          schema:
            type: string
        - description: |
            The ID of an invoice that you want to create a credit memo from.
          in: path
          name: invoiceId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/CreditMemoFromInvoiceType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 402890555a7d4022015a7dabf5f60088
                    amount: 0.01
                    appliedAmount: 0
                    autoApplyUponPosting: false
                    cancelledById: null
                    cancelledOn: null
                    comment: the comment
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-03-01 15:19:42
                    creditMemoDate: 2017-11-30
                    currency: USD
                    excludeFromAutoApplyRules: false
                    id: 402890555a87d7f5015a88bd27f80014
                    latestPDFFileId: null
                    number: CM00000013
                    postedById: null
                    postedOn: null
                    reasonCode: Write-off
                    referredInvoiceId: 402890555a7d4022015a7dadb3b300a4
                    refundAmount: 0
                    source: AdhocFromInvoice
                    sourceId: null
                    status: Draft
                    success: true
                    targetDate: null
                    taxAmount: 0.01
                    taxMessage: null
                    taxStatus: null
                    totalTaxExemptAmount: 0
                    transferredToAccounting: No
                    unappliedAmount: 0.01
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 15:19:42
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETCreditMemoType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Create a credit memo from an invoice
      tags:
        - Invoices
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "autoApplyToInvoiceUponPosting": false, 
                "autoPost": false, 
                "comment": "the comment", 
                "effectiveDate": "2016-11-30", 
                "excludeFromAutoApplyRules": false, 
                "items": [
                    {
                        "amount": 1, 
                        "comment": "This is comment!", 
                        "invoiceItemId": "4028905558b483220158b48983dd0015", 
                        "quantity": 1, 
                        "serviceEndDate": "2016-11-30", 
                        "serviceStartDate": "2016-11-01", 
                        "skuName": "SKU-30", 
                        "taxItems": [
                            {
                                "amount": 0.01, 
                                "jurisdiction": "CALIFORNIA", 
                                "locationCode": "06", 
                                "sourceTaxItemId": "4028905558b483220158b48983150010", 
                                "taxCode": null, 
                                "taxCodeDescription": "This is tax code description!", 
                                "taxDate": "2016-11-30", 
                                "taxExemptAmount": 0.0, 
                                "taxName": "STATE TAX", 
                                "taxRate": 0.0625, 
                                "taxRateDescription": "This is tax rate description!", 
                                "taxRateType": "Percentage"
                            }
                        ], 
                        "taxMode": "TaxExclusive", 
                        "unitOfMeasure": "Test_UOM"
                    }
                ], 
                "reasonCode": "Write-off"
            }' "https://rest.zuora.com/v1/invoices/{invoiceId}/creditmemos"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/invoices/{invoiceId}/creditmemos');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "autoApplyToInvoiceUponPosting": false, 
                "autoPost": false, 
                "comment": "the comment", 
                "effectiveDate": "2016-11-30", 
                "excludeFromAutoApplyRules": false, 
                "items": [
                    {
                        "amount": 1, 
                        "comment": "This is comment!", 
                        "invoiceItemId": "4028905558b483220158b48983dd0015", 
                        "quantity": 1, 
                        "serviceEndDate": "2016-11-30", 
                        "serviceStartDate": "2016-11-01", 
                        "skuName": "SKU-30", 
                        "taxItems": [
                            {
                                "amount": 0.01, 
                                "jurisdiction": "CALIFORNIA", 
                                "locationCode": "06", 
                                "sourceTaxItemId": "4028905558b483220158b48983150010", 
                                "taxCode": null, 
                                "taxCodeDescription": "This is tax code description!", 
                                "taxDate": "2016-11-30", 
                                "taxExemptAmount": 0.0, 
                                "taxName": "STATE TAX", 
                                "taxRate": 0.0625, 
                                "taxRateDescription": "This is tax rate description!", 
                                "taxRateType": "Percentage"
                            }
                        ], 
                        "taxMode": "TaxExclusive", 
                        "unitOfMeasure": "Test_UOM"
                    }
                ], 
                "reasonCode": "Write-off"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"autoApplyToInvoiceUponPosting\": false, \n    \"autoPost\": false, \n    \"comment\": \"the comment\", \n    \"effectiveDate\": \"2016-11-30\", \n    \"excludeFromAutoApplyRules\": false, \n    \"items\": [\n        {\n            \"amount\": 1, \n            \"comment\": \"This is comment!\", \n            \"invoiceItemId\": \"4028905558b483220158b48983dd0015\", \n            \"quantity\": 1, \n            \"serviceEndDate\": \"2016-11-30\", \n            \"serviceStartDate\": \"2016-11-01\", \n            \"skuName\": \"SKU-30\", \n            \"taxItems\": [\n                {\n                    \"amount\": 0.01, \n                    \"jurisdiction\": \"CALIFORNIA\", \n                    \"locationCode\": \"06\", \n                    \"sourceTaxItemId\": \"4028905558b483220158b48983150010\", \n                    \"taxCode\": null, \n                    \"taxCodeDescription\": \"This is tax code description!\", \n                    \"taxDate\": \"2016-11-30\", \n                    \"taxExemptAmount\": 0.0, \n                    \"taxName\": \"STATE TAX\", \n                    \"taxRate\": 0.0625, \n                    \"taxRateDescription\": \"This is tax rate description!\", \n                    \"taxRateType\": \"Percentage\"\n                }\n            ], \n            \"taxMode\": \"TaxExclusive\", \n            \"unitOfMeasure\": \"Test_UOM\"\n        }\n    ], \n    \"reasonCode\": \"Write-off\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/invoices/{invoiceId}/creditmemos")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"autoApplyToInvoiceUponPosting\": false, \n    \"autoPost\": false, \n    \"comment\": \"the comment\", \n    \"effectiveDate\": \"2016-11-30\", \n    \"excludeFromAutoApplyRules\": false, \n    \"items\": [\n        {\n            \"amount\": 1, \n            \"comment\": \"This is comment!\", \n            \"invoiceItemId\": \"4028905558b483220158b48983dd0015\", \n            \"quantity\": 1, \n            \"serviceEndDate\": \"2016-11-30\", \n            \"serviceStartDate\": \"2016-11-01\", \n            \"skuName\": \"SKU-30\", \n            \"taxItems\": [\n                {\n                    \"amount\": 0.01, \n                    \"jurisdiction\": \"CALIFORNIA\", \n                    \"locationCode\": \"06\", \n                    \"sourceTaxItemId\": \"4028905558b483220158b48983150010\", \n                    \"taxCode\": null, \n                    \"taxCodeDescription\": \"This is tax code description!\", \n                    \"taxDate\": \"2016-11-30\", \n                    \"taxExemptAmount\": 0.0, \n                    \"taxName\": \"STATE TAX\", \n                    \"taxRate\": 0.0625, \n                    \"taxRateDescription\": \"This is tax rate description!\", \n                    \"taxRateType\": \"Percentage\"\n                }\n            ], \n            \"taxMode\": \"TaxExclusive\", \n            \"unitOfMeasure\": \"Test_UOM\"\n        }\n    ], \n    \"reasonCode\": \"Write-off\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/invoices/{invoiceId}/creditmemos", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/invoices/{invoiceId}/creditmemos")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"autoApplyToInvoiceUponPosting\": false, \n    \"autoPost\": false, \n    \"comment\": \"the comment\", \n    \"effectiveDate\": \"2016-11-30\", \n    \"excludeFromAutoApplyRules\": false, \n    \"items\": [\n        {\n            \"amount\": 1, \n            \"comment\": \"This is comment!\", \n            \"invoiceItemId\": \"4028905558b483220158b48983dd0015\", \n            \"quantity\": 1, \n            \"serviceEndDate\": \"2016-11-30\", \n            \"serviceStartDate\": \"2016-11-01\", \n            \"skuName\": \"SKU-30\", \n            \"taxItems\": [\n                {\n                    \"amount\": 0.01, \n                    \"jurisdiction\": \"CALIFORNIA\", \n                    \"locationCode\": \"06\", \n                    \"sourceTaxItemId\": \"4028905558b483220158b48983150010\", \n                    \"taxCode\": null, \n                    \"taxCodeDescription\": \"This is tax code description!\", \n                    \"taxDate\": \"2016-11-30\", \n                    \"taxExemptAmount\": 0.0, \n                    \"taxName\": \"STATE TAX\", \n                    \"taxRate\": 0.0625, \n                    \"taxRateDescription\": \"This is tax rate description!\", \n                    \"taxRateType\": \"Percentage\"\n                }\n            ], \n            \"taxMode\": \"TaxExclusive\", \n            \"unitOfMeasure\": \"Test_UOM\"\n        }\n    ], \n    \"reasonCode\": \"Write-off\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/invoices/{invoiceId}/creditmemos");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"autoApplyToInvoiceUponPosting\": false, \n    \"autoPost\": false, \n    \"comment\": \"the comment\", \n    \"effectiveDate\": \"2016-11-30\", \n    \"excludeFromAutoApplyRules\": false, \n    \"items\": [\n        {\n            \"amount\": 1, \n            \"comment\": \"This is comment!\", \n            \"invoiceItemId\": \"4028905558b483220158b48983dd0015\", \n            \"quantity\": 1, \n            \"serviceEndDate\": \"2016-11-30\", \n            \"serviceStartDate\": \"2016-11-01\", \n            \"skuName\": \"SKU-30\", \n            \"taxItems\": [\n                {\n                    \"amount\": 0.01, \n                    \"jurisdiction\": \"CALIFORNIA\", \n                    \"locationCode\": \"06\", \n                    \"sourceTaxItemId\": \"4028905558b483220158b48983150010\", \n                    \"taxCode\": null, \n                    \"taxCodeDescription\": \"This is tax code description!\", \n                    \"taxDate\": \"2016-11-30\", \n                    \"taxExemptAmount\": 0.0, \n                    \"taxName\": \"STATE TAX\", \n                    \"taxRate\": 0.0625, \n                    \"taxRateDescription\": \"This is tax rate description!\", \n                    \"taxRateType\": \"Percentage\"\n                }\n            ], \n            \"taxMode\": \"TaxExclusive\", \n            \"unitOfMeasure\": \"Test_UOM\"\n        }\n    ], \n    \"reasonCode\": \"Write-off\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/invoices/{invoiceId}/debitmemos":
    post:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Creates an ad-hoc debit memo from an invoice.

        You can create a debit memo from an invoice only if you have the user permission. See [Billing Roles](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/A_Administrator_Settings/User_Roles/d_Billing_Roles) for more information.
      operationId: POST_DebitMemoFromInvoice
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The ID of an invoice that you want to create a debit memo from.
          in: path
          name: invoiceId
          required: true
          schema:
            type: string
        - description: |
            
            The minor version of the Zuora REST API. See [Minor Version](https://www.zuora.com/developer/api-reference/#section/API-Versions/Minor-Version) for information about REST API version control. 

            This header affects the availability of the following request fields:
            * `items` > `comment`
            * `items` > `description`
          in: header
          name: zuora-version
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/DebitMemoFromInvoiceType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 402890555a7d4022015a7dabf5f60088
                    amount: 0.01
                    autoPay: true
                    balance: 0.01
                    beAppliedAmount: 0
                    cancelledById: null
                    cancelledOn: null
                    comment: the comment
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-03-01 17:13:15
                    debitMemoDate: 2017-11-30
                    dueDate: 2017-12-30
                    id: 402890555a87d7f5015a89251edc0045
                    latestPDFFileId: null
                    number: DM00000003
                    postedById: null
                    postedOn: null
                    reasonCode: Charge Dispute
                    referredInvoiceId: 402890555a7d4022015a7dadb3b300a4
                    status: Draft
                    success: true
                    targetDate: null
                    taxAmount: 0.01
                    taxMessage: null
                    taxStatus: null
                    totalTaxExemptAmount: 0
                    transferredToAccounting: No
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 17:13:15
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETDebitMemoType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Create a debit memo from an invoice
      tags:
        - Invoices
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "autoPay": true, 
                "comment": "the comment", 
                "effectiveDate": "2017-11-30", 
                "items": [
                    {
                        "amount": 1, 
                        "autoPost": false, 
                        "comment": "This is comment!", 
                        "invoiceItemId": "402890555a7d4022015a7dadb3b700a6", 
                        "quantity": 1, 
                        "serviceEndDate": "2017-11-30", 
                        "serviceStartDate": "2017-11-01", 
                        "skuName": "SKU-30", 
                        "taxItems": [
                            {
                                "amount": 0.01, 
                                "jurisdiction": "CALIFORNIA", 
                                "locationCode": "06", 
                                "sourceTaxItemId": "402890555a7d4022015a7dadb39b00a1", 
                                "taxCode": null, 
                                "taxCodeDescription": null, 
                                "taxDate": "2017-11-30", 
                                "taxExemptAmount": 0.0, 
                                "taxName": "STATE TAX", 
                                "taxRate": 0.0625, 
                                "taxRateDescription": "This is tax rate description!", 
                                "taxRateType": "Percentage"
                            }
                        ], 
                        "taxMode": "TaxExclusive", 
                        "unitOfMeasure": "Test_UOM"
                    }
                ], 
                "reasonCode": "Charge Dispute"
            }' "https://rest.zuora.com/v1/invoices/{invoiceId}/debitmemos"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/invoices/{invoiceId}/debitmemos');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "autoPay": true, 
                "comment": "the comment", 
                "effectiveDate": "2017-11-30", 
                "items": [
                    {
                        "amount": 1, 
                        "autoPost": false, 
                        "comment": "This is comment!", 
                        "invoiceItemId": "402890555a7d4022015a7dadb3b700a6", 
                        "quantity": 1, 
                        "serviceEndDate": "2017-11-30", 
                        "serviceStartDate": "2017-11-01", 
                        "skuName": "SKU-30", 
                        "taxItems": [
                            {
                                "amount": 0.01, 
                                "jurisdiction": "CALIFORNIA", 
                                "locationCode": "06", 
                                "sourceTaxItemId": "402890555a7d4022015a7dadb39b00a1", 
                                "taxCode": null, 
                                "taxCodeDescription": null, 
                                "taxDate": "2017-11-30", 
                                "taxExemptAmount": 0.0, 
                                "taxName": "STATE TAX", 
                                "taxRate": 0.0625, 
                                "taxRateDescription": "This is tax rate description!", 
                                "taxRateType": "Percentage"
                            }
                        ], 
                        "taxMode": "TaxExclusive", 
                        "unitOfMeasure": "Test_UOM"
                    }
                ], 
                "reasonCode": "Charge Dispute"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"autoPay\": true, \n    \"comment\": \"the comment\", \n    \"effectiveDate\": \"2017-11-30\", \n    \"items\": [\n        {\n            \"amount\": 1, \n            \"autoPost\": false, \n            \"comment\": \"This is comment!\", \n            \"invoiceItemId\": \"402890555a7d4022015a7dadb3b700a6\", \n            \"quantity\": 1, \n            \"serviceEndDate\": \"2017-11-30\", \n            \"serviceStartDate\": \"2017-11-01\", \n            \"skuName\": \"SKU-30\", \n            \"taxItems\": [\n                {\n                    \"amount\": 0.01, \n                    \"jurisdiction\": \"CALIFORNIA\", \n                    \"locationCode\": \"06\", \n                    \"sourceTaxItemId\": \"402890555a7d4022015a7dadb39b00a1\", \n                    \"taxCode\": null, \n                    \"taxCodeDescription\": null, \n                    \"taxDate\": \"2017-11-30\", \n                    \"taxExemptAmount\": 0.0, \n                    \"taxName\": \"STATE TAX\", \n                    \"taxRate\": 0.0625, \n                    \"taxRateDescription\": \"This is tax rate description!\", \n                    \"taxRateType\": \"Percentage\"\n                }\n            ], \n            \"taxMode\": \"TaxExclusive\", \n            \"unitOfMeasure\": \"Test_UOM\"\n        }\n    ], \n    \"reasonCode\": \"Charge Dispute\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/invoices/{invoiceId}/debitmemos")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"autoPay\": true, \n    \"comment\": \"the comment\", \n    \"effectiveDate\": \"2017-11-30\", \n    \"items\": [\n        {\n            \"amount\": 1, \n            \"autoPost\": false, \n            \"comment\": \"This is comment!\", \n            \"invoiceItemId\": \"402890555a7d4022015a7dadb3b700a6\", \n            \"quantity\": 1, \n            \"serviceEndDate\": \"2017-11-30\", \n            \"serviceStartDate\": \"2017-11-01\", \n            \"skuName\": \"SKU-30\", \n            \"taxItems\": [\n                {\n                    \"amount\": 0.01, \n                    \"jurisdiction\": \"CALIFORNIA\", \n                    \"locationCode\": \"06\", \n                    \"sourceTaxItemId\": \"402890555a7d4022015a7dadb39b00a1\", \n                    \"taxCode\": null, \n                    \"taxCodeDescription\": null, \n                    \"taxDate\": \"2017-11-30\", \n                    \"taxExemptAmount\": 0.0, \n                    \"taxName\": \"STATE TAX\", \n                    \"taxRate\": 0.0625, \n                    \"taxRateDescription\": \"This is tax rate description!\", \n                    \"taxRateType\": \"Percentage\"\n                }\n            ], \n            \"taxMode\": \"TaxExclusive\", \n            \"unitOfMeasure\": \"Test_UOM\"\n        }\n    ], \n    \"reasonCode\": \"Charge Dispute\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/invoices/{invoiceId}/debitmemos", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/invoices/{invoiceId}/debitmemos")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"autoPay\": true, \n    \"comment\": \"the comment\", \n    \"effectiveDate\": \"2017-11-30\", \n    \"items\": [\n        {\n            \"amount\": 1, \n            \"autoPost\": false, \n            \"comment\": \"This is comment!\", \n            \"invoiceItemId\": \"402890555a7d4022015a7dadb3b700a6\", \n            \"quantity\": 1, \n            \"serviceEndDate\": \"2017-11-30\", \n            \"serviceStartDate\": \"2017-11-01\", \n            \"skuName\": \"SKU-30\", \n            \"taxItems\": [\n                {\n                    \"amount\": 0.01, \n                    \"jurisdiction\": \"CALIFORNIA\", \n                    \"locationCode\": \"06\", \n                    \"sourceTaxItemId\": \"402890555a7d4022015a7dadb39b00a1\", \n                    \"taxCode\": null, \n                    \"taxCodeDescription\": null, \n                    \"taxDate\": \"2017-11-30\", \n                    \"taxExemptAmount\": 0.0, \n                    \"taxName\": \"STATE TAX\", \n                    \"taxRate\": 0.0625, \n                    \"taxRateDescription\": \"This is tax rate description!\", \n                    \"taxRateType\": \"Percentage\"\n                }\n            ], \n            \"taxMode\": \"TaxExclusive\", \n            \"unitOfMeasure\": \"Test_UOM\"\n        }\n    ], \n    \"reasonCode\": \"Charge Dispute\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/invoices/{invoiceId}/debitmemos");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"autoPay\": true, \n    \"comment\": \"the comment\", \n    \"effectiveDate\": \"2017-11-30\", \n    \"items\": [\n        {\n            \"amount\": 1, \n            \"autoPost\": false, \n            \"comment\": \"This is comment!\", \n            \"invoiceItemId\": \"402890555a7d4022015a7dadb3b700a6\", \n            \"quantity\": 1, \n            \"serviceEndDate\": \"2017-11-30\", \n            \"serviceStartDate\": \"2017-11-01\", \n            \"skuName\": \"SKU-30\", \n            \"taxItems\": [\n                {\n                    \"amount\": 0.01, \n                    \"jurisdiction\": \"CALIFORNIA\", \n                    \"locationCode\": \"06\", \n                    \"sourceTaxItemId\": \"402890555a7d4022015a7dadb39b00a1\", \n                    \"taxCode\": null, \n                    \"taxCodeDescription\": null, \n                    \"taxDate\": \"2017-11-30\", \n                    \"taxExemptAmount\": 0.0, \n                    \"taxName\": \"STATE TAX\", \n                    \"taxRate\": 0.0625, \n                    \"taxRateDescription\": \"This is tax rate description!\", \n                    \"taxRateType\": \"Percentage\"\n                }\n            ], \n            \"taxMode\": \"TaxExclusive\", \n            \"unitOfMeasure\": \"Test_UOM\"\n        }\n    ], \n    \"reasonCode\": \"Charge Dispute\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/invoices/{invoiceId}/emails":
    post:
      description: |
        Sends a posted invoice to the specified email addresses manually.



        ## Notes
          - You must activate the **Manual Email For Invoice | Manual Email For Invoice** notification before emailing invoices. To include the invoice PDF in the email, select the **Include Invoice PDF** check box in the **Edit notification** dialog from the Zuora UI. See [Create and Edit Notifications](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/Notifications/C_Create_Notifications#section_2) for more information.


          - Zuora sends the email messages based on the email template you set. You can set the email template to use in the **Delivery Options** panel of the **Edit notification** dialog from the Zuora UI. By default, the **Invoice Posted Default Email Template** template is used. See [Create and Edit Email Templates](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/Notifications/Create_Email_Templates) for more information.


          - The invoices are sent only to the work email addresses or personal email addresses of the Bill To contact if the following conditions are all met:

            * The `useEmailTemplateSetting` field is set to `false`.
            * The email addresses are not specified in the `emailAddresses` field.
      operationId: POST_EmailInvoice
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The ID of the invoice. For example, 2c92c8955bd63cc1015bd7c151af02ab.
          in: path
          name: invoiceId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PostInvoiceEmailRequestType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Email an invoice
      tags:
        - Invoices
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "emailAddresses": "contact1@example.com,contact2@example.com", 
                "includeAdditionalEmailAddresses": false, 
                "useEmailTemplateSetting": false
            }' "https://rest.zuora.com/v1/invoices/{invoiceId}/emails"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/invoices/{invoiceId}/emails');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "emailAddresses": "contact1@example.com,contact2@example.com", 
                "includeAdditionalEmailAddresses": false, 
                "useEmailTemplateSetting": false
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"emailAddresses\": \"contact1@example.com,contact2@example.com\", \n    \"includeAdditionalEmailAddresses\": false, \n    \"useEmailTemplateSetting\": false\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/invoices/{invoiceId}/emails")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"emailAddresses\": \"contact1@example.com,contact2@example.com\", \n    \"includeAdditionalEmailAddresses\": false, \n    \"useEmailTemplateSetting\": false\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/invoices/{invoiceId}/emails", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/invoices/{invoiceId}/emails")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"emailAddresses\": \"contact1@example.com,contact2@example.com\", \n    \"includeAdditionalEmailAddresses\": false, \n    \"useEmailTemplateSetting\": false\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/invoices/{invoiceId}/emails");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"emailAddresses\": \"contact1@example.com,contact2@example.com\", \n    \"includeAdditionalEmailAddresses\": false, \n    \"useEmailTemplateSetting\": false\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/invoices/{invoiceId}/files":
    get:
      description: |
        Retrieves the information about all PDF files of a specified invoice. 

        Invoice PDF files are returned in reverse chronological order by the value of the `versionNumber` field.

        **Note**: This API only retrieves the PDF files that have been generated. If the latest PDF file is being generated, it will not be included in the response.

        You can use the [Query](https://www.zuora.com/developer/api-reference/#operation/Action_POSTquery) action to get the latest PDF file, for example: `"select Body from Invoice where Id = '2c93808457d787030157e0324aea5158'"`.

        See [Query an Invoice Body](https://knowledgecenter.zuora.com/Central_Platform/API/G_SOAP_API/E1_SOAP_API_Object_Reference/Invoice/Query_an_Invoice_Body_Field) for more information.
      operationId: GET_InvoiceFiles
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - description: |
            The unique ID of an invoice. For example, 2c92c8955bd63cc1015bd7c151af02ab.
          in: path
          name: invoiceId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    invoiceFiles:
                      - id: 2c98901f62d7d83d0162d7facec2262f
                        pdfFileUrl: /v1/files/2c98901f62d7d83d0162d7facea6262d
                        versionNumber: 1524041954479
                      - id: 2c98901f62d7d83d0162d7f4a9792629
                        pdfFileUrl: /v1/files/2c98901f62d7d83d0162d7f4a95c2627
                        versionNumber: 1524041551946
                      - id: 2c98901f62d7d83d0162d7f491ea2626
                        pdfFileUrl: /v1/files/2c98901f62d7d83d0162d7f490f22624
                        versionNumber: 1524041544112
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETInvoiceFilesResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List all files of an invoice
      tags:
        - Invoices
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/invoices/{invoiceId}/files"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/invoices/{invoiceId}/files');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/invoices/{invoiceId}/files")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/invoices/{invoiceId}/files", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/invoices/{invoiceId}/files")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/invoices/{invoiceId}/files");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    post:
      description: |
        Uploads an externally generated invoice PDF file for an invoice that is in Draft or Posted status.

        To use this operation, you must enable the Modify Invoice permission. See [Billing Permissions](https://knowledgecenter.zuora.com/Billing/Tenant_Management/A_Administrator_Settings/User_Roles/d_Billing_Roles) for more information.

        This operation has the following restrictions:
        - Only the PDF file format is supported.
        - The maximum size of the PDF file to upload is 4 MB.
        - A maximum of 50 PDF files can be uploaded for one invoice.
      operationId: POST_UploadFileForInvoice
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: |
            The ID of the invoice that you want to upload a PDF file for. For example, 2c92c8955bd63cc1015bd7c151af02ab.
          in: path
          name: invoiceId
          required: true
          schema:
            type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              properties:
                file:
                  description: |
                    The PDF file to upload for the invoice.
                  format: binary
                  type: string
              type: object
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    fileId: 40289f466463d683016463ef8b7301a2
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTUploadFileResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Upload a file for an invoice
      tags:
        - Invoices
      x-code-samples:
        - lang: Curl
          source: |
            curl -X POST -H "Authorization: Bearer f21f017e4724445d8647b1f0de7ed6f1" -F "file=@InvoiceFile.pdf" "https://rest.zuora.com/v1/invoices/2c92c8955bd63cc1015bd7c151af02ab/files"
  "/v1/invoices/{invoiceId}/items":
    get:
      description: |
        Retrieves the information about all items of a specified invoice. 
      operationId: GET_InvoiceItems
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - description: |
            The unique ID of an invoice. For example, 2c92c8955bd63cc1015bd7c151af02ab.
          in: path
          name: invoiceId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    invoiceItems:
                      - appliedToItemId: null
                        balance: 21.1
                        chargeAmount: 21.1
                        chargeDescription: ""
                        chargeId: 2c92c0f9511f56b2015126814af832d2
                        chargeName: Annual Fee
                        description: ""
                        id: 2c92c095511f5b4401512682dd017989
                        productName: TeamCollab Enterprise
                        quantity: 1
                        serviceEndDate: 2015-11-30
                        serviceStartDate: 2015-11-20
                        subscriptionId: 2c92c0f9511f56b2015126814ad532cc
                        subscriptionName: A-S00000004
                        taxAmount: 0
                        taxationItems:
                          data:
                            - balance: 2.11
                              creditAmount: 0
                              exemptAmount: 0
                              id: 2c98901a68ff26800168ffce6eeb0ffe
                              jurisdiction: County
                              locationCode: 000-1
                              name: taxName
                              paymentAmount: 0
                              taxAmount: 2.11
                              taxCode: TAXCODE-1
                              taxCodeDescription: null
                              taxDate: 2015-11-20
                              taxRate: 0.1
                              taxRateDescription: ""
                              taxRateType: Percentage
                        unitOfMeasure: ""
                        unitPrice: 21.1
                      - appliedToItemId: 2c92c095511f5b4401512682dd017989
                        chargeAmount: -2.1
                        chargeDescription: ""
                        chargeId: 1b3dede652fa47db833a83be55d850a5
                        chargeName: Discount
                        description: ""
                        id: 3e28d61d442f433797e268e2b7c11eeb
                        productName: TeamCollab Enterprise
                        quantity: 0
                        serviceEndDate: 2015-11-30
                        serviceStartDate: 2015-11-20
                        subscriptionId: c2d9a5768db440cbbf2709a55c614bed
                        subscriptionName: A-S00000004
                        taxAmount: 0
                        taxationItems:
                          data:
                            - balance: 0.21
                              creditAmount: 0
                              exemptAmount: 0
                              id: 2c98901a68ff26800168ffce6eeb0ffe
                              jurisdiction: County
                              locationCode: 000-1
                              name: taxName
                              paymentAmount: 0
                              taxAmount: 0.21
                              taxCode: TAXCODE-1
                              taxCodeDescription: null
                              taxDate: 2015-11-20
                              taxRate: 0.1
                              taxRateDescription: ""
                              taxRateType: Percentage
                        unitOfMeasure: ""
                        unitPrice: 10
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETInvoiceItemsResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List all items of an invoice
      tags:
        - Invoices
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/invoices/{invoiceId}/items"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/invoices/{invoiceId}/items');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/invoices/{invoiceId}/items")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/invoices/{invoiceId}/items", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/invoices/{invoiceId}/items")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/invoices/{invoiceId}/items");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/invoices/{invoiceId}/items/{itemId}/taxation-items":
    get:
      description: |
        Retrieves information about the taxation items of a specific invoice item. 
      operationId: GET_TaxationItemsOfInvoiceItem
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_page"
        - description: |
            The unique ID of an invoice. For example, 2c92c8955bd63cc1015bd7c151af02ab.
          in: path
          name: invoiceId
          required: true
          schema:
            type: string
        - description: |
            The unique ID of an invoice item. For example, 2c86c8955bd63cc1015bd7c151af02ef.
          in: path
          name: itemId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    data:
                      - balance: 10
                        creditAmount: 0
                        exemptAmount: 0
                        id: 2c98901a68ff26800168ffce84e3102c
                        jurisdiction: test
                        locationCode: code - 001
                        name: test
                        paymentAmount: 0
                        taxAmount: 10
                        taxCode: taxcode
                        taxCodeDescription: description
                        taxDate: 2019-02-18
                        taxRate: 2
                        taxRateDescription: test
                        taxRateType: FlatFee
                      - balance: 10
                        creditAmount: 0
                        exemptAmount: 0
                        id: 2c98901a68ff26800168ffce85d6102e
                        jurisdiction: test
                        locationCode: code - 001
                        name: test
                        paymentAmount: 0
                        taxAmount: 10
                        taxCode: taxcode
                        taxCodeDescription: description
                        taxDate: 2019-02-18
                        taxRate: 2
                        taxRateDescription: test
                        taxRateType: FlatFee
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETInvoiceTaxationItemsResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.        
              schema:
                maxLength: 64
                type: string
      summary: List all taxation items of an invoice item
      tags:
        - Invoices
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/invoices/{invoiceId}/items/{itemId}/taxation-items"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/invoices/{invoiceId}/items/{itemId}/taxation-items');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/invoices/{invoiceId}/items/{itemId}/taxation-items")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/invoices/{invoiceId}/items/{itemId}/taxation-items", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/invoices/{invoiceId}/items/{itemId}/taxation-items")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/invoices/{invoiceId}/items/{itemId}/taxation-items");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/invoices/{invoiceId}/reverse":
    put:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

        Reverses a posted invoice. 

        **Restrictions**

        You are not allowed to reverse an invoice if any of the following restrictions is met:

        * Payments and credit memos are applied to the invoice.
        * The invoice is split.
        * The invoice is not in Posted status.
        * The total amount of the invoice is less than 0 (a negative invoice).
        * Using Tax Connector for Extension Platform to calculate taxes.
        * An invoice contains more than 2,000 items in total, including invoice items, discount items, and taxation items.

        See [Invoice Reversal](https://knowledgecenter.zuora.com/CB_Billing/IA_Invoices/Reverse_Posted_Invoices) for more information.
      operationId: PUT_ReverseInvoice
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The ID of the invoice. For example, 2c92c8955bd63cc1015bd7c151af02ab.
          in: path
          name: invoiceId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PutReverseInvoiceType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    creditMemo:
                      id: 402890555a40ca7f015a5b099b0e307a
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PutReverseInvoiceResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Reverse an invoice
      tags:
        - Invoices
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "applyEffectiveDate": "2017-02-20", 
                "memoDate": "2017-02-20"
            }' "https://rest.zuora.com/v1/invoices/{invoiceId}/reverse"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/invoices/{invoiceId}/reverse');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "applyEffectiveDate": "2017-02-20", 
                "memoDate": "2017-02-20"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"applyEffectiveDate\": \"2017-02-20\", \n    \"memoDate\": \"2017-02-20\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/invoices/{invoiceId}/reverse")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"applyEffectiveDate\": \"2017-02-20\", \n    \"memoDate\": \"2017-02-20\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/invoices/{invoiceId}/reverse", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/invoices/{invoiceId}/reverse")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"applyEffectiveDate\": \"2017-02-20\", \n    \"memoDate\": \"2017-02-20\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/invoices/{invoiceId}/reverse");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"applyEffectiveDate\": \"2017-02-20\", \n    \"memoDate\": \"2017-02-20\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/invoices/{invoiceId}/write-off":
    put:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

        Writes off a posted invoice. 

        By writing off an invoice, a credit memo is created and applied to the invoice. The generated credit memo items and credit memo taxation items are applied to invoice items and invoice taxation items based on the configured default application rule. If an invoice is written off, the balance of each invoice item and invoice taxation item must be zero.

        If you set the **Create credit memos mirroring invoice items billing rule** to **Yes**, you can write off an invoice even if all its items have zero balance.

        **Restrictions**

        You cannot write off an invoice if any of the following restrictions is met:

        * The balance of an invoice has been changed before Invoice Settlement is enabled.

          For example, before Invoice Settlement is enabled, any credit balance adjustments, invoice item adjustments, or invoice adjustments have been applied to an invoice.

        * An invoice contains more than 2,000 items in total, including invoice items, discount items, and taxation items.

        See [Invoice Write-off](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/IA_Invoices/Invoice_Write-Off) for more information.        
      operationId: PUT_WriteOffInvoice
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of an invoice. For example, 2c92c8955bd63cc1015bd7c151af02ab.
          in: path
          name: invoiceId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTWriteOffInvoiceRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    creditMemo:
                      id: 402890555a40ca7f015a5b099b0e307a
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PUTWriteOffInvoiceResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Write off an invoice
      tags:
        - Invoices
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "memoDate": "2019-01-02"
            }' "https://rest.zuora.com/v1/invoices/{invoiceId}/write-off"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/invoices/{invoiceId}/write-off');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "memoDate": "2019-01-02"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"memoDate\": \"2019-01-02\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/invoices/{invoiceId}/write-off")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"memoDate\": \"2019-01-02\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/invoices/{invoiceId}/write-off", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/invoices/{invoiceId}/write-off")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"memoDate\": \"2019-01-02\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/invoices/{invoiceId}/write-off");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"memoDate\": \"2019-01-02\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/journal-entries:
    post:
      description: |
        This REST API reference describes how to manually create a summary journal entry. Request and response field descriptions and sample code are provided.
        ## Requirements
        1.The sum of debits must equal the sum of credits in the summary journal entry.

        2.The following applies only if you use foreign currency conversion:
          * If you have configured Aggregate transactions with different currencies during a Journal Run to "Yes", the value of the **currency** field must be the same as your tenant's home currency. That is, you must create journal entries using your home currency.
          * All journal entries in an accounting period must either all be aggregated or all be unaggregated. You cannot have a mix of aggregated and unaggregated journal entries in the same accounting period.
      operationId: POST_SummaryJournalEntry
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTJournalEntryType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    journalEntryNumber: JE-00000001
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTJournalEntryResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Create a summary journal entry
      tags:
        - Summary Journal Entries
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "accountingPeriodName": "Nov-2014", 
                "currency": "USD", 
                "journalEntryDate": "2014-09-09", 
                "journalEntryItems": [
                    {
                        "accountingCodeName": "Accounts Receivable", 
                        "accountingCodeType": "Deferred Revenue", 
                        "amount": "400.9", 
                        "homeCurrencyAmount": "801.8", 
                        "type": "Credit"
                    }, 
                    {
                        "accountingCodeName": "Subscription Revenue", 
                        "accountingCodeType": "Sales Revenue", 
                        "amount": "400.9", 
                        "homeCurrencyAmount": "801.8", 
                        "type": "Debit"
                    }
                ], 
                "notes": "my account", 
                "segments": [
                    {
                        "segmentName": "billToCountry", 
                        "segmentValue": "United States"
                    }, 
                    {
                        "segmentName": "billToState", 
                        "segmentValue": "California"
                    }
                ], 
                "transferredToAccounting": "No"
            }' "https://rest.zuora.com/v1/journal-entries"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/journal-entries');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "accountingPeriodName": "Nov-2014", 
                "currency": "USD", 
                "journalEntryDate": "2014-09-09", 
                "journalEntryItems": [
                    {
                        "accountingCodeName": "Accounts Receivable", 
                        "accountingCodeType": "Deferred Revenue", 
                        "amount": "400.9", 
                        "homeCurrencyAmount": "801.8", 
                        "type": "Credit"
                    }, 
                    {
                        "accountingCodeName": "Subscription Revenue", 
                        "accountingCodeType": "Sales Revenue", 
                        "amount": "400.9", 
                        "homeCurrencyAmount": "801.8", 
                        "type": "Debit"
                    }
                ], 
                "notes": "my account", 
                "segments": [
                    {
                        "segmentName": "billToCountry", 
                        "segmentValue": "United States"
                    }, 
                    {
                        "segmentName": "billToState", 
                        "segmentValue": "California"
                    }
                ], 
                "transferredToAccounting": "No"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"accountingPeriodName\": \"Nov-2014\", \n    \"currency\": \"USD\", \n    \"journalEntryDate\": \"2014-09-09\", \n    \"journalEntryItems\": [\n        {\n            \"accountingCodeName\": \"Accounts Receivable\", \n            \"accountingCodeType\": \"Deferred Revenue\", \n            \"amount\": \"400.9\", \n            \"homeCurrencyAmount\": \"801.8\", \n            \"type\": \"Credit\"\n        }, \n        {\n            \"accountingCodeName\": \"Subscription Revenue\", \n            \"accountingCodeType\": \"Sales Revenue\", \n            \"amount\": \"400.9\", \n            \"homeCurrencyAmount\": \"801.8\", \n            \"type\": \"Debit\"\n        }\n    ], \n    \"notes\": \"my account\", \n    \"segments\": [\n        {\n            \"segmentName\": \"billToCountry\", \n            \"segmentValue\": \"United States\"\n        }, \n        {\n            \"segmentName\": \"billToState\", \n            \"segmentValue\": \"California\"\n        }\n    ], \n    \"transferredToAccounting\": \"No\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/journal-entries")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"accountingPeriodName\": \"Nov-2014\", \n    \"currency\": \"USD\", \n    \"journalEntryDate\": \"2014-09-09\", \n    \"journalEntryItems\": [\n        {\n            \"accountingCodeName\": \"Accounts Receivable\", \n            \"accountingCodeType\": \"Deferred Revenue\", \n            \"amount\": \"400.9\", \n            \"homeCurrencyAmount\": \"801.8\", \n            \"type\": \"Credit\"\n        }, \n        {\n            \"accountingCodeName\": \"Subscription Revenue\", \n            \"accountingCodeType\": \"Sales Revenue\", \n            \"amount\": \"400.9\", \n            \"homeCurrencyAmount\": \"801.8\", \n            \"type\": \"Debit\"\n        }\n    ], \n    \"notes\": \"my account\", \n    \"segments\": [\n        {\n            \"segmentName\": \"billToCountry\", \n            \"segmentValue\": \"United States\"\n        }, \n        {\n            \"segmentName\": \"billToState\", \n            \"segmentValue\": \"California\"\n        }\n    ], \n    \"transferredToAccounting\": \"No\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/journal-entries", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/journal-entries")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"accountingPeriodName\": \"Nov-2014\", \n    \"currency\": \"USD\", \n    \"journalEntryDate\": \"2014-09-09\", \n    \"journalEntryItems\": [\n        {\n            \"accountingCodeName\": \"Accounts Receivable\", \n            \"accountingCodeType\": \"Deferred Revenue\", \n            \"amount\": \"400.9\", \n            \"homeCurrencyAmount\": \"801.8\", \n            \"type\": \"Credit\"\n        }, \n        {\n            \"accountingCodeName\": \"Subscription Revenue\", \n            \"accountingCodeType\": \"Sales Revenue\", \n            \"amount\": \"400.9\", \n            \"homeCurrencyAmount\": \"801.8\", \n            \"type\": \"Debit\"\n        }\n    ], \n    \"notes\": \"my account\", \n    \"segments\": [\n        {\n            \"segmentName\": \"billToCountry\", \n            \"segmentValue\": \"United States\"\n        }, \n        {\n            \"segmentName\": \"billToState\", \n            \"segmentValue\": \"California\"\n        }\n    ], \n    \"transferredToAccounting\": \"No\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/journal-entries");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"accountingPeriodName\": \"Nov-2014\", \n    \"currency\": \"USD\", \n    \"journalEntryDate\": \"2014-09-09\", \n    \"journalEntryItems\": [\n        {\n            \"accountingCodeName\": \"Accounts Receivable\", \n            \"accountingCodeType\": \"Deferred Revenue\", \n            \"amount\": \"400.9\", \n            \"homeCurrencyAmount\": \"801.8\", \n            \"type\": \"Credit\"\n        }, \n        {\n            \"accountingCodeName\": \"Subscription Revenue\", \n            \"accountingCodeType\": \"Sales Revenue\", \n            \"amount\": \"400.9\", \n            \"homeCurrencyAmount\": \"801.8\", \n            \"type\": \"Debit\"\n        }\n    ], \n    \"notes\": \"my account\", \n    \"segments\": [\n        {\n            \"segmentName\": \"billToCountry\", \n            \"segmentValue\": \"United States\"\n        }, \n        {\n            \"segmentName\": \"billToState\", \n            \"segmentValue\": \"California\"\n        }\n    ], \n    \"transferredToAccounting\": \"No\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/journal-entries/journal-runs/{jr-number}":
    get:
      description: |
        
        This REST API reference describes how to retrieve information about all summary journal entries in a journal run.
      operationId: GET_AllSummaryJournalEntries
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize_finance_revenue"
        - description: Journal run number.
          in: path
          name: jr-number
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    journalEntries:
                      - accountingPeriodName: Dec'16
                        aggregateCurrency: true
                        currency: USD
                        homeCurrency: USD
                        journalEntryDate: 2016-12-31
                        journalEntryItems:
                          - accountingCodeName: Accounts Receivable
                            accountingCodeType: AccountsReceivable
                            amount: 100
                            glAccountName: Accounts Receivable
                            glAccountNumber: 10-001-000-1234
                            homeCurrencyAmount: 100
                            type: Debit
                          - accountingCodeName: Sales Revenue
                            accountingCodeType: SalesRevenue
                            amount: 100
                            glAccountName: Sales Revenue
                            glAccountNumber: 10-001-000-1000
                            homeCurrencyAmount: 100
                            type: Credit
                        notes: note
                        number: JE-00000006
                        segments:
                          - segmentName: Seg1
                            segmentValue: seg value
                        status: Created
                        timePeriodEnd: 2016-12-31
                        timePeriodStart: 2016-12-01
                        transactionType: Invoice Item
                        transferredToAccounting: No
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETJournalEntriesInJournalRunType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List all summary journal entries in a journal run
      tags:
        - Summary Journal Entries
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/journal-entries/journal-runs/{jr-number}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/journal-entries/journal-runs/{jr-number}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/journal-entries/journal-runs/{jr-number}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/journal-entries/journal-runs/{jr-number}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/journal-entries/journal-runs/{jr-number}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/journal-entries/journal-runs/{jr-number}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/journal-entries/{je-number}":
    delete:
      description: |
        This reference describes how to delete a summary journal entry using the REST API.

        You must have the "Delete Cancelled Journal Entry" user permission enabled to delete summary journal entries.

        A summary journal entry must be canceled before it can be deleted.
      operationId: DELETE_SummaryJournalEntry
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: Journal entry number in the format JE-00000001.
          in: path
          name: je-number
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Delete a summary journal entry
      tags:
        - Summary Journal Entries
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/journal-entries/{je-number}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/journal-entries/{je-number}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/journal-entries/{je-number}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/v1/journal-entries/{je-number}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/journal-entries/{je-number}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/journal-entries/{je-number}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      description: |
        This REST API reference describes how to get information about a summary journal entry by its journal entry number.
      operationId: GET_SummaryJournalEntry
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: ""
          in: path
          name: je-number
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountingPeriodName: Jan'16
                    aggregateCurrency: true
                    currency: USD
                    homeCurrency: USD
                    journalEntryDate: 2016-01-31
                    journalEntryItems:
                      - accountingCodeName: Deferred Revenue
                        accountingCodeType: DeferredRevenue
                        amount: 424.08
                        glAccountName: null
                        glAccountNumber: null
                        homeCurrencyAmount: 424.08
                        type: Debit
                      - accountingCodeName: Professional Services Revenue
                        accountingCodeType: SalesRevenue
                        amount: 424.08
                        glAccountName: null
                        glAccountNumber: null
                        homeCurrencyAmount: 424.08
                        type: Credit
                    notes: null
                    number: JE-00000001
                    segments:
                      - segmentName: Customer Code
                        segmentValue: A00000001
                      - segmentName: Charge Type
                        segmentValue: OneTime
                    status: Created
                    success: true
                    timePeriodEnd: 2016-01-31
                    timePeriodStart: 2016-01-01
                    transactionType: Revenue Event Item
                    transferDateTime: null
                    transferredBy: null
                    transferredToAccounting: null
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETJournalEntryDetailType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a summary journal entry
      tags:
        - Summary Journal Entries
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/journal-entries/{je-number}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/journal-entries/{je-number}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/journal-entries/{je-number}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/journal-entries/{je-number}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/journal-entries/{je-number}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/journal-entries/{je-number}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/journal-entries/{je-number}/basic-information":
    put:
      description: |
        
        This REST API reference describes how to update the basic information of a summary journal entry. Request and response field descriptions and sample code are provided.
      operationId: PUT_BasicSummaryJournalEntry
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: Journal entry number in the format JE-00000001.
          in: path
          name: je-number
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUT_BasicSummaryJournalEntryType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Update a summary journal entry
      tags:
        - Summary Journal Entries
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "journalEntryItems": [
                    {
                        "accountingCodeName": "Accounts Receivable", 
                        "type": "Credit"
                    }, 
                    {
                        "accountingCodeName": "", 
                        "type": "Debit"
                    }
                ], 
                "notes": "Transfer to accounting system", 
                "transferredToAccounting": "Yes"
            }' "https://rest.zuora.com/v1/journal-entries/{je-number}/basic-information"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/journal-entries/{je-number}/basic-information');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "journalEntryItems": [
                    {
                        "accountingCodeName": "Accounts Receivable", 
                        "type": "Credit"
                    }, 
                    {
                        "accountingCodeName": "", 
                        "type": "Debit"
                    }
                ], 
                "notes": "Transfer to accounting system", 
                "transferredToAccounting": "Yes"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"journalEntryItems\": [\n        {\n            \"accountingCodeName\": \"Accounts Receivable\", \n            \"type\": \"Credit\"\n        }, \n        {\n            \"accountingCodeName\": \"\", \n            \"type\": \"Debit\"\n        }\n    ], \n    \"notes\": \"Transfer to accounting system\", \n    \"transferredToAccounting\": \"Yes\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/journal-entries/{je-number}/basic-information")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"journalEntryItems\": [\n        {\n            \"accountingCodeName\": \"Accounts Receivable\", \n            \"type\": \"Credit\"\n        }, \n        {\n            \"accountingCodeName\": \"\", \n            \"type\": \"Debit\"\n        }\n    ], \n    \"notes\": \"Transfer to accounting system\", \n    \"transferredToAccounting\": \"Yes\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/journal-entries/{je-number}/basic-information", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/journal-entries/{je-number}/basic-information")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"journalEntryItems\": [\n        {\n            \"accountingCodeName\": \"Accounts Receivable\", \n            \"type\": \"Credit\"\n        }, \n        {\n            \"accountingCodeName\": \"\", \n            \"type\": \"Debit\"\n        }\n    ], \n    \"notes\": \"Transfer to accounting system\", \n    \"transferredToAccounting\": \"Yes\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/journal-entries/{je-number}/basic-information");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"journalEntryItems\": [\n        {\n            \"accountingCodeName\": \"Accounts Receivable\", \n            \"type\": \"Credit\"\n        }, \n        {\n            \"accountingCodeName\": \"\", \n            \"type\": \"Debit\"\n        }\n    ], \n    \"notes\": \"Transfer to accounting system\", \n    \"transferredToAccounting\": \"Yes\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/journal-entries/{je-number}/cancel":
    put:
      description: |
        
        This reference describes how to cancel a summary journal entry using the REST API.
            
        You must have the "Cancel Journal Entry" user permission enabled to cancel summary journal entries.
            
        A summary journal entry cannot be canceled if its Transferred to Accounting status is "Yes" or "Processing".
      operationId: PUT_SummaryJournalEntry
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: Journal entry number in the format JE-00000001.
          in: path
          name: je-number
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Cancel a summary journal entry
      tags:
        - Summary Journal Entries
      x-code-samples:
        - lang: Curl
          source: "curl -X PUT -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" -d '{}' \"https://rest.zuora.com/v1/journal-entries/{je-number}/cancel\""
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/journal-entries/{je-number}/cancel');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/journal-entries/{je-number}/cancel")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/journal-entries/{je-number}/cancel", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/journal-entries/{je-number}/cancel")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/journal-entries/{je-number}/cancel");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/journal-runs:
    post:
      description: |
        This REST API reference describes how to create a journal run. Request and response field descriptions and sample code are provided.
      operationId: POST_JournalRun
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTJournalRunType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    journalRunNumber: JR-00000008
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTJournalRunResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Create a journal run
      tags:
        - Journal Runs
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "accountingPeriodName": "Nov-2014", 
                "journalEntryDate": "2014-11-04", 
                "transactionTypes": [
                    {
                        "type": "Invoice Item"
                    }, 
                    {
                        "type": "Revenue Event Item"
                    }
                ]
            }' "https://rest.zuora.com/v1/journal-runs"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/journal-runs');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "accountingPeriodName": "Nov-2014", 
                "journalEntryDate": "2014-11-04", 
                "transactionTypes": [
                    {
                        "type": "Invoice Item"
                    }, 
                    {
                        "type": "Revenue Event Item"
                    }
                ]
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"accountingPeriodName\": \"Nov-2014\", \n    \"journalEntryDate\": \"2014-11-04\", \n    \"transactionTypes\": [\n        {\n            \"type\": \"Invoice Item\"\n        }, \n        {\n            \"type\": \"Revenue Event Item\"\n        }\n    ]\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/journal-runs")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"accountingPeriodName\": \"Nov-2014\", \n    \"journalEntryDate\": \"2014-11-04\", \n    \"transactionTypes\": [\n        {\n            \"type\": \"Invoice Item\"\n        }, \n        {\n            \"type\": \"Revenue Event Item\"\n        }\n    ]\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/journal-runs", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/journal-runs")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"accountingPeriodName\": \"Nov-2014\", \n    \"journalEntryDate\": \"2014-11-04\", \n    \"transactionTypes\": [\n        {\n            \"type\": \"Invoice Item\"\n        }, \n        {\n            \"type\": \"Revenue Event Item\"\n        }\n    ]\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/journal-runs");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"accountingPeriodName\": \"Nov-2014\", \n    \"journalEntryDate\": \"2014-11-04\", \n    \"transactionTypes\": [\n        {\n            \"type\": \"Invoice Item\"\n        }, \n        {\n            \"type\": \"Revenue Event Item\"\n        }\n    ]\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/journal-runs/{jr-number}":
    delete:
      description: |
        This reference describes how to delete a journal run using the REST API.
                              
         You can only delete journal runs that have already been canceled.
                              
         You must have the "Delete Cancelled Journal Run" Zuora Finance user permission enabled to delete journal runs.
      operationId: DELETE_JournalRun
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            Journal run number. Must be a valid journal run number in the format `JR-00000001`.
          in: path
          name: jr-number
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Delete a journal run
      tags:
        - Journal Runs
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/journal-runs/{jr-number}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/journal-runs/{jr-number}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/journal-runs/{jr-number}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/v1/journal-runs/{jr-number}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/journal-runs/{jr-number}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/journal-runs/{jr-number}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      description: |
        This REST API reference describes how to get information about a journal run. Request and response field descriptions and sample code are provided.
      operationId: GET_JournalRun
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            Journal run number. Must be a valid journal run number in the format `JR-00000001`.
          in: path
          name: jr-number
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    executedOn: 2014-11-15 22:05:12
                    journalEntryDate: 2016-02-02
                    number: JR-00000002
                    segmentationRuleName: s1
                    status: Completed
                    success: true
                    targetEndDate: 2016-03-31
                    targetStartDate: 2016-03-01
                    totalJournalEntryCount: 2
                    transactionTypes:
                      - type: Invoice Item
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETJournalRunType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a journal run
      tags:
        - Journal Runs
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/journal-runs/{jr-number}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/journal-runs/{jr-number}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/journal-runs/{jr-number}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/journal-runs/{jr-number}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/journal-runs/{jr-number}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/journal-runs/{jr-number}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/journal-runs/{jr-number}/cancel":
    put:
      description: |
        This reference describes how to cancel a journal run using the REST API.
                  
        The summary journal entries in the journal run are canceled asynchronously. See the "Example" section below for details.
                  
        You must have the "Cancel Journal Run" Zuora Finance user permission enabled to cancel journal runs.

        ## Notes
        When you cancel a journal run, the summary journal entries associated with that journal run are canceled asynchronously. A response of `{ "success": true }` means only that the specified journal run has a status of "Pending", "Error", or "Completed" and therefore can be canceled, but does not mean that the whole journal run was successfully canceled.

        For example, let's say you want to cancel journal run JR-00000075. The journal run status is "Completed" and it contains ten journal entries. One of the journal entries has its Transferred to Accounting status set to "Yes", meaning that the entry cannot be canceled. The workflow might go as follows:
        1. You make an API call to cancel the journal run.
        2. The journal run status is "Completed", so you receive a response of `{ "success": true }`.
        3. Zuora begins asynchronously canceling journal entries associated with the journal run. The journal entry whose Transferred to Accounting status is "Yes" fails to be canceled. The cancelation process continues, and the other journal entries are successfully canceled.
        4. The journal run status remains as "Completed". The status does not change to "Canceled" because the journal run still contains a journey entry that is not canceled.
      operationId: PUT_JournalRun
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            Journal run number. Must be a valid journal run number in the format JR-00000001. 
            You can only cancel a journal run whose status is "Pending", "Error", or "Completed".
          in: path
          name: jr-number
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Cancel a journal run
      tags:
        - Journal Runs
      x-code-samples:
        - lang: Curl
          source: "curl -X PUT -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" -d '{}' \"https://rest.zuora.com/v1/journal-runs/{jr-number}/cancel\""
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/journal-runs/{jr-number}/cancel');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/journal-runs/{jr-number}/cancel")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/journal-runs/{jr-number}/cancel", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/journal-runs/{jr-number}/cancel")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/journal-runs/{jr-number}/cancel");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/notification-history/callout:
    get:
      description: |
        Describes how to get a notification history for callouts.
      operationId: GET_CalloutHistory
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - description: The final date and time of records to be returned. Defaults to now. Use format yyyy-MM-ddTHH:mm:ss.
          in: query
          name: endTime
          required: false
          schema:
            format: date-time
            type: string
        - description: The initial date and time of records to be returned. Defaults to (end time - 1 day). Use format yyyy-MM-ddTHH:mm:ss.
          in: query
          name: startTime
          required: false
          schema:
            format: date-time
            type: string
        - description: |
            The ID of an object that triggered a callout notification. 

            **Note**: If the `objectId` is present in query parameters, the `eventCategory` will be ignored and the `failedOnly` will be treated as `false`.
          in: query
          name: objectId
          required: false
          schema:
            type: string
        - description: |
            If `true`, only return failed records. If `false`, return all records in the given date range. The default value is `true`.

            **Note**: The `failedOnly` will be treated as `false` if the `objectId` is present in query parameters.
          in: query
          name: failedOnly
          required: false
          schema:
            type: boolean
        - description: |
            Category of records to be returned by event category.

            The following formats are supported:
            * `{Event Type Namespace}:{Event Type Name}` if the Custom Events feature is enabled in your tenant. For example: `user.notification:NewSubscriptionCreated`.
            * Numeric code of the event category if the Custom Events feature is not enabled in your tenant. For example, `1210`. See [Event Category Code](https://knowledgecenter.zuora.com/DC_Developers/AA_REST_API/Event_Categories_for_Notification_Histories) for more information.

            **Note**: The `eventCategory` will be ignored if the `objectId` is present in query parameters.
          in: query
          name: eventCategory
          required: false
          schema:
            type: string
        - description: ""
          in: query
          name: includeResponseContent
          required: false
          schema:
            type: boolean
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    calloutHistories:
                      - attemptedNum: 3
                        createTime: 2015-01-13T03:33:51
                        eventCategory: 1210
                        eventContext:
                          <Account.Currency>: USD
                          <Account.CurrencySymbol>: $
                          <Account.ID>: 402881e54ade80c8014ade884c48000b
                          <Account.Name>: test
                          <Account.Number>: A00000001
                          <BillToContact.FirstName>: Mary
                          <BillToContact.ID>: 402881e54ade80c8014ade884c51000c
                          <BillToContact.LastName>: Smith
                          <BillToContact.WorkEmail>: smith@example.com
                          <BillingAccount.ID>: 402881e54ade80c8014ade884c48000b
                          <Contact.ID>: 402881e54ade80c8014ade884c51000c
                          <Event.Category>: SubscriptionCreated
                          <Event.ID>: 402892fa47866fe701478674a4ff0093
                          <Event.Timestamp>: 2015-01-13T22:31:43.248+0800
                          <Notification>:
                            EmailTemplate: New Subscription Created Default Email Template
                            Event: New Subscription Created
                            Profile: Default Profile
                            calloutAction: true
                            emailAction: true
                            id: 402892fa47866fe701478674a5c100eb
                            updatedBy: 402892fa47866fe7014786749d9b0002
                            updatedOn: 01/12/2015 03:23:08
                          <Object.ID>: 402881e54ae37f31014ae3b514e100fd
                          <Subscription.AutoRenew>: No
                          <Subscription.CMRR>: $250.00
                          <Subscription.ContractEffective>: 01/01/2016
                          <Subscription.CreateDate>: 01/13/2015
                          <Subscription.CreatedBy>: smith@example.com
                          <Subscription.CustomerAcceptance>: 01/01/2016
                          <Subscription.ID>: 402881e54ae37f31014ae3b514e100fd
                          <Subscription.InitialTerm>: "50"
                          <Subscription.RenewalTerm>: "0"
                          <Subscription.ServiceActivation>: 01/01/2016
                          <Subscription.SubscriptionDetailTable>:
                            Charge Name: recurringcharge
                            Charge Type: Recurring
                            Effective Start Date: 01 / 01 / 2016
                            QTY: 5
                            Total: 250
                            Unit Price: 50
                          <Subscription.SubscriptionName>: A-S00000003
                          <Subscription.TCV>: $12,500.00
                          <Subscription.TermEndDate>: 03/01/2020
                          <Subscription.TermSetting>: termed
                          <Subscription.TermStartDate>: 01/01/2016
                        notification: New Subscription Created
                        requestMethod: POST
                        requestUrl: https://www.google.com
                        responseCode: 405
                    nextPage: https://localhost:8080/apps/v1/notification-history/callout?page=2&pageSize=1&startTime=2015-01-12T00:00:00&endTime=2015-01-15T00:00:00&failedOnly=false&eventCategory=1000
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETCalloutHistoryVOsType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List callout notification histories
      tags:
        - Notifications
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/notification-history/callout"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/notification-history/callout');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/notification-history/callout")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/notification-history/callout", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/notification-history/callout")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/notification-history/callout");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  /v1/notification-history/email:
    get:
      description: |
        Describes how to get a notification history for notification emails.


        ## Notes
        Request parameters and their values may be appended with a "?" following the HTTPS GET request.  Additional request parameter are separated by "&". 

        For example:

        `GET https://rest.zuora.com/v1/notification-history/email?startTime=2015-01-12T00:00:00&endTime=2015-01-15T00:00:00&failedOnly=false&eventCategory=1000&pageSize=1`
      operationId: GET_EmailHistory
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - description: The end date and time of records to be returned. Defaults to now. Use format yyyy-MM-ddTHH:mm:ss. The maximum date range (endTime - startTime) is three days.
          in: query
          name: endTime
          required: false
          schema:
            format: date-time
            type: string
        - description: The initial date and time of records to be returned. Defaults to (end time - 1 day). Use format yyyy-MM-ddTHH:mm:ss. The maximum date range (endTime - startTime) is three days.
          in: query
          name: startTime
          required: false
          schema:
            format: date-time
            type: string
        - description: |
            The Id of an object that triggered an email notification.

            **Note**: If the `objectId` is present in query parameters, the `eventCategory` will be ignored and the `failedOnly` will be treated as `false`.
          in: query
          name: objectId
          required: false
          schema:
            type: string
        - description: |
            If `true`, only returns failed records. When `false`, returns all records in the given date range. Defaults to `true` when not specified.

            **Note**: The `failedOnly` will be treated as `false` if the `objectId` is present in query parameters.
          in: query
          name: failedOnly
          required: false
          schema:
            type: boolean
        - description: |
            Category of records to be returned by event category.

            The following formats are supported:
            * `{Event Type Namespace}:{Event Type Name}` if the Custom Events feature is enabled in your tenant. For example: `user.notification:NewSubscriptionCreated`.
            * Numeric code of the event category if the Custom Events feature is not enabled in your tenant. For example, `1210`. See [Event Category Code](https://knowledgecenter.zuora.com/DC_Developers/AA_REST_API/Event_Categories_for_Notification_Histories) for more information.

            **Note**: The `eventCategory` will be ignored if the `objectId` is present in query parameters.
          in: query
          name: eventCategory
          required: false
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    emailHistories:
                      - bcc: ceo@example.com,cto@example.com
                        cc: bob@example.com,chris@example.com
                        errorMessage: null
                        eventCategory: 1210
                        fromEmail: no-reply@example.com
                        notification: New Subscription Created
                        replyTo: supportexample.com
                        result: OK
                        sendTime: 2015-01-13T03:31:43
                        subject: New subscription A-S00000003 was created and activated
                        toEmail: smith@example.com
                    nextPage: https://localhost:8080/apps/v1/notification-history/email?page=2&pageSize=1&startTime=2015-01-12T00:00:00&endTime=2015-01-15T00:00:00&failedOnly=false&eventCategory=1000
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETEmailHistoryVOsType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List email notification histories
      tags:
        - Notifications
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/notification-history/email"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/notification-history/email');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/notification-history/email")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/notification-history/email", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/notification-history/email")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/notification-history/email");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  /v1/object/account:
    post:
      description: |
        Creates an account without creating any associated objects such as subscriptions.
      operationId: Object_POSTAccount
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyCreateAccount"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    Id: 2c93808457d787030157e0321fdf4fab
                    Success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "400":
          content:
            application/json:
              examples:
                response:
                  value:
                    Errors:
                      - Code: INVALID_VALUE
                        Message: The account number 123xProxy is invalid.
                    Success: false
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyBadRequestResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Create an account"
      tags:
        - Accounts
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "AccountNumber": "AN_1476935163869", 
                "AutoPay": false, 
                "Batch": "Batch1", 
                "BillCycleDay": 1, 
                "CrmId": "crmid", 
                "Currency": "USD", 
                "InvoiceTemplateId": "2c93808457d787030157e03208864f97", 
                "Name": "AC_1476935163869", 
                "Notes": "this is notes", 
                "PaymentTerm": "Due Upon Receipt", 
                "Status": "Draft"
            }' "https://rest.zuora.com/v1/object/account"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/account');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "AccountNumber": "AN_1476935163869", 
                "AutoPay": false, 
                "Batch": "Batch1", 
                "BillCycleDay": 1, 
                "CrmId": "crmid", 
                "Currency": "USD", 
                "InvoiceTemplateId": "2c93808457d787030157e03208864f97", 
                "Name": "AC_1476935163869", 
                "Notes": "this is notes", 
                "PaymentTerm": "Due Upon Receipt", 
                "Status": "Draft"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"AccountNumber\": \"AN_1476935163869\", \n    \"AutoPay\": false, \n    \"Batch\": \"Batch1\", \n    \"BillCycleDay\": 1, \n    \"CrmId\": \"crmid\", \n    \"Currency\": \"USD\", \n    \"InvoiceTemplateId\": \"2c93808457d787030157e03208864f97\", \n    \"Name\": \"AC_1476935163869\", \n    \"Notes\": \"this is notes\", \n    \"PaymentTerm\": \"Due Upon Receipt\", \n    \"Status\": \"Draft\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/account")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"AccountNumber\": \"AN_1476935163869\", \n    \"AutoPay\": false, \n    \"Batch\": \"Batch1\", \n    \"BillCycleDay\": 1, \n    \"CrmId\": \"crmid\", \n    \"Currency\": \"USD\", \n    \"InvoiceTemplateId\": \"2c93808457d787030157e03208864f97\", \n    \"Name\": \"AC_1476935163869\", \n    \"Notes\": \"this is notes\", \n    \"PaymentTerm\": \"Due Upon Receipt\", \n    \"Status\": \"Draft\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/object/account", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/account")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"AccountNumber\": \"AN_1476935163869\", \n    \"AutoPay\": false, \n    \"Batch\": \"Batch1\", \n    \"BillCycleDay\": 1, \n    \"CrmId\": \"crmid\", \n    \"Currency\": \"USD\", \n    \"InvoiceTemplateId\": \"2c93808457d787030157e03208864f97\", \n    \"Name\": \"AC_1476935163869\", \n    \"Notes\": \"this is notes\", \n    \"PaymentTerm\": \"Due Upon Receipt\", \n    \"Status\": \"Draft\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/account");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"AccountNumber\": \"AN_1476935163869\", \n    \"AutoPay\": false, \n    \"Batch\": \"Batch1\", \n    \"BillCycleDay\": 1, \n    \"CrmId\": \"crmid\", \n    \"Currency\": \"USD\", \n    \"InvoiceTemplateId\": \"2c93808457d787030157e03208864f97\", \n    \"Name\": \"AC_1476935163869\", \n    \"Notes\": \"this is notes\", \n    \"PaymentTerm\": \"Due Upon Receipt\", \n    \"Status\": \"Draft\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/object/account/{id}":
    delete:
      description: |
        Deletes a specific account asynchronously. 

        **Note:** When [Orders](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AA_Overview_of_Orders#Orders) is enabled, before deleting a customer account, you must delete all related orders and subscriptions where this account has been referenced as a subscription owner or invoice owner.
      operationId: Object_DELETEAccount
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    id: 2c93808457d787030157e031b1ea4a98
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyDeleteResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Delete an account"
      tags:
        - Accounts
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/account/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/account/{id}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/account/{id}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/v1/object/account/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/account/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/account/{id}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      description: |
        Retrieves the information about one specific account.
      operationId: Object_GETAccount
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object fields to return
          in: query
          name: fields
          required: false
          schema:
            type: string
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    AccountNumber: AN_1476935136687
                    AllowInvoiceEdit: false
                    AutoPay: true
                    Balance: 0
                    Batch: Batch1
                    BcdSettingOption: ManualSet
                    BillCycleDay: 1
                    BillToId: 2c93808457d787030157e031b6444a9e
                    CreatedById: 2c93808457d787030157e0319d644922
                    CreatedDate: 2016-10-20T05:45:36.000+02:00
                    CreditBalance: 0
                    CrmId: crmid
                    Currency: USD
                    DefaultPaymentMethodId: 2c93808457d787030157e031b6d24a9f
                    Id: 2c93808457d787030157e031b5b74a9d
                    InvoiceDeliveryPrefsEmail: false
                    InvoiceDeliveryPrefsPrint: false
                    InvoiceTemplateId: 2c93808457d787030157e031a33c4a94
                    Name: AC_1476935136687
                    Notes: this is notes
                    PaymentTerm: Due Upon Receipt
                    SoldToId: 2c93808457d787030157e031b6444a9e
                    Status: Draft
                    TotalInvoiceBalance: 0
                    UpdatedById: 2c93808457d787030157e0319d644922
                    UpdatedDate: 2016-10-20T05:45:37.000+02:00
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetAccount"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    done: true
                    records: {}
                    size: 0
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Retrieve an account"
      tags:
        - Accounts
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/account/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/account/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/account/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/object/account/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/account/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/account/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: |
        Updates an account.
      operationId: Object_PUTAccount
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyModifyAccount"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    Id: 2c93808457d787030157e0321fdf4fab
                    Success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Update an account"
      tags:
        - Accounts
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "AccountNumber": "AN_1476935163869", 
                "AutoPay": true, 
                "Batch": "Batch1", 
                "BillCycleDay": 1, 
                "BillToId": "2c93808457d787030157e03220684fac", 
                "CrmId": "crmid", 
                "Currency": "USD", 
                "DefaultPaymentMethodId": "2c93808457d787030157e03220ec4fad", 
                "Id": "2c93808457d787030157e0321fdf4fab", 
                "InvoiceTemplateId": "2c93808457d787030157e03208864f97", 
                "Name": "AC_1476935163869", 
                "Notes": "this is notes", 
                "PaymentTerm": "Due Upon Receipt", 
                "SoldToId": "2c93808457d787030157e03220684fac", 
                "Status": "Active"
            }' "https://rest.zuora.com/v1/object/account/{id}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/account/{id}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "AccountNumber": "AN_1476935163869", 
                "AutoPay": true, 
                "Batch": "Batch1", 
                "BillCycleDay": 1, 
                "BillToId": "2c93808457d787030157e03220684fac", 
                "CrmId": "crmid", 
                "Currency": "USD", 
                "DefaultPaymentMethodId": "2c93808457d787030157e03220ec4fad", 
                "Id": "2c93808457d787030157e0321fdf4fab", 
                "InvoiceTemplateId": "2c93808457d787030157e03208864f97", 
                "Name": "AC_1476935163869", 
                "Notes": "this is notes", 
                "PaymentTerm": "Due Upon Receipt", 
                "SoldToId": "2c93808457d787030157e03220684fac", 
                "Status": "Active"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"AccountNumber\": \"AN_1476935163869\", \n    \"AutoPay\": true, \n    \"Batch\": \"Batch1\", \n    \"BillCycleDay\": 1, \n    \"BillToId\": \"2c93808457d787030157e03220684fac\", \n    \"CrmId\": \"crmid\", \n    \"Currency\": \"USD\", \n    \"DefaultPaymentMethodId\": \"2c93808457d787030157e03220ec4fad\", \n    \"Id\": \"2c93808457d787030157e0321fdf4fab\", \n    \"InvoiceTemplateId\": \"2c93808457d787030157e03208864f97\", \n    \"Name\": \"AC_1476935163869\", \n    \"Notes\": \"this is notes\", \n    \"PaymentTerm\": \"Due Upon Receipt\", \n    \"SoldToId\": \"2c93808457d787030157e03220684fac\", \n    \"Status\": \"Active\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/account/{id}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"AccountNumber\": \"AN_1476935163869\", \n    \"AutoPay\": true, \n    \"Batch\": \"Batch1\", \n    \"BillCycleDay\": 1, \n    \"BillToId\": \"2c93808457d787030157e03220684fac\", \n    \"CrmId\": \"crmid\", \n    \"Currency\": \"USD\", \n    \"DefaultPaymentMethodId\": \"2c93808457d787030157e03220ec4fad\", \n    \"Id\": \"2c93808457d787030157e0321fdf4fab\", \n    \"InvoiceTemplateId\": \"2c93808457d787030157e03208864f97\", \n    \"Name\": \"AC_1476935163869\", \n    \"Notes\": \"this is notes\", \n    \"PaymentTerm\": \"Due Upon Receipt\", \n    \"SoldToId\": \"2c93808457d787030157e03220684fac\", \n    \"Status\": \"Active\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/object/account/{id}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/account/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"AccountNumber\": \"AN_1476935163869\", \n    \"AutoPay\": true, \n    \"Batch\": \"Batch1\", \n    \"BillCycleDay\": 1, \n    \"BillToId\": \"2c93808457d787030157e03220684fac\", \n    \"CrmId\": \"crmid\", \n    \"Currency\": \"USD\", \n    \"DefaultPaymentMethodId\": \"2c93808457d787030157e03220ec4fad\", \n    \"Id\": \"2c93808457d787030157e0321fdf4fab\", \n    \"InvoiceTemplateId\": \"2c93808457d787030157e03208864f97\", \n    \"Name\": \"AC_1476935163869\", \n    \"Notes\": \"this is notes\", \n    \"PaymentTerm\": \"Due Upon Receipt\", \n    \"SoldToId\": \"2c93808457d787030157e03220684fac\", \n    \"Status\": \"Active\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/account/{id}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"AccountNumber\": \"AN_1476935163869\", \n    \"AutoPay\": true, \n    \"Batch\": \"Batch1\", \n    \"BillCycleDay\": 1, \n    \"BillToId\": \"2c93808457d787030157e03220684fac\", \n    \"CrmId\": \"crmid\", \n    \"Currency\": \"USD\", \n    \"DefaultPaymentMethodId\": \"2c93808457d787030157e03220ec4fad\", \n    \"Id\": \"2c93808457d787030157e0321fdf4fab\", \n    \"InvoiceTemplateId\": \"2c93808457d787030157e03208864f97\", \n    \"Name\": \"AC_1476935163869\", \n    \"Notes\": \"this is notes\", \n    \"PaymentTerm\": \"Due Upon Receipt\", \n    \"SoldToId\": \"2c93808457d787030157e03220684fac\", \n    \"Status\": \"Active\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/object/amendment/{id}":
    delete:
      description: |
        
        Invoiced amendments cannot usually be deleted. One exception to this rule is auto-renew amendments. You can delete the last auto-renew amendment even if an invoice has been generated.
      operationId: Object_DELETEAmendment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    id: 2c93808457d787030157e02e3a541ef4
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyDeleteResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Delete an amendment"
      tags:
        - Amendments
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/amendment/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/amendment/{id}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/amendment/{id}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/v1/object/amendment/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/amendment/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/amendment/{id}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      description: ""
      operationId: Object_GETAmendment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object fields to return
          in: query
          name: fields
          required: false
          schema:
            type: string
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    Code: A-AM00000004
                    ContractEffectiveDate: 2016-10-20
                    CreatedById: 2c93808457d787030157e02e0bcf1d0c
                    CreatedDate: 2016-10-20T05:41:50.000+02:00
                    CurrentTermPeriodType: Month
                    CustomerAcceptanceDate: 2016-10-20
                    Description: AMtssl1bnuq1
                    EffectiveDate: 2016-10-20
                    Id: 2c93808457d787030157e02e430c1f15
                    Name: AMtssl1bnuq1_new
                    RenewalSetting: RENEW_WITH_SPECIFIC_TERM
                    RenewalTermPeriodType: Month
                    ServiceActivationDate: 2016-10-20
                    Status: Draft
                    SubscriptionId: 2c93808457d787030157e02e3ef61f02
                    Type: NewProduct
                    UpdatedById: 2c93808457d787030157e02e0bcf1d0c
                    UpdatedDate: 2016-10-20T05:41:50.000+02:00
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetAmendment"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    done: true
                    records: {}
                    size: 0
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Retrieve an amendment"
      tags:
        - Amendments
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/amendment/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/amendment/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/amendment/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/object/amendment/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/amendment/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/amendment/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: ""
      operationId: Object_PUTAmendment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyModifyAmendment"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    Id: 2c93808457d787030157e02e430c1f15
                    Success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Update an amendment"
      tags:
        - Amendments
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "Id": "2c93808457d787030157e02e430c1f15", 
                "Name": "AMtssl1bnuq1_new"
            }' "https://rest.zuora.com/v1/object/amendment/{id}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/amendment/{id}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "Id": "2c93808457d787030157e02e430c1f15", 
                "Name": "AMtssl1bnuq1_new"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"Id\": \"2c93808457d787030157e02e430c1f15\", \n    \"Name\": \"AMtssl1bnuq1_new\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/amendment/{id}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"Id\": \"2c93808457d787030157e02e430c1f15\", \n    \"Name\": \"AMtssl1bnuq1_new\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/object/amendment/{id}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/amendment/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"Id\": \"2c93808457d787030157e02e430c1f15\", \n    \"Name\": \"AMtssl1bnuq1_new\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/amendment/{id}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"Id\": \"2c93808457d787030157e02e430c1f15\", \n    \"Name\": \"AMtssl1bnuq1_new\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/object/bill-run:
    post:
      description: |
        Creates an ad hoc bill run or a single account or multiple customer accounts.

        When creating a single account ad hoc bill run, your request must include `AccountId` and must not include `Batch` or `BillCycleDay`. 

        If more than 500 bill runs created by using this operation are in Pending status, no more bill runs can be created by using this operation.
      operationId: Object_POSTBillRun
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyCreateBillRun"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    Id: 2c92c0f959d961e1015a0872b69a7347
                    Success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "400":
          content:
            application/json:
              examples:
                response:
                  value:
                    Errors:
                      - Code: INVALID_VALUE
                        Message: The account number 123xProxy is invalid.
                    Success: false
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyBadRequestResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Create a bill run"
      tags:
        - Bill Run
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "AutoEmail": "false", 
                "AutoPost": "false", 
                "AutoRenewal": "false", 
                "Batch": "Batch1", 
                "BillCycleDay": "2", 
                "ChargeTypeToExclude": "OneTime, Usage", 
                "InvoiceDate": "2017-02-04", 
                "NoEmailForZeroAmountInvoice": "false", 
                "TargetDate": "2017-02-04"
            }' "https://rest.zuora.com/v1/object/bill-run"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/bill-run');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "AutoEmail": "false", 
                "AutoPost": "false", 
                "AutoRenewal": "false", 
                "Batch": "Batch1", 
                "BillCycleDay": "2", 
                "ChargeTypeToExclude": "OneTime, Usage", 
                "InvoiceDate": "2017-02-04", 
                "NoEmailForZeroAmountInvoice": "false", 
                "TargetDate": "2017-02-04"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"AutoEmail\": \"false\", \n    \"AutoPost\": \"false\", \n    \"AutoRenewal\": \"false\", \n    \"Batch\": \"Batch1\", \n    \"BillCycleDay\": \"2\", \n    \"ChargeTypeToExclude\": \"OneTime, Usage\", \n    \"InvoiceDate\": \"2017-02-04\", \n    \"NoEmailForZeroAmountInvoice\": \"false\", \n    \"TargetDate\": \"2017-02-04\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/bill-run")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"AutoEmail\": \"false\", \n    \"AutoPost\": \"false\", \n    \"AutoRenewal\": \"false\", \n    \"Batch\": \"Batch1\", \n    \"BillCycleDay\": \"2\", \n    \"ChargeTypeToExclude\": \"OneTime, Usage\", \n    \"InvoiceDate\": \"2017-02-04\", \n    \"NoEmailForZeroAmountInvoice\": \"false\", \n    \"TargetDate\": \"2017-02-04\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/object/bill-run", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/bill-run")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"AutoEmail\": \"false\", \n    \"AutoPost\": \"false\", \n    \"AutoRenewal\": \"false\", \n    \"Batch\": \"Batch1\", \n    \"BillCycleDay\": \"2\", \n    \"ChargeTypeToExclude\": \"OneTime, Usage\", \n    \"InvoiceDate\": \"2017-02-04\", \n    \"NoEmailForZeroAmountInvoice\": \"false\", \n    \"TargetDate\": \"2017-02-04\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/bill-run");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"AutoEmail\": \"false\", \n    \"AutoPost\": \"false\", \n    \"AutoRenewal\": \"false\", \n    \"Batch\": \"Batch1\", \n    \"BillCycleDay\": \"2\", \n    \"ChargeTypeToExclude\": \"OneTime, Usage\", \n    \"InvoiceDate\": \"2017-02-04\", \n    \"NoEmailForZeroAmountInvoice\": \"false\", \n    \"TargetDate\": \"2017-02-04\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/object/bill-run/{id}":
    delete:
      description: |
        Deletes a bill run. 


        When deleting a bill run, the logic is the same as when using the UI to delete a bill run. The only required parameter is `BillRunId`. The Status for the bill run must be `Canceled` in order to delete a bill run.
      operationId: Object_DELETEBillRun
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    Id: 2c92c0f959d961e1015a0872b69a7347
                    Success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyDeleteResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Delete a bill run"
      tags:
        - Bill Run
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/bill-run/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/bill-run/{id}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/bill-run/{id}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/v1/object/bill-run/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/bill-run/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/bill-run/{id}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      description: |
        Retrieves information about a bill run. 


        Business operations depending on the completion of the bill run will not be available while the bill run query returns `PostInProgress`. Upon completion of the bill run, a query will return `Posted`.
      operationId: Object_GETBillRun
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object fields to return
          in: query
          name: fields
          required: false
          schema:
            type: string
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    AutoEmail: false
                    AutoPost: false
                    AutoRenewal: false
                    Batch: Batch1
                    BillCycleDay: AllBillCycleDays
                    BillRunNumber: BR-00002572
                    CreatedById: 2c92c0f956bc8fcb0156f8eee04b4d54
                    CreatedDate: 2017-01-31T19:00:01.000-08:00
                    ExecutedDate: 2017-02-01T19:00:00.000-08:00
                    Id: 2c92c09459d949220159f79d592f7e1a
                    InvoiceDate: 2017-02-01
                    InvoicesEmailed: false
                    NoEmailForZeroAmountInvoice: false
                    NumberOfAccounts: 1
                    NumberOfInvoices: 1
                    Status: Completed
                    TargetDate: 2017-02-20
                    UpdatedById: 2c92c0f956bc8fcb0156f8eee04b4d54
                    UpdatedDate: 2017-02-01T19:00:00.000-08:00
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetBillRun"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    done: true
                    records: {}
                    size: 0
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Retrieve a bill run"
      tags:
        - Bill Run
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/bill-run/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/bill-run/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/bill-run/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/object/bill-run/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/bill-run/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/bill-run/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: |
        Posts or cancels a bill run. 


        ## Post a Bill Run

        Posting a bill run is an asynchronous operation. To post a bill run, the current bill run must have a status of `Completed`.

        When a bill run is posted, its status is changed to `PostInProgress`. Once all invoices for this bill run are posted then its status is changed to `Posted`.   

        When you post a bill run and query the status of a bill run, you will get one of the following results `PostInProgress`, `Completed`, or `Posted`. If all invoices in the bill run are posted, then the status of the bill run is `Posted`. If one or more invoices fail to post, the status will change back to `Completed` and you will need to post the bill run again.

        ## Cancel a Bill Run

        Canceling a bill run is an asynchronous operation. When canceling a bill run, the logic is the same as when using the UI to cancel a bill run. You need to provide the `BillRunId`, and set the Status to `Canceled`. 

        When canceling a bill run, consider the following:

        * Canceling a bill run with a `Completed` status.
          * Only the current bill run will be canceled.
        * Canceling a bill run with a `Pending` status.
          * When canceling an Ad-hoc bill run, only the current bill run will be canceled.
          * When canceling a scheduled bill, all scheduled bill runs will be canceled.

        The Cancel operation may not be successful. Its success depends on its current business validation. Only a bill run that has no posted invoices can be canceled. If any posted invoices belong to the bill run then an invalid value exception will be thrown with the message, "The Bill Run cannot be Cancelled, There are Posted invoices."
      operationId: Object_PUTBillRun
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyModifyBillRun"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    Id: 2c92c0f959d961e1015a0872b69a7347
                    Success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Post or cancel a bill run"
      tags:
        - Bill Run
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "InvoiceDate": "2020-02-18", 
                "Status": "Posted"
            }' "https://rest.zuora.com/v1/object/bill-run/{id}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/bill-run/{id}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "InvoiceDate": "2020-02-18", 
                "Status": "Posted"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"InvoiceDate\": \"2020-02-18\", \n    \"Status\": \"Posted\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/bill-run/{id}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"InvoiceDate\": \"2020-02-18\", \n    \"Status\": \"Posted\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/object/bill-run/{id}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/bill-run/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"InvoiceDate\": \"2020-02-18\", \n    \"Status\": \"Posted\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/bill-run/{id}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"InvoiceDate\": \"2020-02-18\", \n    \"Status\": \"Posted\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/object/communication-profile/{id}":
    get:
      description: ""
      operationId: Object_GETCommunicationProfile
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object fields to return
          in: query
          name: fields
          required: false
          schema:
            type: string
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetCommunicationProfile"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    done: true
                    records: {}
                    size: 0
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Retrieve a communication profile"
      tags:
        - Communication Profiles
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/communication-profile/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/communication-profile/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/communication-profile/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/object/communication-profile/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/communication-profile/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/communication-profile/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  /v1/object/contact:
    post:
      description: |
        Creates a contact for a specified account.
      operationId: Object_POSTContact
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyCreateContact"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    Id: 2c93808457d787030157e03220684fac
                    Success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "400":
          content:
            application/json:
              examples:
                response:
                  value:
                    Errors:
                      - Code: INVALID_VALUE
                        Message: The account number 123xProxy is invalid.
                    Success: false
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyBadRequestResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Create a contact"
      tags:
        - Contacts
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "AccountId": "2c93808457d787030157e0321fdf4fab", 
                "Address1": "312 2nd Ave W", 
                "City": "Seattle", 
                "Country": "United States", 
                "Description": "desc", 
                "Fax": "123456", 
                "FirstName": "FN1476935164020", 
                "HomePhone": "86123456789", 
                "LastName": "LN1476935164020", 
                "MobilePhone": "8613312345678", 
                "NickName": "this is nick name", 
                "OtherPhone": "11111111111111111", 
                "OtherPhoneType": "Work", 
                "PersonalEmail": "home@example.com", 
                "PostalCode": "98119", 
                "State": "Washington", 
                "TaxRegion": "CA", 
                "WorkEmail": "work@example.com"
            }' "https://rest.zuora.com/v1/object/contact"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/contact');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "AccountId": "2c93808457d787030157e0321fdf4fab", 
                "Address1": "312 2nd Ave W", 
                "City": "Seattle", 
                "Country": "United States", 
                "Description": "desc", 
                "Fax": "123456", 
                "FirstName": "FN1476935164020", 
                "HomePhone": "86123456789", 
                "LastName": "LN1476935164020", 
                "MobilePhone": "8613312345678", 
                "NickName": "this is nick name", 
                "OtherPhone": "11111111111111111", 
                "OtherPhoneType": "Work", 
                "PersonalEmail": "home@example.com", 
                "PostalCode": "98119", 
                "State": "Washington", 
                "TaxRegion": "CA", 
                "WorkEmail": "work@example.com"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"AccountId\": \"2c93808457d787030157e0321fdf4fab\", \n    \"Address1\": \"312 2nd Ave W\", \n    \"City\": \"Seattle\", \n    \"Country\": \"United States\", \n    \"Description\": \"desc\", \n    \"Fax\": \"123456\", \n    \"FirstName\": \"FN1476935164020\", \n    \"HomePhone\": \"86123456789\", \n    \"LastName\": \"LN1476935164020\", \n    \"MobilePhone\": \"8613312345678\", \n    \"NickName\": \"this is nick name\", \n    \"OtherPhone\": \"11111111111111111\", \n    \"OtherPhoneType\": \"Work\", \n    \"PersonalEmail\": \"home@example.com\", \n    \"PostalCode\": \"98119\", \n    \"State\": \"Washington\", \n    \"TaxRegion\": \"CA\", \n    \"WorkEmail\": \"work@example.com\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/contact")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"AccountId\": \"2c93808457d787030157e0321fdf4fab\", \n    \"Address1\": \"312 2nd Ave W\", \n    \"City\": \"Seattle\", \n    \"Country\": \"United States\", \n    \"Description\": \"desc\", \n    \"Fax\": \"123456\", \n    \"FirstName\": \"FN1476935164020\", \n    \"HomePhone\": \"86123456789\", \n    \"LastName\": \"LN1476935164020\", \n    \"MobilePhone\": \"8613312345678\", \n    \"NickName\": \"this is nick name\", \n    \"OtherPhone\": \"11111111111111111\", \n    \"OtherPhoneType\": \"Work\", \n    \"PersonalEmail\": \"home@example.com\", \n    \"PostalCode\": \"98119\", \n    \"State\": \"Washington\", \n    \"TaxRegion\": \"CA\", \n    \"WorkEmail\": \"work@example.com\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/object/contact", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/contact")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"AccountId\": \"2c93808457d787030157e0321fdf4fab\", \n    \"Address1\": \"312 2nd Ave W\", \n    \"City\": \"Seattle\", \n    \"Country\": \"United States\", \n    \"Description\": \"desc\", \n    \"Fax\": \"123456\", \n    \"FirstName\": \"FN1476935164020\", \n    \"HomePhone\": \"86123456789\", \n    \"LastName\": \"LN1476935164020\", \n    \"MobilePhone\": \"8613312345678\", \n    \"NickName\": \"this is nick name\", \n    \"OtherPhone\": \"11111111111111111\", \n    \"OtherPhoneType\": \"Work\", \n    \"PersonalEmail\": \"home@example.com\", \n    \"PostalCode\": \"98119\", \n    \"State\": \"Washington\", \n    \"TaxRegion\": \"CA\", \n    \"WorkEmail\": \"work@example.com\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/contact");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"AccountId\": \"2c93808457d787030157e0321fdf4fab\", \n    \"Address1\": \"312 2nd Ave W\", \n    \"City\": \"Seattle\", \n    \"Country\": \"United States\", \n    \"Description\": \"desc\", \n    \"Fax\": \"123456\", \n    \"FirstName\": \"FN1476935164020\", \n    \"HomePhone\": \"86123456789\", \n    \"LastName\": \"LN1476935164020\", \n    \"MobilePhone\": \"8613312345678\", \n    \"NickName\": \"this is nick name\", \n    \"OtherPhone\": \"11111111111111111\", \n    \"OtherPhoneType\": \"Work\", \n    \"PersonalEmail\": \"home@example.com\", \n    \"PostalCode\": \"98119\", \n    \"State\": \"Washington\", \n    \"TaxRegion\": \"CA\", \n    \"WorkEmail\": \"work@example.com\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/object/contact/{id}":
    delete:
      description: |
        Deletes a contact.
      operationId: Object_DELETEContact
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    id: 2c93808457d787030157e02e5b26208f
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyDeleteResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Delete a contact"
      tags:
        - Contacts
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/contact/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/contact/{id}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/contact/{id}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/v1/object/contact/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/contact/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/contact/{id}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      description: |
        Retrieves detailed information about a specific contact.
      operationId: Object_GETContact
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object fields to return
          in: query
          name: fields
          required: false
          schema:
            type: string
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    AccountId: 2c93808457d787030157e02e5fde2094
                    Address1: 312 2nd Ave W
                    City: Seattle
                    Country: United States
                    CreatedById: 2c93808457d787030157e02e45291f18
                    CreatedDate: 2016-10-20T05:41:58.000+02:00
                    Description: desc
                    Fax: "123456"
                    FirstName: FN1476934918260_new
                    HomePhone: "86123456789"
                    Id: 2c93808457d787030157e02e606e2095
                    LastName: LN1476934918260
                    MobilePhone: "8613312345678"
                    NickName: this is nick name
                    OtherPhone: "11111111111111111"
                    OtherPhoneType: Work
                    PersonalEmail: home@example.com
                    PostalCode: "98119"
                    State: Washington
                    TaxRegion: CA
                    UpdatedById: 2c93808457d787030157e02e45291f18
                    UpdatedDate: 2016-10-20T05:41:58.000+02:00
                    WorkEmail: work@example.com
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetContact"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    done: true
                    records: {}
                    size: 0
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Retrieve a contact"
      tags:
        - Contacts
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/contact/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/contact/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/contact/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/object/contact/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/contact/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/contact/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: |
        Updates a contact for a specified account.

        You can update contacts for cancelled accounts.

        For a use case of this operation, see [Edit the contact information for an account](https://www.zuora.com/developer/api-guides/#Edit-the-contact-information-for-an-account).
      operationId: Object_PUTContact
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyModifyContact"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    Id: 2c93808457d787030157e02e606e2095
                    Success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Update a contact"
      tags:
        - Contacts
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "FirstName": "FN1476934918260_new", 
                "Id": "2c93808457d787030157e02e606e2095"
            }' "https://rest.zuora.com/v1/object/contact/{id}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/contact/{id}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "FirstName": "FN1476934918260_new", 
                "Id": "2c93808457d787030157e02e606e2095"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"FirstName\": \"FN1476934918260_new\", \n    \"Id\": \"2c93808457d787030157e02e606e2095\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/contact/{id}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"FirstName\": \"FN1476934918260_new\", \n    \"Id\": \"2c93808457d787030157e02e606e2095\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/object/contact/{id}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/contact/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"FirstName\": \"FN1476934918260_new\", \n    \"Id\": \"2c93808457d787030157e02e606e2095\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/contact/{id}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"FirstName\": \"FN1476934918260_new\", \n    \"Id\": \"2c93808457d787030157e02e606e2095\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/object/credit-balance-adjustment:
    post:
      description: ""
      operationId: Object_POSTCreditBalanceAdjustment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyCreateCreditBalanceAdjustment"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    Id: 2c92c0f96a531e4f016a5377af993d87
                    Success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "400":
          content:
            application/json:
              examples:
                response:
                  value:
                    Errors:
                      - Code: INVALID_VALUE
                        Message: The invoice could not be found. It may have been deleted by another user.
                    Success: false
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyBadRequestResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Create a credit balance adjustment"
      tags:
        - Credit Balance Adjustments
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "Amount": 60, 
                "Comment": "Transfer $60.00 from a negative invoice to the account balance", 
                "SourceTransactionNumber": "INV00000420", 
                "Type": "Increase"
            }' "https://rest.zuora.com/v1/object/credit-balance-adjustment"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/credit-balance-adjustment');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "Amount": 60, 
                "Comment": "Transfer $60.00 from a negative invoice to the account balance", 
                "SourceTransactionNumber": "INV00000420", 
                "Type": "Increase"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"Amount\": 60, \n    \"Comment\": \"Transfer $60.00 from a negative invoice to the account balance\", \n    \"SourceTransactionNumber\": \"INV00000420\", \n    \"Type\": \"Increase\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/credit-balance-adjustment")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"Amount\": 60, \n    \"Comment\": \"Transfer $60.00 from a negative invoice to the account balance\", \n    \"SourceTransactionNumber\": \"INV00000420\", \n    \"Type\": \"Increase\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/object/credit-balance-adjustment", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/credit-balance-adjustment")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"Amount\": 60, \n    \"Comment\": \"Transfer $60.00 from a negative invoice to the account balance\", \n    \"SourceTransactionNumber\": \"INV00000420\", \n    \"Type\": \"Increase\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/credit-balance-adjustment");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"Amount\": 60, \n    \"Comment\": \"Transfer $60.00 from a negative invoice to the account balance\", \n    \"SourceTransactionNumber\": \"INV00000420\", \n    \"Type\": \"Increase\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/object/credit-balance-adjustment/{id}":
    get:
      description: ""
      operationId: Object_GETCreditBalanceAdjustment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object fields to return
          in: query
          name: fields
          required: false
          schema:
            type: string
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    AccountId: 2c93808457d787030157e02f5fb82c76
                    AdjustmentDate: 2016-10-20
                    Amount: 30.8
                    CancelledOn: 2016-10-20T05:43:05.000+02:00
                    CreatedById: 2c93808457d787030157e02f409a2af9
                    CreatedDate: 2016-10-20T05:43:04.000+02:00
                    Id: 2c93808457d787030157e02f640b2c9f
                    Number: CBA-00000001
                    ReasonCode: Standard Adjustment
                    SourceTransactionId: 2c93808457d787030157e02f60a42c87
                    SourceTransactionNumber: INV00000001
                    SourceTransactionType: Invoice
                    Status: Canceled
                    Type: Increase
                    UpdatedById: 2c93808457d787030157e02f409a2af9
                    UpdatedDate: 2016-10-20T05:43:05.000+02:00
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetCreditBalanceAdjustment"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    done: true
                    records: {}
                    size: 0
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Retrieve a credit balance adjustment"
      tags:
        - Credit Balance Adjustments
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/credit-balance-adjustment/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/credit-balance-adjustment/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/credit-balance-adjustment/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/object/credit-balance-adjustment/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/credit-balance-adjustment/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/credit-balance-adjustment/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: ""
      operationId: Object_PUTCreditBalanceAdjustment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyModifyCreditBalanceAdjustment"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    Id: 2c92c0f96a531e4f016a5377af993d87
                    Success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Update a credit balance adjustment"
      tags:
        - Credit Balance Adjustments
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "Status": "Canceled"
            }' "https://rest.zuora.com/v1/object/credit-balance-adjustment/{id}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/credit-balance-adjustment/{id}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "Status": "Canceled"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"Status\": \"Canceled\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/credit-balance-adjustment/{id}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"Status\": \"Canceled\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/object/credit-balance-adjustment/{id}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/credit-balance-adjustment/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"Status\": \"Canceled\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/credit-balance-adjustment/{id}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"Status\": \"Canceled\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/object/export:
    post:
      description: |
        Use this operation to create a data source export. After you have created a data source export, use [CRUD: Retrieve an export](https://www.zuora.com/developer/api-reference/#operation/Object_GETExport) to check the status of the data source export and access the exported data.

        ## Limits

        Zuora system enforces the following limits on data source exports:

        * The maximum processing time per export is 3 hours. If an export is executed for longer than 3 hours, it will be killed automatically.
        * The maximum number of concurrent exports is 50 per tenant. Exports in `Pending` and `Processing` status are counted towards the concurrent export limit. Zuora system will reject the subsequent data source export requests once the concurrent export limit is reached.

        When you export data from Zuora, each exported file is available for download for 7 days. Data source exports (Export objects) older than 90 days are automatically deleted.

        **Note:** This operation supports the [Export ZOQL](https://knowledgecenter.zuora.com/DC_Developers/M_Export_ZOQL) query language. However, this operation does not support some data sources, objects, and fields in Export ZOQL queries. For full compatibility with Export ZOQL, Zuora recommends that you use the [AQuA API](https://knowledgecenter.zuora.com/DC_Developers/T_Aggregate_Query_API) instead of this operation.
      operationId: Object_POSTExport
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyCreateExport"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    Id: 2c93808457d787030157e03222184fae
                    Success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "400":
          content:
            application/json:
              examples:
                response:
                  value:
                    Errors:
                      - Code: INVALID_VALUE
                        Message: The account number 123xProxy is invalid.
                    Success: false
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyBadRequestResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Create an export"
      tags:
        - Exports
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "Format": "csv", 
                "Name": "test_Export_1476935164445", 
                "Query": "select * from account", 
                "Status": "Processing", 
                "Zip": true
            }' "https://rest.zuora.com/v1/object/export"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/export');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "Format": "csv", 
                "Name": "test_Export_1476935164445", 
                "Query": "select * from account", 
                "Status": "Processing", 
                "Zip": true
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"Format\": \"csv\", \n    \"Name\": \"test_Export_1476935164445\", \n    \"Query\": \"select * from account\", \n    \"Status\": \"Processing\", \n    \"Zip\": true\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/export")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"Format\": \"csv\", \n    \"Name\": \"test_Export_1476935164445\", \n    \"Query\": \"select * from account\", \n    \"Status\": \"Processing\", \n    \"Zip\": true\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/object/export", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/export")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"Format\": \"csv\", \n    \"Name\": \"test_Export_1476935164445\", \n    \"Query\": \"select * from account\", \n    \"Status\": \"Processing\", \n    \"Zip\": true\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/export");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"Format\": \"csv\", \n    \"Name\": \"test_Export_1476935164445\", \n    \"Query\": \"select * from account\", \n    \"Status\": \"Processing\", \n    \"Zip\": true\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/object/export/{id}":
    get:
      description: |
        Use this operation to check the status of a data source export and access the exported data.

        When you export data from Zuora, each exported file is available for download for 7 days. Data source exports (Export objects) older than 90 days are automatically deleted.
      operationId: Object_GETExport
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object fields to return
          in: query
          name: fields
          required: false
          schema:
            type: string
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    CreatedById: 2c93808457d787030157e03202294e25
                    CreatedDate: 2016-10-20T05:46:04.000+02:00
                    Encrypted: false
                    FileId: 2c93808457d787030157e032228d4fb0
                    Format: csv
                    Id: 2c93808457d787030157e03222184fae
                    Name: test_Export_1476935164445
                    Query: select * from account
                    Size: 5
                    Status: Completed
                    UpdatedById: 2c93808457d787030157e03202294e25
                    UpdatedDate: 2016-10-20T05:46:04.000+02:00
                    Zip: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetExport"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    done: true
                    records: {}
                    size: 0
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Retrieve an export"
      tags:
        - Exports
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/export/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/export/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/export/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/object/export/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/export/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/export/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  /v1/object/feature:
    post:
      description: ""
      operationId: Object_POSTFeature
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyCreateFeature"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    Id: 2c92c0f971baf4e80171bc0a3fbc75a1
                    Success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "400":
          content:
            application/json:
              examples:
                response:
                  value:
                    Errors:
                      - Code: INVALID_VALUE
                        Message: data integrity violation
                    Success: false
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyBadRequestResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Create a feature"
      tags:
        - Features
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "Description": "An experimental feature for early adopters", 
                "FeatureApprover__c": "sally@example.com", 
                "FeatureCode": "F017", 
                "Name": "Experimental Feature", 
                "Status": "Active"
            }' "https://rest.zuora.com/v1/object/feature"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/feature');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "Description": "An experimental feature for early adopters", 
                "FeatureApprover__c": "sally@example.com", 
                "FeatureCode": "F017", 
                "Name": "Experimental Feature", 
                "Status": "Active"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"Description\": \"An experimental feature for early adopters\", \n    \"FeatureApprover__c\": \"sally@example.com\", \n    \"FeatureCode\": \"F017\", \n    \"Name\": \"Experimental Feature\", \n    \"Status\": \"Active\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/feature")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"Description\": \"An experimental feature for early adopters\", \n    \"FeatureApprover__c\": \"sally@example.com\", \n    \"FeatureCode\": \"F017\", \n    \"Name\": \"Experimental Feature\", \n    \"Status\": \"Active\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/object/feature", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/feature")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"Description\": \"An experimental feature for early adopters\", \n    \"FeatureApprover__c\": \"sally@example.com\", \n    \"FeatureCode\": \"F017\", \n    \"Name\": \"Experimental Feature\", \n    \"Status\": \"Active\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/feature");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"Description\": \"An experimental feature for early adopters\", \n    \"FeatureApprover__c\": \"sally@example.com\", \n    \"FeatureCode\": \"F017\", \n    \"Name\": \"Experimental Feature\", \n    \"Status\": \"Active\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/object/feature/{id}":
    delete:
      description: ""
      operationId: Object_DELETEFeature
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    id: 2c93808457d787030157e02f80e92e24
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyDeleteResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Delete a feature"
      tags:
        - Features
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/feature/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/feature/{id}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/feature/{id}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/v1/object/feature/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/feature/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/feature/{id}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      description: ""
      operationId: Object_GETFeature
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object fields to return
          in: query
          name: fields
          required: false
          schema:
            type: string
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    CreatedById: 2c93808457d787030157e02f68272cae
                    CreatedDate: 2016-10-20T05:43:12.000+02:00
                    Description: this is desc
                    FeatureCode: feature_code_1476934992537
                    Id: 2c93808457d787030157e02f82872e25
                    Name: name_1476934992537_new
                    Status: Active
                    UpdatedById: 2c93808457d787030157e02f68272cae
                    UpdatedDate: 2016-10-20T05:43:12.000+02:00
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetFeature"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    done: true
                    records: {}
                    size: 0
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Retrieve a feature"
      tags:
        - Features
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/feature/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/feature/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/feature/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/object/feature/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/feature/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/feature/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: ""
      operationId: Object_PUTFeature
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyModifyFeature"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    Id: 2c92c0f971baf4e80171bc0a3fbc75a1
                    Success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "400":
          content:
            application/json:
              examples:
                response:
                  value:
                    Errors:
                      - Code: INVALID_VALUE
                        Message: "invalid value for field Status: Deactivated"
                    Success: false
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyBadRequestResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Update a feature"
      tags:
        - Features
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "Description": "This feature has been discontinued", 
                "Status": "Inactive"
            }' "https://rest.zuora.com/v1/object/feature/{id}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/feature/{id}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "Description": "This feature has been discontinued", 
                "Status": "Inactive"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"Description\": \"This feature has been discontinued\", \n    \"Status\": \"Inactive\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/feature/{id}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"Description\": \"This feature has been discontinued\", \n    \"Status\": \"Inactive\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/object/feature/{id}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/feature/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"Description\": \"This feature has been discontinued\", \n    \"Status\": \"Inactive\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/feature/{id}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"Description\": \"This feature has been discontinued\", \n    \"Status\": \"Inactive\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/object/import:
    post:
      description: |
        Creates a data import.
      operationId: Object_POSTImport
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
      requestBody:
        content:
          multipart/form-data:
            schema:
              properties:
                File:
                  description: |
                    The data to import.
                  format: binary
                  type: string
                ImportType:
                  description: |
                    The type of data to import.
                  enum:
                    - Usage
                    - Payment
                    - Quote
                    - TaxationDetail
                    - UpdateAccountingCode
                    - CreateRevenueSchedule
                    - UpdateRevenueSchedule
                    - DeleteRevenueSchedule
                    - ImportFXRate
                  type: string
                Name:
                  description: |
                    A descriptive name for the import.
                  type: string
              required:
                - ImportType
                - Name
                - File
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    Id: 2c92c0f8601fab5701601fee2bf67056
                    Success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyPostImport"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Create an import"
      tags:
        - Imports
      x-code-samples:
        - lang: Curl
          source: |
            curl -X POST -H "Authorization: Bearer f21f017e4724445d8647b1f0de7ed6f1" -F "ImportType=Usage" -F "Name=UsageData.csv" -F "File=@UsageData.csv" "https://rest.zuora.com/v1/object/import"
  "/v1/object/import/{id}":
    get:
      description: ""
      operationId: Object_GETImport
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object fields to return
          in: query
          name: fields
          required: false
          schema:
            type: string
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetImport"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    done: true
                    records: {}
                    size: 0
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Retrieve an import"
      tags:
        - Imports
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/import/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/import/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/import/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/object/import/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/import/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/import/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  /v1/object/invoice-adjustment:
    post:
      description: ""
      operationId: Object_POSTInvoiceAdjustment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyCreateInvoiceAdjustment"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    Id: 2c93808457d787030157e030d3043f79
                    Success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "400":
          content:
            application/json:
              examples:
                response:
                  value:
                    Errors:
                      - Code: INVALID_VALUE
                        Message: The account number 123xProxy is invalid.
                    Success: false
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyBadRequestResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Create an invoice adjustment"
      tags:
        - Invoice Adjustments
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "AccountingCode": "Accounts Receivable", 
                "AdjustmentDate": "2016-10-20", 
                "Amount": 1.2, 
                "Comments": "this is comments", 
                "InvoiceId": "2c93808457d787030157e030d10f3f64", 
                "InvoiceNumber": "INV00000001", 
                "ReferenceId": "refid-1476935078657", 
                "Type": "Credit"
            }' "https://rest.zuora.com/v1/object/invoice-adjustment"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/invoice-adjustment');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "AccountingCode": "Accounts Receivable", 
                "AdjustmentDate": "2016-10-20", 
                "Amount": 1.2, 
                "Comments": "this is comments", 
                "InvoiceId": "2c93808457d787030157e030d10f3f64", 
                "InvoiceNumber": "INV00000001", 
                "ReferenceId": "refid-1476935078657", 
                "Type": "Credit"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"AccountingCode\": \"Accounts Receivable\", \n    \"AdjustmentDate\": \"2016-10-20\", \n    \"Amount\": 1.2, \n    \"Comments\": \"this is comments\", \n    \"InvoiceId\": \"2c93808457d787030157e030d10f3f64\", \n    \"InvoiceNumber\": \"INV00000001\", \n    \"ReferenceId\": \"refid-1476935078657\", \n    \"Type\": \"Credit\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/invoice-adjustment")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"AccountingCode\": \"Accounts Receivable\", \n    \"AdjustmentDate\": \"2016-10-20\", \n    \"Amount\": 1.2, \n    \"Comments\": \"this is comments\", \n    \"InvoiceId\": \"2c93808457d787030157e030d10f3f64\", \n    \"InvoiceNumber\": \"INV00000001\", \n    \"ReferenceId\": \"refid-1476935078657\", \n    \"Type\": \"Credit\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/object/invoice-adjustment", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/invoice-adjustment")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"AccountingCode\": \"Accounts Receivable\", \n    \"AdjustmentDate\": \"2016-10-20\", \n    \"Amount\": 1.2, \n    \"Comments\": \"this is comments\", \n    \"InvoiceId\": \"2c93808457d787030157e030d10f3f64\", \n    \"InvoiceNumber\": \"INV00000001\", \n    \"ReferenceId\": \"refid-1476935078657\", \n    \"Type\": \"Credit\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/invoice-adjustment");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"AccountingCode\": \"Accounts Receivable\", \n    \"AdjustmentDate\": \"2016-10-20\", \n    \"Amount\": 1.2, \n    \"Comments\": \"this is comments\", \n    \"InvoiceId\": \"2c93808457d787030157e030d10f3f64\", \n    \"InvoiceNumber\": \"INV00000001\", \n    \"ReferenceId\": \"refid-1476935078657\", \n    \"Type\": \"Credit\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/object/invoice-adjustment/{id}":
    delete:
      description: ""
      operationId: Object_DELETEInvoiceAdjustment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyDeleteResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Delete an invoice adjustment"
      tags:
        - Invoice Adjustments
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/invoice-adjustment/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/invoice-adjustment/{id}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/invoice-adjustment/{id}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/v1/object/invoice-adjustment/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/invoice-adjustment/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/invoice-adjustment/{id}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      description: ""
      operationId: Object_GETInvoiceAdjustment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object fields to return
          in: query
          name: fields
          required: false
          schema:
            type: string
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    AccountId: 2c93808457d787030157e030d0a43f53
                    AccountingCode: Accounts Receivable
                    AdjustmentDate: 2016-10-20
                    AdjustmentNumber: IA-00000001
                    Amount: 1.2
                    Comments: this is comments
                    CreatedById: 2c93808457d787030157e030b4fa3dd6
                    CreatedDate: 2016-10-20T05:44:38.000+02:00
                    CustomerName: AC_1476935078064
                    CustomerNumber: AN_1476935078064
                    Id: 2c93808457d787030157e030d3043f79
                    ImpactAmount: -1.2
                    InvoiceId: 2c93808457d787030157e030d10f3f64
                    InvoiceNumber: INV00000001
                    ReasonCode: Standard Adjustment
                    ReferenceId: refid-1476935078657
                    Status: Processed
                    Type: Credit
                    UpdatedById: 2c93808457d787030157e030b4fa3dd6
                    UpdatedDate: 2016-10-20T05:44:38.000+02:00
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetInvoiceAdjustment"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    done: true
                    records: {}
                    size: 0
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Retrieve an invoice adjustment"
      tags:
        - Invoice Adjustments
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/invoice-adjustment/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/invoice-adjustment/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/invoice-adjustment/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/object/invoice-adjustment/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/invoice-adjustment/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/invoice-adjustment/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: ""
      operationId: Object_PUTInvoiceAdjustment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyModifyInvoiceAdjustment"
        required: true
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Update an invoice adjustment"
      tags:
        - Invoice Adjustments
      x-code-samples:
        - lang: Curl
          source: "curl -X PUT -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" -d '{}' \"https://rest.zuora.com/v1/object/invoice-adjustment/{id}\""
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/invoice-adjustment/{id}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/invoice-adjustment/{id}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/object/invoice-adjustment/{id}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/invoice-adjustment/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/invoice-adjustment/{id}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/object/invoice-item-adjustment/{id}":
    delete:
      description: ""
      operationId: Object_DELETEInvoiceItemAdjustment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyDeleteResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Delete an invoice item adjustment"
      tags:
        - Invoice Item Adjustments
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/invoice-item-adjustment/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/invoice-item-adjustment/{id}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/invoice-item-adjustment/{id}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/v1/object/invoice-item-adjustment/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/invoice-item-adjustment/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/invoice-item-adjustment/{id}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      description: ""
      operationId: Object_GETInvoiceItemAdjustment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object fields to return
          in: query
          name: fields
          required: false
          schema:
            type: string
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    AccountId: 2c93808457d787030157e032485b5131
                    AccountingCode: Accounts Receivable
                    AdjustmentDate: 2016-10-20
                    AdjustmentNumber: IIA-00000001
                    Amount: 1.2
                    Comment: this is comments
                    CreatedById: 2c93808457d787030157e032283c4fb2
                    CreatedDate: 2016-10-20T05:46:14.000+02:00
                    Id: 2c93808457d787030157e0324aea5158
                    InvoiceId: 2c93808457d787030157e03248c75142
                    InvoiceItemName: OneTime_Flat Fee Pricing1476935174089
                    InvoiceNumber: INV00000001
                    ReasonCode: Standard Adjustment
                    ReferenceId: refid-1476935174845
                    ServiceEndDate: 2016-10-20
                    ServiceStartDate: 2016-10-20
                    SourceId: 2c93808457d787030157e03248c95144
                    SourceType: InvoiceDetail
                    Status: Processed
                    Type: Credit
                    UpdatedById: 2c93808457d787030157e032283c4fb2
                    UpdatedDate: 2016-10-20T05:46:14.000+02:00
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetInvoiceItemAdjustment"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    done: true
                    records: {}
                    size: 0
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Retrieve an invoice item adjustment"
      tags:
        - Invoice Item Adjustments
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/invoice-item-adjustment/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/invoice-item-adjustment/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/invoice-item-adjustment/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/object/invoice-item-adjustment/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/invoice-item-adjustment/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/invoice-item-adjustment/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/object/invoice-item/{id}":
    get:
      description: ""
      operationId: Object_GETInvoiceItem
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object fields to return
          in: query
          name: fields
          required: false
          schema:
            type: string
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    AccountingCode: Accounts Receivable
                    ChargeAmount: 10
                    ChargeDate: 2016-10-20T05:44:19.000+02:00
                    ChargeName: OneTime_Flat Fee Pricing1476935059154
                    CreatedById: 2c93808457d787030157e03071873a9a
                    CreatedDate: 2016-10-20T05:44:19.000+02:00
                    Id: 2c93808457d787030157e03089c03c3b
                    InvoiceId: 2c93808457d787030157e03089bb3c39
                    ProcessingType: 0
                    ProductDescription: Create product via API
                    Quantity: 1
                    RatePlanChargeId: 2c93808457d787030157e03088ec3c2d
                    SKU: API-SKU1476935058740
                    ServiceEndDate: 2016-10-20
                    ServiceStartDate: 2016-10-20
                    SubscriptionId: 2c93808457d787030157e03088bf3c24
                    TaxAmount: 0
                    TaxExemptAmount: 0
                    UnitPrice: 10
                    UpdatedById: 2c93808457d787030157e03071873a9a
                    UpdatedDate: 2016-10-20T05:44:21.000+02:00
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetInvoiceItem"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    done: true
                    records: {}
                    size: 0
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Retrieve an invoice item"
      tags:
        - Invoice Items
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/invoice-item/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/invoice-item/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/invoice-item/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/object/invoice-item/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/invoice-item/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/invoice-item/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  /v1/object/invoice-payment:
    post:
      description: ""
      operationId: Object_POSTInvoicePayment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyCreateInvoicePayment"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    Id: 2c93808457d787030157e02dee6e1b7a
                    Success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "400":
          content:
            application/json:
              examples:
                response:
                  value:
                    Errors:
                      - Code: INVALID_VALUE
                        Message: The account number 123xProxy is invalid.
                    Success: false
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyBadRequestResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Create an invoice payment"
      tags:
        - Invoice Payments
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "Amount": 10, 
                "InvoiceId": "2c93808457d787030157e02deadb1b6d", 
                "PaymentId": "2c93808457d787030157e02de5fc1b57"
            }' "https://rest.zuora.com/v1/object/invoice-payment"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/invoice-payment');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "Amount": 10, 
                "InvoiceId": "2c93808457d787030157e02deadb1b6d", 
                "PaymentId": "2c93808457d787030157e02de5fc1b57"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"Amount\": 10, \n    \"InvoiceId\": \"2c93808457d787030157e02deadb1b6d\", \n    \"PaymentId\": \"2c93808457d787030157e02de5fc1b57\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/invoice-payment")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"Amount\": 10, \n    \"InvoiceId\": \"2c93808457d787030157e02deadb1b6d\", \n    \"PaymentId\": \"2c93808457d787030157e02de5fc1b57\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/object/invoice-payment", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/invoice-payment")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"Amount\": 10, \n    \"InvoiceId\": \"2c93808457d787030157e02deadb1b6d\", \n    \"PaymentId\": \"2c93808457d787030157e02de5fc1b57\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/invoice-payment");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"Amount\": 10, \n    \"InvoiceId\": \"2c93808457d787030157e02deadb1b6d\", \n    \"PaymentId\": \"2c93808457d787030157e02de5fc1b57\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/object/invoice-payment/{id}":
    get:
      description: ""
      operationId: Object_GETInvoicePayment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object fields to return
          in: query
          name: fields
          required: false
          schema:
            type: string
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    Amount: 10
                    CreatedById: 2c93808457d787030157e02dc3d919dc
                    CreatedDate: 2016-10-20T05:41:29.000+02:00
                    Id: 2c93808457d787030157e02dee6e1b7a
                    InvoiceId: 2c93808457d787030157e02deadb1b6d
                    PaymentId: 2c93808457d787030157e02de5fc1b57
                    RefundAmount: 0
                    UpdatedById: 2c93808457d787030157e02dc3d919dc
                    UpdatedDate: 2016-10-20T05:41:29.000+02:00
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetInvoicePayment"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    done: true
                    records: {}
                    size: 0
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Retrieve an invoice payment"
      tags:
        - Invoice Payments
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/invoice-payment/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/invoice-payment/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/invoice-payment/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/object/invoice-payment/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/invoice-payment/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/invoice-payment/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: ""
      operationId: Object_PUTInvoicePayment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyModifyInvoicePayment"
        required: true
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Update an invoice payment"
      tags:
        - Invoice Payments
      x-code-samples:
        - lang: Curl
          source: "curl -X PUT -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" -d '{}' \"https://rest.zuora.com/v1/object/invoice-payment/{id}\""
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/invoice-payment/{id}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/invoice-payment/{id}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/object/invoice-payment/{id}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/invoice-payment/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/invoice-payment/{id}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/object/invoice-split-item/{id}":
    get:
      description: ""
      operationId: Object_GETInvoiceSplitItem
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object fields to return
          in: query
          name: fields
          required: false
          schema:
            type: string
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    CreatedById: 2c93808457d787030157e031bb3f4aa5
                    CreatedDate: 2016-10-20T05:45:45.000+02:00
                    Id: 2c93808457d787030157e031d7214c55
                    InvoiceDate: 2011-01-20
                    InvoiceSplitId: 2c93808457d787030157e031d5844c53
                    PaymentTerm: Due Upon Receipt
                    SplitPercentage: 50.9
                    UpdatedById: 2c93808457d787030157e031bb3f4aa5
                    UpdatedDate: 2016-10-20T05:45:45.000+02:00
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetInvoiceSplitItem"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    done: true
                    records: {}
                    size: 0
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Retrieve an invoice split item"
      tags:
        - Invoice Split Items
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/invoice-split-item/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/invoice-split-item/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/invoice-split-item/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/object/invoice-split-item/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/invoice-split-item/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/invoice-split-item/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/object/invoice-split/{id}":
    get:
      description: ""
      operationId: Object_GETInvoiceSplit
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object fields to return
          in: query
          name: fields
          required: false
          schema:
            type: string
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    CreatedById: 2c93808457d787030157e03111d542ae
                    CreatedDate: 2016-10-20T05:45:01.000+02:00
                    Id: 2c93808457d787030157e0312cb2445c
                    InvoiceId: 2c93808457d787030157e0312aa34449
                    UpdatedById: 2c93808457d787030157e03111d542ae
                    UpdatedDate: 2016-10-20T05:45:01.000+02:00
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetInvoiceSplit"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    done: true
                    records: {}
                    size: 0
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Retrieve an invoice split"
      tags:
        - Invoice Splits
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/invoice-split/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/invoice-split/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/invoice-split/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/object/invoice-split/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/invoice-split/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/invoice-split/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/object/invoice/{id}":
    delete:
      description: ""
      operationId: Object_DELETEInvoice
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    id: 2c93808457d787030157e02f149f2922
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyDeleteResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Delete an invoice"
      tags:
        - Invoices
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/invoice/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/invoice/{id}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/invoice/{id}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/v1/object/invoice/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/invoice/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/invoice/{id}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      description: ""
      operationId: Object_GETInvoice
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object fields to return
          in: query
          name: fields
          required: false
          schema:
            type: string
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    AccountId: 2c93808457d787030157e031d2704c28
                    AdjustmentAmount: 0
                    Amount: 23.92
                    AmountWithoutTax: 23.92
                    Balance: 23.92
                    Body: JVBERi0xLjUNCjQg......QNCiUlRU9GDQo=
                    CreatedById: 2c93808457d787030157e031bb3f4aa5
                    CreatedDate: 2016-10-20T05:45:45.000+02:00
                    CreditBalanceAdjustmentAmount: 0
                    DueDate: 2011-01-10
                    Id: 2c93808457d787030157e031d86c4c57
                    IncludesOneTime: true
                    IncludesRecurring: true
                    IncludesUsage: true
                    InvoiceDate: 2011-01-10
                    InvoiceNumber: INV00000002
                    PaymentAmount: 0
                    PostedBy: 2c93808457d787030157e031bb3f4aa5
                    PostedDate": 2016-10-20T05:45:45.000+02:00
                    RefundAmount: 0
                    Status: Posted
                    TargetDate: 2016-10-20
                    TaxAmount: 0
                    TaxExemptAmount: 0
                    UpdatedById: 2c93808457d787030157e031bb3f4aa5
                    UpdatedDate: 2016-10-20T05:45:45.000+02:00
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetInvoice"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    done: true
                    records: {}
                    size: 0
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Retrieve an invoice"
      tags:
        - Invoices
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/invoice/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/invoice/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/invoice/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/object/invoice/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/invoice/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/invoice/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: ""
      operationId: Object_PUTInvoice
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyModifyInvoice"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    Id: 2c93808457d787030157e031d86c4c57
                    Success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Update an invoice"
      tags:
        - Invoices
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "Status": "Posted"
            }' "https://rest.zuora.com/v1/object/invoice/{id}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/invoice/{id}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "Status": "Posted"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"Status\": \"Posted\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/invoice/{id}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"Status\": \"Posted\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/object/invoice/{id}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/invoice/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"Status\": \"Posted\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/invoice/{id}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"Status\": \"Posted\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/object/payment:
    post:
      description: |
        Creates a payment for one or multiple invoices.
      operationId: Object_POSTPayment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyCreatePayment"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    Id: 2c93808457d787030157e03197714910
                    Success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "400":
          content:
            application/json:
              examples:
                response:
                  value:
                    Errors:
                      - Code: INVALID_VALUE
                        Message: The account number 123xProxy is invalid.
                    Success: false
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyBadRequestResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Create a payment"
      tags:
        - Payments
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "AccountId": "2c93808457d787030157e03190e748ea", 
                "Amount": 2, 
                "AppliedCreditBalanceAmount": 0, 
                "AppliedInvoiceAmount": 2, 
                "EffectiveDate": "2016-10-20", 
                "InvoiceId": "2c93808457d787030157e03195604902", 
                "PaymentMethodId": "2c93808457d787030157e03196d1490e", 
                "Status": "Processed", 
                "Type": "Electronic"
            }' "https://rest.zuora.com/v1/object/payment"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/payment');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "AccountId": "2c93808457d787030157e03190e748ea", 
                "Amount": 2, 
                "AppliedCreditBalanceAmount": 0, 
                "AppliedInvoiceAmount": 2, 
                "EffectiveDate": "2016-10-20", 
                "InvoiceId": "2c93808457d787030157e03195604902", 
                "PaymentMethodId": "2c93808457d787030157e03196d1490e", 
                "Status": "Processed", 
                "Type": "Electronic"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"AccountId\": \"2c93808457d787030157e03190e748ea\", \n    \"Amount\": 2, \n    \"AppliedCreditBalanceAmount\": 0, \n    \"AppliedInvoiceAmount\": 2, \n    \"EffectiveDate\": \"2016-10-20\", \n    \"InvoiceId\": \"2c93808457d787030157e03195604902\", \n    \"PaymentMethodId\": \"2c93808457d787030157e03196d1490e\", \n    \"Status\": \"Processed\", \n    \"Type\": \"Electronic\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/payment")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"AccountId\": \"2c93808457d787030157e03190e748ea\", \n    \"Amount\": 2, \n    \"AppliedCreditBalanceAmount\": 0, \n    \"AppliedInvoiceAmount\": 2, \n    \"EffectiveDate\": \"2016-10-20\", \n    \"InvoiceId\": \"2c93808457d787030157e03195604902\", \n    \"PaymentMethodId\": \"2c93808457d787030157e03196d1490e\", \n    \"Status\": \"Processed\", \n    \"Type\": \"Electronic\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/object/payment", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/payment")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"AccountId\": \"2c93808457d787030157e03190e748ea\", \n    \"Amount\": 2, \n    \"AppliedCreditBalanceAmount\": 0, \n    \"AppliedInvoiceAmount\": 2, \n    \"EffectiveDate\": \"2016-10-20\", \n    \"InvoiceId\": \"2c93808457d787030157e03195604902\", \n    \"PaymentMethodId\": \"2c93808457d787030157e03196d1490e\", \n    \"Status\": \"Processed\", \n    \"Type\": \"Electronic\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/payment");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"AccountId\": \"2c93808457d787030157e03190e748ea\", \n    \"Amount\": 2, \n    \"AppliedCreditBalanceAmount\": 0, \n    \"AppliedInvoiceAmount\": 2, \n    \"EffectiveDate\": \"2016-10-20\", \n    \"InvoiceId\": \"2c93808457d787030157e03195604902\", \n    \"PaymentMethodId\": \"2c93808457d787030157e03196d1490e\", \n    \"Status\": \"Processed\", \n    \"Type\": \"Electronic\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/object/payment-method:
    post:
      description: ""
      operationId: Object_POSTPaymentMethod
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyCreatePaymentMethod"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    Id: 2c93808457d787030157e03220ec4fad
                    Success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "400":
          content:
            application/json:
              examples:
                response:
                  value:
                    Errors:
                      - Code: INVALID_VALUE
                        Message: The account number 123xProxy is invalid.
                    Success: false
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyBadRequestResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Create a payment method"
      tags:
        - Payment Methods
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "AccountId": "2c93808457d787030157e0321fdf4fab", 
                "CreditCardAddress1": "312 2nd Ave W", 
                "CreditCardCity": "Seattle", 
                "CreditCardCountry": "United States", 
                "CreditCardExpirationMonth": 12, 
                "CreditCardExpirationYear": 2020, 
                "CreditCardHolderName": "Somebody", 
                "CreditCardNumber": "4111111111111111", 
                "CreditCardPostalCode": "98119", 
                "CreditCardState": "Washington", 
                "CreditCardType": "Visa", 
                "MaxConsecutivePaymentFailures": 10, 
                "NumConsecutiveFailures": 3, 
                "PaymentRetryWindow": 3, 
                "Type": "CreditCard"
            }' "https://rest.zuora.com/v1/object/payment-method"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/payment-method');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "AccountId": "2c93808457d787030157e0321fdf4fab", 
                "CreditCardAddress1": "312 2nd Ave W", 
                "CreditCardCity": "Seattle", 
                "CreditCardCountry": "United States", 
                "CreditCardExpirationMonth": 12, 
                "CreditCardExpirationYear": 2020, 
                "CreditCardHolderName": "Somebody", 
                "CreditCardNumber": "4111111111111111", 
                "CreditCardPostalCode": "98119", 
                "CreditCardState": "Washington", 
                "CreditCardType": "Visa", 
                "MaxConsecutivePaymentFailures": 10, 
                "NumConsecutiveFailures": 3, 
                "PaymentRetryWindow": 3, 
                "Type": "CreditCard"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"AccountId\": \"2c93808457d787030157e0321fdf4fab\", \n    \"CreditCardAddress1\": \"312 2nd Ave W\", \n    \"CreditCardCity\": \"Seattle\", \n    \"CreditCardCountry\": \"United States\", \n    \"CreditCardExpirationMonth\": 12, \n    \"CreditCardExpirationYear\": 2020, \n    \"CreditCardHolderName\": \"Somebody\", \n    \"CreditCardNumber\": \"4111111111111111\", \n    \"CreditCardPostalCode\": \"98119\", \n    \"CreditCardState\": \"Washington\", \n    \"CreditCardType\": \"Visa\", \n    \"MaxConsecutivePaymentFailures\": 10, \n    \"NumConsecutiveFailures\": 3, \n    \"PaymentRetryWindow\": 3, \n    \"Type\": \"CreditCard\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/payment-method")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"AccountId\": \"2c93808457d787030157e0321fdf4fab\", \n    \"CreditCardAddress1\": \"312 2nd Ave W\", \n    \"CreditCardCity\": \"Seattle\", \n    \"CreditCardCountry\": \"United States\", \n    \"CreditCardExpirationMonth\": 12, \n    \"CreditCardExpirationYear\": 2020, \n    \"CreditCardHolderName\": \"Somebody\", \n    \"CreditCardNumber\": \"4111111111111111\", \n    \"CreditCardPostalCode\": \"98119\", \n    \"CreditCardState\": \"Washington\", \n    \"CreditCardType\": \"Visa\", \n    \"MaxConsecutivePaymentFailures\": 10, \n    \"NumConsecutiveFailures\": 3, \n    \"PaymentRetryWindow\": 3, \n    \"Type\": \"CreditCard\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/object/payment-method", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/payment-method")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"AccountId\": \"2c93808457d787030157e0321fdf4fab\", \n    \"CreditCardAddress1\": \"312 2nd Ave W\", \n    \"CreditCardCity\": \"Seattle\", \n    \"CreditCardCountry\": \"United States\", \n    \"CreditCardExpirationMonth\": 12, \n    \"CreditCardExpirationYear\": 2020, \n    \"CreditCardHolderName\": \"Somebody\", \n    \"CreditCardNumber\": \"4111111111111111\", \n    \"CreditCardPostalCode\": \"98119\", \n    \"CreditCardState\": \"Washington\", \n    \"CreditCardType\": \"Visa\", \n    \"MaxConsecutivePaymentFailures\": 10, \n    \"NumConsecutiveFailures\": 3, \n    \"PaymentRetryWindow\": 3, \n    \"Type\": \"CreditCard\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/payment-method");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"AccountId\": \"2c93808457d787030157e0321fdf4fab\", \n    \"CreditCardAddress1\": \"312 2nd Ave W\", \n    \"CreditCardCity\": \"Seattle\", \n    \"CreditCardCountry\": \"United States\", \n    \"CreditCardExpirationMonth\": 12, \n    \"CreditCardExpirationYear\": 2020, \n    \"CreditCardHolderName\": \"Somebody\", \n    \"CreditCardNumber\": \"4111111111111111\", \n    \"CreditCardPostalCode\": \"98119\", \n    \"CreditCardState\": \"Washington\", \n    \"CreditCardType\": \"Visa\", \n    \"MaxConsecutivePaymentFailures\": 10, \n    \"NumConsecutiveFailures\": 3, \n    \"PaymentRetryWindow\": 3, \n    \"Type\": \"CreditCard\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/object/payment-method-snapshot/{id}":
    get:
      description: |
        This REST API reference describes how to retrieve a Payment Method Snapshot.

        A Payment Method Snapshot is a copy of the particular Payment Method used in a transaction. If the Payment Method is deleted, the Payment Method Snapshot continues to retain the data used in each of the past transactions.

        ## Notes
        The following Payment Method fields are not available in Payment Method Snapshots:

        * `Active`
        * `AchAddress1`
        * `AchAddress2`
        * `CreatedById`
        * `CreatedDate`
        * `UpdatedById`
        * `UpdatedDate`

        The Payment Method Snapshot field `PaymentMethodId` is not available in Payment Methods.
      operationId: Object_GETPaymentMethodSnapshot
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object fields to return
          in: query
          name: fields
          required: false
          schema:
            type: string
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    AccountId: 2c93808457d787030157e0314c0945d4
                    BankIdentificationNumber: "411111"
                    CompanyName: ""
                    CreditCardAddress1: 312 2nd Ave W
                    CreditCardCity: Seattle
                    CreditCardCountry: United States
                    CreditCardExpirationMonth: 12
                    CreditCardExpirationYear: 2020
                    CreditCardHolderName: Somebody
                    CreditCardMaskNumber: "************1111"
                    CreditCardPostalCode: "98119"
                    CreditCardState: Washington
                    CreditCardType: Visa
                    Id: 2c93808457d787030157e0314f2245d8
                    IdentityNumber: ""
                    IsCompany: false
                    NumConsecutiveFailures: 0
                    PaymentMethodId: 2c93808457d787030157e0314e8145d7
                    PaymentMethodStatus: Active
                    TotalNumberOfErrorPayments: 0
                    TotalNumberOfProcessedPayments: 0
                    Type: CreditCard
                    UseDefaultRetryRule: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetPaymentMethodSnapshot"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    done: true
                    records: {}
                    size: 0
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Retrieve a payment method snapshot"
      tags:
        - Payment Method Snapshots
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/payment-method-snapshot/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/payment-method-snapshot/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/payment-method-snapshot/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/object/payment-method-snapshot/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/payment-method-snapshot/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/payment-method-snapshot/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/object/payment-method-transaction-log/{id}":
    get:
      description: ""
      operationId: Object_GETPaymentMethodTransactionLog
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object fields to return
          in: query
          name: fields
          required: false
          schema:
            type: string
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetPaymentMethodTransactionLog"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    done: true
                    records: {}
                    size: 0
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Retrieve a payment method transaction log"
      tags:
        - Payment Method Transaction Logs
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/payment-method-transaction-log/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/payment-method-transaction-log/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/payment-method-transaction-log/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/object/payment-method-transaction-log/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/payment-method-transaction-log/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/payment-method-transaction-log/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/object/payment-method/{id}":
    delete:
      description: ""
      operationId: Object_DELETEPaymentMethod
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    id: 2c93808457d787030157e02fcc8e329f
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyDeleteResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Delete a payment method"
      tags:
        - Payment Methods
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/payment-method/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/payment-method/{id}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/payment-method/{id}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/v1/object/payment-method/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/payment-method/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/payment-method/{id}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      description: ""
      operationId: Object_GETPaymentMethod
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object fields to return
          in: query
          name: fields
          required: false
          schema:
            type: string
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    AccountId: 2c93808457d787030157e0314c0945d4
                    AchAddress1: 312 2nd Ave W
                    Active: false
                    BankIdentificationNumber: "411111"
                    CompanyName: ""
                    CreatedById: 2c93808457d787030157e0312ef1445e
                    CreatedDate: 2016-10-20T05:45:10.000+02:00
                    CreditCardAddress1: 312 2nd Ave W
                    CreditCardCity: Seattle
                    CreditCardCountry: United States
                    CreditCardExpirationMonth: 12
                    CreditCardExpirationYear: 2020
                    CreditCardHolderName: Somebody
                    CreditCardMaskNumber: "************1111"
                    CreditCardPostalCode: "98119"
                    CreditCardState: Washington
                    CreditCardType: Visa
                    Id: 2c93808457d787030157e0314e8145d7
                    IdentityNumber: ""
                    IsCompany: false
                    LastTransactionDateTime: 2016-10-20T05:45:10.000+02:00
                    LastTransactionStatus: Approved
                    NumConsecutiveFailures: 7
                    PaymentMethodStatus: Active
                    TotalNumberOfErrorPayments: 0
                    TotalNumberOfProcessedPayments: 1
                    Type: CreditCard
                    UpdatedById: 2c93808457d787030157e0312ef1445e
                    UpdatedDate: 2016-10-20T05:45:10.000+02:00
                    UseDefaultRetryRule: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetPaymentMethod"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    done: true
                    records: {}
                    size: 0
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Retrieve a payment method"
      tags:
        - Payment Methods
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/payment-method/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/payment-method/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/payment-method/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/object/payment-method/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/payment-method/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/payment-method/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: For a use case of this operation, see [Configure Payment Methods](https://www.zuora.com/developer/api-guides/#Configure-payment-methods).
      operationId: Object_PUTPaymentMethod
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyModifyPaymentMethod"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    Id: 2c93808457d787030157e02fced332a2
                    Success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Update a payment method"
      tags:
        - Payment Methods
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "CreditCardAddress1": "312 2nd Ave W_new", 
                "Id": "2c93808457d787030157e02fced332a2"
            }' "https://rest.zuora.com/v1/object/payment-method/{id}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/payment-method/{id}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "CreditCardAddress1": "312 2nd Ave W_new", 
                "Id": "2c93808457d787030157e02fced332a2"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"CreditCardAddress1\": \"312 2nd Ave W_new\", \n    \"Id\": \"2c93808457d787030157e02fced332a2\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/payment-method/{id}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"CreditCardAddress1\": \"312 2nd Ave W_new\", \n    \"Id\": \"2c93808457d787030157e02fced332a2\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/object/payment-method/{id}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/payment-method/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"CreditCardAddress1\": \"312 2nd Ave W_new\", \n    \"Id\": \"2c93808457d787030157e02fced332a2\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/payment-method/{id}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"CreditCardAddress1\": \"312 2nd Ave W_new\", \n    \"Id\": \"2c93808457d787030157e02fced332a2\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/object/payment-transaction-log/{id}":
    get:
      description: |
        Retrieves information about a specific payment transaction log.
      operationId: Object_GETPaymentTransactionLog
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: |
            The ID of a payment transaction log.
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    Gateway: TEST gateway name1476935063101
                    GatewayReasonCode: approve
                    GatewayReasonCodeDescription: This transaction has been approved by Test gateway.
                    GatewayState: Submitted
                    GatewayTransactionType: Sale
                    Id: 2c93808457d787030157e030b2703dcd
                    PaymentId: 2c93808457d787030157e030b2673dcc
                    TransactionDate: 2016-10-20T05:44:30.000+02:00
                    TransactionId: "874200.071357285"
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetPaymentTransactionLog"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    done: true
                    records: {}
                    size: 0
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Retrieve a payment transaction log"
      tags:
        - Payment Transaction Logs
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/payment-transaction-log/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/payment-transaction-log/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/payment-transaction-log/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/object/payment-transaction-log/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/payment-transaction-log/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/payment-transaction-log/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/object/payment/{id}":
    delete:
      description: |
        Deletes a payment. Only payments with the Cancelled status can be deleted. 
      operationId: Object_DELETEPayment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: |
            The unique ID of the payment to be deleted. For example, 2c92c0f85d4e95ae015d4f7e5d690622.
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    Id: 2c92c0f85d4e95ae015d4f7e5d690622
                    Success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyDeleteResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Delete a payment"
      tags:
        - Payments
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/payment/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/payment/{id}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/payment/{id}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/v1/object/payment/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/payment/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/payment/{id}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      description: |
        Retrieves the information about one specific payment. 
      operationId: Object_GETPayment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: |
            The unique ID of a payment. For example, 2c92c095592623ea01596621ada84352.
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    AccountId: 2c92c0f94fd7f22d014fef0b703e26f4
                    Amount: 19696.44
                    AppliedCreditBalanceAmount: 0
                    BankIdentificationNumber: "111111"
                    CreatedById: 2c92c0f955e2bcfc0155e3019d0c4963
                    CreatedDate: 2017-01-03T13:00:00.000-08:00
                    EffectiveDate: 2017-01-03
                    Gateway: Test Gateway2
                    GatewayResponse: This transaction has been approved by Test gateway.
                    GatewayResponseCode: approve
                    GatewayState: Submitted
                    Id: 2c92c095592623ea01596621ada84352
                    PaymentMethodId: 2c92c0f94fd7f22d014fef0b714e26f9
                    PaymentMethodSnapshotId: 2c92c095592623ea01596621ada44351
                    PaymentNumber: P-00000036
                    ReferenceId: "3115031.8425435387"
                    RefundAmount: 0
                    Source: PaymentRun
                    SourceName: PR-00001035
                    Status: Processed
                    SubmittedOn: 2017-01-03T13:00:00.000-08:00
                    Type: Electronic
                    UpdatedById: 2c92c0f955e2bcfc0155e3019d0c4963
                    UpdatedDate: 2017-01-03T13:00:00.000-08:00
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetPayment"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    done: true
                    records: {}
                    size: 0
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Retrieve a payment"
      tags:
        - Payments
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/payment/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/payment/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/payment/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/object/payment/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/payment/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/payment/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: |
        Updates a payment. 
      operationId: Object_PUTPayment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: |
            The unique ID of a payment. For example, 2c92c095592623ea01596621ada84352.
          in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyModifyPayment"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    Id: 2c92c0f85d5964dc015d59bb40ff3f0e
                    Success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Update a payment"
      tags:
        - Payments
      x-code-samples:
        - lang: Curl
          source: "curl -X PUT -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" -d '{}' \"https://rest.zuora.com/v1/object/payment/{id}\""
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/payment/{id}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/payment/{id}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/object/payment/{id}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/payment/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/payment/{id}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/object/product:
    post:
      description: ""
      operationId: Object_POSTProduct
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyCreateProduct"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    Id: 2c93808457d787030157e03246ae5129
                    Success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "400":
          content:
            application/json:
              examples:
                response:
                  value:
                    Errors:
                      - Code: INVALID_VALUE
                        Message: The account number 123xProxy is invalid.
                    Success: false
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyBadRequestResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Create a product"
      tags:
        - Products
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "Description": "Create product via API", 
                "EffectiveEndDate": "2066-10-20", 
                "EffectiveStartDate": "1966-10-20", 
                "Name": "P_1476935173677", 
                "SKU": "API-SKU1476935173677"
            }' "https://rest.zuora.com/v1/object/product"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/product');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "Description": "Create product via API", 
                "EffectiveEndDate": "2066-10-20", 
                "EffectiveStartDate": "1966-10-20", 
                "Name": "P_1476935173677", 
                "SKU": "API-SKU1476935173677"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"Description\": \"Create product via API\", \n    \"EffectiveEndDate\": \"2066-10-20\", \n    \"EffectiveStartDate\": \"1966-10-20\", \n    \"Name\": \"P_1476935173677\", \n    \"SKU\": \"API-SKU1476935173677\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/product")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"Description\": \"Create product via API\", \n    \"EffectiveEndDate\": \"2066-10-20\", \n    \"EffectiveStartDate\": \"1966-10-20\", \n    \"Name\": \"P_1476935173677\", \n    \"SKU\": \"API-SKU1476935173677\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/object/product", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/product")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"Description\": \"Create product via API\", \n    \"EffectiveEndDate\": \"2066-10-20\", \n    \"EffectiveStartDate\": \"1966-10-20\", \n    \"Name\": \"P_1476935173677\", \n    \"SKU\": \"API-SKU1476935173677\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/product");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"Description\": \"Create product via API\", \n    \"EffectiveEndDate\": \"2066-10-20\", \n    \"EffectiveStartDate\": \"1966-10-20\", \n    \"Name\": \"P_1476935173677\", \n    \"SKU\": \"API-SKU1476935173677\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/object/product-feature/{id}":
    delete:
      description: ""
      operationId: Object_DELETEProductFeature
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    id: 2c93808457d787030157e02d820f16d3
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyDeleteResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Delete a product feature"
      tags:
        - Product Features
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/product-feature/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/product-feature/{id}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/product-feature/{id}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/v1/object/product-feature/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/product-feature/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/product-feature/{id}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      description: ""
      operationId: Object_GETProductFeature
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object fields to return
          in: query
          name: fields
          required: false
          schema:
            type: string
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: null
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetProductFeature"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    done: true
                    records: {}
                    size: 0
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Retrieve a product feature"
      tags:
        - Product Features
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/product-feature/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/product-feature/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/product-feature/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/object/product-feature/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/product-feature/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/product-feature/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  /v1/object/product-rate-plan:
    post:
      description: ""
      operationId: Object_POSTProductRatePlan
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyCreateProductRatePlan"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    Id: 2c93808457d787030157e0324735512b
                    Success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "400":
          content:
            application/json:
              examples:
                response:
                  value:
                    Errors:
                      - Code: INVALID_VALUE
                        Message: The account number 123xProxy is invalid.
                    Success: false
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyBadRequestResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Create a product rate plan"
      tags:
        - Product Rate Plans
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "Description": "Test create product rateplan via API", 
                "EffectiveEndDate": "2066-10-20", 
                "EffectiveStartDate": "1966-10-20", 
                "Name": "ProductRatePlan1476935173957", 
                "ProductId": "2c93808457d787030157e03246ae5129"
            }' "https://rest.zuora.com/v1/object/product-rate-plan"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/product-rate-plan');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "Description": "Test create product rateplan via API", 
                "EffectiveEndDate": "2066-10-20", 
                "EffectiveStartDate": "1966-10-20", 
                "Name": "ProductRatePlan1476935173957", 
                "ProductId": "2c93808457d787030157e03246ae5129"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"Description\": \"Test create product rateplan via API\", \n    \"EffectiveEndDate\": \"2066-10-20\", \n    \"EffectiveStartDate\": \"1966-10-20\", \n    \"Name\": \"ProductRatePlan1476935173957\", \n    \"ProductId\": \"2c93808457d787030157e03246ae5129\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/product-rate-plan")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"Description\": \"Test create product rateplan via API\", \n    \"EffectiveEndDate\": \"2066-10-20\", \n    \"EffectiveStartDate\": \"1966-10-20\", \n    \"Name\": \"ProductRatePlan1476935173957\", \n    \"ProductId\": \"2c93808457d787030157e03246ae5129\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/object/product-rate-plan", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/product-rate-plan")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"Description\": \"Test create product rateplan via API\", \n    \"EffectiveEndDate\": \"2066-10-20\", \n    \"EffectiveStartDate\": \"1966-10-20\", \n    \"Name\": \"ProductRatePlan1476935173957\", \n    \"ProductId\": \"2c93808457d787030157e03246ae5129\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/product-rate-plan");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"Description\": \"Test create product rateplan via API\", \n    \"EffectiveEndDate\": \"2066-10-20\", \n    \"EffectiveStartDate\": \"1966-10-20\", \n    \"Name\": \"ProductRatePlan1476935173957\", \n    \"ProductId\": \"2c93808457d787030157e03246ae5129\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/object/product-rate-plan-charge:
    post:
      description: |
        Creates a product rate plan charge for a specified rate plan charge. 

        Product rate plan charges can be of three types, one-time fees, recurring fees, and usage fees. 
      operationId: Object_POSTProductRatePlanCharge
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_X_Zuora_WSDL_Version"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyCreateProductRatePlanCharge"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    Id: 2c93808457d787030157e03197714910
                    Success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Create a product rate plan charge"
      tags:
        - Product Rate Plan Charges
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "AccountingCode": "Deferred Revenue", 
                "BillCycleType": "DefaultFromCustomer", 
                "BillingPeriod": "Month", 
                "ChargeModel": "Volume Pricing", 
                "ChargeType": "Recurring", 
                "DeferredRevenueAccount": "Deferred Revenue", 
                "Name": "Recurring flat fee", 
                "ProductRatePlanChargeTierData": {
                    "ProductRatePlanChargeTier": [
                        {
                            "Currency": "USD", 
                            "Price": 10
                        }
                    ]
                }, 
                "ProductRatePlanId": "2c92c0f8628e007901628f1dc06a453d", 
                "RecognizedRevenueAccount": "Accounts Receivable", 
                "TriggerEvent": "ContractEffective", 
                "UOM": "each", 
                "UseDiscountSpecificAccountingCode": false
            }' "https://rest.zuora.com/v1/object/product-rate-plan-charge"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/product-rate-plan-charge');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "AccountingCode": "Deferred Revenue", 
                "BillCycleType": "DefaultFromCustomer", 
                "BillingPeriod": "Month", 
                "ChargeModel": "Volume Pricing", 
                "ChargeType": "Recurring", 
                "DeferredRevenueAccount": "Deferred Revenue", 
                "Name": "Recurring flat fee", 
                "ProductRatePlanChargeTierData": {
                    "ProductRatePlanChargeTier": [
                        {
                            "Currency": "USD", 
                            "Price": 10
                        }
                    ]
                }, 
                "ProductRatePlanId": "2c92c0f8628e007901628f1dc06a453d", 
                "RecognizedRevenueAccount": "Accounts Receivable", 
                "TriggerEvent": "ContractEffective", 
                "UOM": "each", 
                "UseDiscountSpecificAccountingCode": false
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"AccountingCode\": \"Deferred Revenue\", \n    \"BillCycleType\": \"DefaultFromCustomer\", \n    \"BillingPeriod\": \"Month\", \n    \"ChargeModel\": \"Volume Pricing\", \n    \"ChargeType\": \"Recurring\", \n    \"DeferredRevenueAccount\": \"Deferred Revenue\", \n    \"Name\": \"Recurring flat fee\", \n    \"ProductRatePlanChargeTierData\": {\n        \"ProductRatePlanChargeTier\": [\n            {\n                \"Currency\": \"USD\", \n                \"Price\": 10\n            }\n        ]\n    }, \n    \"ProductRatePlanId\": \"2c92c0f8628e007901628f1dc06a453d\", \n    \"RecognizedRevenueAccount\": \"Accounts Receivable\", \n    \"TriggerEvent\": \"ContractEffective\", \n    \"UOM\": \"each\", \n    \"UseDiscountSpecificAccountingCode\": false\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/product-rate-plan-charge")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"AccountingCode\": \"Deferred Revenue\", \n    \"BillCycleType\": \"DefaultFromCustomer\", \n    \"BillingPeriod\": \"Month\", \n    \"ChargeModel\": \"Volume Pricing\", \n    \"ChargeType\": \"Recurring\", \n    \"DeferredRevenueAccount\": \"Deferred Revenue\", \n    \"Name\": \"Recurring flat fee\", \n    \"ProductRatePlanChargeTierData\": {\n        \"ProductRatePlanChargeTier\": [\n            {\n                \"Currency\": \"USD\", \n                \"Price\": 10\n            }\n        ]\n    }, \n    \"ProductRatePlanId\": \"2c92c0f8628e007901628f1dc06a453d\", \n    \"RecognizedRevenueAccount\": \"Accounts Receivable\", \n    \"TriggerEvent\": \"ContractEffective\", \n    \"UOM\": \"each\", \n    \"UseDiscountSpecificAccountingCode\": false\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/object/product-rate-plan-charge", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/product-rate-plan-charge")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"AccountingCode\": \"Deferred Revenue\", \n    \"BillCycleType\": \"DefaultFromCustomer\", \n    \"BillingPeriod\": \"Month\", \n    \"ChargeModel\": \"Volume Pricing\", \n    \"ChargeType\": \"Recurring\", \n    \"DeferredRevenueAccount\": \"Deferred Revenue\", \n    \"Name\": \"Recurring flat fee\", \n    \"ProductRatePlanChargeTierData\": {\n        \"ProductRatePlanChargeTier\": [\n            {\n                \"Currency\": \"USD\", \n                \"Price\": 10\n            }\n        ]\n    }, \n    \"ProductRatePlanId\": \"2c92c0f8628e007901628f1dc06a453d\", \n    \"RecognizedRevenueAccount\": \"Accounts Receivable\", \n    \"TriggerEvent\": \"ContractEffective\", \n    \"UOM\": \"each\", \n    \"UseDiscountSpecificAccountingCode\": false\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/product-rate-plan-charge");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"AccountingCode\": \"Deferred Revenue\", \n    \"BillCycleType\": \"DefaultFromCustomer\", \n    \"BillingPeriod\": \"Month\", \n    \"ChargeModel\": \"Volume Pricing\", \n    \"ChargeType\": \"Recurring\", \n    \"DeferredRevenueAccount\": \"Deferred Revenue\", \n    \"Name\": \"Recurring flat fee\", \n    \"ProductRatePlanChargeTierData\": {\n        \"ProductRatePlanChargeTier\": [\n            {\n                \"Currency\": \"USD\", \n                \"Price\": 10\n            }\n        ]\n    }, \n    \"ProductRatePlanId\": \"2c92c0f8628e007901628f1dc06a453d\", \n    \"RecognizedRevenueAccount\": \"Accounts Receivable\", \n    \"TriggerEvent\": \"ContractEffective\", \n    \"UOM\": \"each\", \n    \"UseDiscountSpecificAccountingCode\": false\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/object/product-rate-plan-charge-tier/{id}":
    get:
      description: ""
      operationId: Object_GETProductRatePlanChargeTier
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object fields to return
          in: query
          name: fields
          required: false
          schema:
            type: string
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    CreatedById: 2c93808457d787030157e02fd0f132a4
                    CreatedDate: 2016-10-20T05:43:38.000+02:00
                    Currency: USD
                    EndingUnit: 0
                    Id: 2c93808457d787030157e02fe725341f
                    Price: 30
                    PriceFormat: Flat Fee
                    StartingUnit: 0
                    Tier: 1
                    UpdatedById: 2c93808457d787030157e02fd0f132a4
                    UpdatedDate: 2016-10-20T05:43:38.000+02:00
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetProductRatePlanChargeTier"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    done: true
                    records: {}
                    size: 0
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Retrieve a product rate plan charge tier"
      tags:
        - Product Rate Plan Charge Tiers
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/product-rate-plan-charge-tier/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/product-rate-plan-charge-tier/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/product-rate-plan-charge-tier/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/object/product-rate-plan-charge-tier/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/product-rate-plan-charge-tier/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/product-rate-plan-charge-tier/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: |
        Updates the price of a product rate plan charge tier.

        To make other updates to product rate plan charge tiers, use [CRUD: Update a product rate plan charge](https://www.zuora.com/developer/api-reference/#operation/Object_PUTProductRatePlanCharge) and specify `ProductRatePlanChargeTierData` in the request body.
      operationId: Object_PUTProductRatePlanChargeTier
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: |
            The unique ID of the product rate plan charge tier to be updated. For example, 2c92c0f86c85891e016c88d55a6e543b.
          in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyModifyProductRatePlanChargeTier"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    Id: 2c92c0f86c85891e016c88d55a6e543b
                    Success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Update a product rate plan charge tier"
      tags:
        - Product Rate Plan Charge Tiers
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "Price": 1.99
            }' "https://rest.zuora.com/v1/object/product-rate-plan-charge-tier/{id}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/product-rate-plan-charge-tier/{id}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "Price": 1.99
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"Price\": 1.99\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/product-rate-plan-charge-tier/{id}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"Price\": 1.99\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/object/product-rate-plan-charge-tier/{id}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/product-rate-plan-charge-tier/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"Price\": 1.99\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/product-rate-plan-charge-tier/{id}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"Price\": 1.99\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/object/product-rate-plan-charge/{id}":
    delete:
      description: |
        Deletes a product rate plan charge.
      operationId: Object_DELETEProductRatePlanCharge
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: |
            The unique ID of the product rate plan charge to be deleted. For example, 2c93808457d787030157e031fcd34e19.
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    id: 2c93808457d787030157e031fcd34e19
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyDeleteResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Delete a product rate plan charge"
      tags:
        - Product Rate Plan Charges
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/product-rate-plan-charge/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/product-rate-plan-charge/{id}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/product-rate-plan-charge/{id}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/v1/object/product-rate-plan-charge/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/product-rate-plan-charge/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/product-rate-plan-charge/{id}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      description: ""
      operationId: Object_GETProductRatePlanCharge
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object fields to return
          in: query
          name: fields
          required: false
          schema:
            type: string
        - description: |
            The unique ID of a product rate plan charge to be retrieved. For example, 2c93808457d787030157e031fcd34e19.
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    AccountingCode: name_1476935155610
                    BillCycleDay: 1
                    BillCycleType: DefaultFromCustomer
                    BillingPeriod: Month
                    BillingPeriodAlignment: AlignToCharge
                    BillingTiming: In Advance
                    ChargeModel: Flat Fee Pricing
                    ChargeType: Recurring
                    CreatedById: 2c93808457d787030157e031dd264c85
                    CreatedDate: 2016-10-20T05:45:55.000+02:00
                    DefaultQuantity: 1
                    DeferredRevenueAccount: name_1476935155610
                    Description: Recurring Flat Fee Pricing
                    EndDateCondition: SubscriptionEnd
                    Id: 2c93808457d787030157e032002b4e21
                    IncludedUnits: 0
                    LegacyRevenueReporting: false
                    ListPriceBase: Per Billing Period
                    Name: Recurring_Flat Fee Pricing1476935155610
                    NumberOfPeriod: 1
                    OverageCalculationOption: EndOfSmoothingPeriod
                    OverageUnusedUnitsCreditOption: NoCredit
                    PriceChangeOption: NoChange
                    PriceIncreasePercentage: 0
                    ProductRatePlanId: 2c93808457d787030157e031ff054e1e
                    RecognizedRevenueAccount: name_1476935155610
                    RevenueRecognitionRuleName: Recognize upon invoicing
                    Taxable: false
                    TriggerEvent: ContractEffective
                    UpToPeriodsType: Billing Periods
                    UpdatedById: 2c93808457d787030157e031dd264c85
                    UpdatedDate: 2016-10-20T05:45:55.000+02:00
                    UseTenantDefaultForPriceChange: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetProductRatePlanCharge"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    done: true
                    records: {}
                    size: 0
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Retrieve a product rate plan charge"
      tags:
        - Product Rate Plan Charges
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/product-rate-plan-charge/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/product-rate-plan-charge/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/product-rate-plan-charge/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/object/product-rate-plan-charge/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/product-rate-plan-charge/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/product-rate-plan-charge/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: |
        Updates the information about a product rate plan charge.
      operationId: Object_PUTProductRatePlanCharge
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_X_Zuora_WSDL_Version"
        - description: |
            The unique ID of the product rate plan charge to be updated. For example, 2c93808457d787030157e031fcd34e19.
          in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyModifyProductRatePlanCharge"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    Id: 2c93808457d787030157e03197714910
                    Success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    done: true
                    records: {}
                    size: 0
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Update a product rate plan charge"
      tags:
        - Product Rate Plan Charges
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "AccountingCode": "Deferred Revenue", 
                "BillCycleType": "DefaultFromCustomer", 
                "BillingPeriod": "Month", 
                "ChargeModel": "Flat fee Pricing", 
                "DeferredRevenueAccount": "Deferred Revenue", 
                "Name": "Recurring flat fee", 
                "ProductRatePlanChargeTierData": {
                    "ProductRatePlanChargeTier": [
                        {
                            "Currency": "USD", 
                            "Price": 10
                        }
                    ]
                }, 
                "ProductRatePlanId": "2c92c0f8628e007901628f1dc06a453d", 
                "RecognizedRevenueAccount": "Accounts Receivable", 
                "TriggerEvent": "ContractEffective", 
                "UOM": "each", 
                "UseDiscountSpecificAccountingCode": false
            }' "https://rest.zuora.com/v1/object/product-rate-plan-charge/{id}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/product-rate-plan-charge/{id}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "AccountingCode": "Deferred Revenue", 
                "BillCycleType": "DefaultFromCustomer", 
                "BillingPeriod": "Month", 
                "ChargeModel": "Flat fee Pricing", 
                "DeferredRevenueAccount": "Deferred Revenue", 
                "Name": "Recurring flat fee", 
                "ProductRatePlanChargeTierData": {
                    "ProductRatePlanChargeTier": [
                        {
                            "Currency": "USD", 
                            "Price": 10
                        }
                    ]
                }, 
                "ProductRatePlanId": "2c92c0f8628e007901628f1dc06a453d", 
                "RecognizedRevenueAccount": "Accounts Receivable", 
                "TriggerEvent": "ContractEffective", 
                "UOM": "each", 
                "UseDiscountSpecificAccountingCode": false
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"AccountingCode\": \"Deferred Revenue\", \n    \"BillCycleType\": \"DefaultFromCustomer\", \n    \"BillingPeriod\": \"Month\", \n    \"ChargeModel\": \"Flat fee Pricing\", \n    \"DeferredRevenueAccount\": \"Deferred Revenue\", \n    \"Name\": \"Recurring flat fee\", \n    \"ProductRatePlanChargeTierData\": {\n        \"ProductRatePlanChargeTier\": [\n            {\n                \"Currency\": \"USD\", \n                \"Price\": 10\n            }\n        ]\n    }, \n    \"ProductRatePlanId\": \"2c92c0f8628e007901628f1dc06a453d\", \n    \"RecognizedRevenueAccount\": \"Accounts Receivable\", \n    \"TriggerEvent\": \"ContractEffective\", \n    \"UOM\": \"each\", \n    \"UseDiscountSpecificAccountingCode\": false\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/product-rate-plan-charge/{id}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"AccountingCode\": \"Deferred Revenue\", \n    \"BillCycleType\": \"DefaultFromCustomer\", \n    \"BillingPeriod\": \"Month\", \n    \"ChargeModel\": \"Flat fee Pricing\", \n    \"DeferredRevenueAccount\": \"Deferred Revenue\", \n    \"Name\": \"Recurring flat fee\", \n    \"ProductRatePlanChargeTierData\": {\n        \"ProductRatePlanChargeTier\": [\n            {\n                \"Currency\": \"USD\", \n                \"Price\": 10\n            }\n        ]\n    }, \n    \"ProductRatePlanId\": \"2c92c0f8628e007901628f1dc06a453d\", \n    \"RecognizedRevenueAccount\": \"Accounts Receivable\", \n    \"TriggerEvent\": \"ContractEffective\", \n    \"UOM\": \"each\", \n    \"UseDiscountSpecificAccountingCode\": false\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/object/product-rate-plan-charge/{id}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/product-rate-plan-charge/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"AccountingCode\": \"Deferred Revenue\", \n    \"BillCycleType\": \"DefaultFromCustomer\", \n    \"BillingPeriod\": \"Month\", \n    \"ChargeModel\": \"Flat fee Pricing\", \n    \"DeferredRevenueAccount\": \"Deferred Revenue\", \n    \"Name\": \"Recurring flat fee\", \n    \"ProductRatePlanChargeTierData\": {\n        \"ProductRatePlanChargeTier\": [\n            {\n                \"Currency\": \"USD\", \n                \"Price\": 10\n            }\n        ]\n    }, \n    \"ProductRatePlanId\": \"2c92c0f8628e007901628f1dc06a453d\", \n    \"RecognizedRevenueAccount\": \"Accounts Receivable\", \n    \"TriggerEvent\": \"ContractEffective\", \n    \"UOM\": \"each\", \n    \"UseDiscountSpecificAccountingCode\": false\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/product-rate-plan-charge/{id}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"AccountingCode\": \"Deferred Revenue\", \n    \"BillCycleType\": \"DefaultFromCustomer\", \n    \"BillingPeriod\": \"Month\", \n    \"ChargeModel\": \"Flat fee Pricing\", \n    \"DeferredRevenueAccount\": \"Deferred Revenue\", \n    \"Name\": \"Recurring flat fee\", \n    \"ProductRatePlanChargeTierData\": {\n        \"ProductRatePlanChargeTier\": [\n            {\n                \"Currency\": \"USD\", \n                \"Price\": 10\n            }\n        ]\n    }, \n    \"ProductRatePlanId\": \"2c92c0f8628e007901628f1dc06a453d\", \n    \"RecognizedRevenueAccount\": \"Accounts Receivable\", \n    \"TriggerEvent\": \"ContractEffective\", \n    \"UOM\": \"each\", \n    \"UseDiscountSpecificAccountingCode\": false\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/object/product-rate-plan/{id}":
    delete:
      description: ""
      operationId: Object_DELETEProductRatePlan
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    id: 2c93808457d787030157e02d9dde184f
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyDeleteResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Delete a product rate plan"
      tags:
        - Product Rate Plans
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/product-rate-plan/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/product-rate-plan/{id}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/product-rate-plan/{id}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/v1/object/product-rate-plan/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/product-rate-plan/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/product-rate-plan/{id}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      description: ""
      operationId: Object_GETProductRatePlan
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object fields to return
          in: query
          name: fields
          required: false
          schema:
            type: string
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    CreatedById: 2c93808457d787030157e02d84c116d5
                    CreatedDate: 2016-10-20T05:41:09.000+02:00
                    Description: Test create product rateplan via API
                    EffectiveEndDate: 2066-10-20
                    EffectiveStartDate: 1966-10-20
                    Id: 2c93808457d787030157e02da0d91852
                    Name: ProductRatePlan1476934869186_new
                    ProductId: 2c93808457d787030157e02da0231850
                    UpdatedById: 2c93808457d787030157e02d84c116d5
                    UpdatedDate: 2016-10-20T05:41:09.000+02:00
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetProductRatePlan"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    done: true
                    records: {}
                    size: 0
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Retrieve a product rate plan"
      tags:
        - Product Rate Plans
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/product-rate-plan/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/product-rate-plan/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/product-rate-plan/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/object/product-rate-plan/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/product-rate-plan/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/product-rate-plan/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: ""
      operationId: Object_PUTProductRatePlan
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyModifyProductRatePlan"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    Id: 2c93808457d787030157e02da0d91852
                    Success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Update a product rate plan"
      tags:
        - Product Rate Plans
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "Id": "2c93808457d787030157e02da0d91852", 
                "Name": "ProductRatePlan1476934869186_new"
            }' "https://rest.zuora.com/v1/object/product-rate-plan/{id}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/product-rate-plan/{id}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "Id": "2c93808457d787030157e02da0d91852", 
                "Name": "ProductRatePlan1476934869186_new"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"Id\": \"2c93808457d787030157e02da0d91852\", \n    \"Name\": \"ProductRatePlan1476934869186_new\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/product-rate-plan/{id}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"Id\": \"2c93808457d787030157e02da0d91852\", \n    \"Name\": \"ProductRatePlan1476934869186_new\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/object/product-rate-plan/{id}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/product-rate-plan/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"Id\": \"2c93808457d787030157e02da0d91852\", \n    \"Name\": \"ProductRatePlan1476934869186_new\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/product-rate-plan/{id}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"Id\": \"2c93808457d787030157e02da0d91852\", \n    \"Name\": \"ProductRatePlan1476934869186_new\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/object/product/{id}":
    delete:
      description: ""
      operationId: Object_DELETEProduct
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    id: 2c93808457d787030157e02e7a22220e
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyDeleteResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Delete a product"
      tags:
        - Products
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/product/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/product/{id}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/product/{id}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/v1/object/product/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/product/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/product/{id}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      description: ""
      operationId: Object_GETProduct
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object fields to return
          in: query
          name: fields
          required: false
          schema:
            type: string
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    CreatedById: 2c93808457d787030157e02e62af2097
                    CreatedDate: 2016-10-20T05:42:05.000+02:00
                    Description: Create product via API_new
                    EffectiveEndDate: 2066-10-20
                    EffectiveStartDate: 1966-10-20
                    Id: 2c93808457d787030157e02e7be22210
                    Name: P_1476934925293_new
                    SKU: API-SKU1476934925293
                    UpdatedById: 2c93808457d787030157e02e62af2097
                    UpdatedDate: 2016-10-20T05:42:05.000+02:00
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetProduct"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    done: true
                    records: {}
                    size: 0
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Retrieve a product"
      tags:
        - Products
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/product/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/product/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/product/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/object/product/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/product/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/product/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: ""
      operationId: Object_PUTProduct
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyModifyProduct"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    Id: 2c93808457d787030157e02e7be22210
                    Success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Update a product"
      tags:
        - Products
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "Description": "Create product via API_new", 
                "EffectiveEndDate": "2066-10-20", 
                "EffectiveStartDate": "1966-10-20", 
                "Id": "2c93808457d787030157e02e7be22210", 
                "Name": "P_1476934925293_new", 
                "SKU": "API-SKU1476934925293"
            }' "https://rest.zuora.com/v1/object/product/{id}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/product/{id}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "Description": "Create product via API_new", 
                "EffectiveEndDate": "2066-10-20", 
                "EffectiveStartDate": "1966-10-20", 
                "Id": "2c93808457d787030157e02e7be22210", 
                "Name": "P_1476934925293_new", 
                "SKU": "API-SKU1476934925293"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"Description\": \"Create product via API_new\", \n    \"EffectiveEndDate\": \"2066-10-20\", \n    \"EffectiveStartDate\": \"1966-10-20\", \n    \"Id\": \"2c93808457d787030157e02e7be22210\", \n    \"Name\": \"P_1476934925293_new\", \n    \"SKU\": \"API-SKU1476934925293\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/product/{id}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"Description\": \"Create product via API_new\", \n    \"EffectiveEndDate\": \"2066-10-20\", \n    \"EffectiveStartDate\": \"1966-10-20\", \n    \"Id\": \"2c93808457d787030157e02e7be22210\", \n    \"Name\": \"P_1476934925293_new\", \n    \"SKU\": \"API-SKU1476934925293\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/object/product/{id}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/product/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"Description\": \"Create product via API_new\", \n    \"EffectiveEndDate\": \"2066-10-20\", \n    \"EffectiveStartDate\": \"1966-10-20\", \n    \"Id\": \"2c93808457d787030157e02e7be22210\", \n    \"Name\": \"P_1476934925293_new\", \n    \"SKU\": \"API-SKU1476934925293\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/product/{id}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"Description\": \"Create product via API_new\", \n    \"EffectiveEndDate\": \"2066-10-20\", \n    \"EffectiveStartDate\": \"1966-10-20\", \n    \"Id\": \"2c93808457d787030157e02e7be22210\", \n    \"Name\": \"P_1476934925293_new\", \n    \"SKU\": \"API-SKU1476934925293\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/object/rate-plan-charge-tier/{id}":
    get:
      description: ""
      operationId: Object_GETRatePlanChargeTier
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object fields to return
          in: query
          name: fields
          required: false
          schema:
            type: string
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    CreatedById: 2c93808457d787030157e02da3161854
                    CreatedDate: 2016-10-20T05:41:16.000+02:00
                    EndingUnit: 0
                    Id: 2c93808457d787030157e02dbecc19d8
                    Price: 30
                    PriceFormat: Flat Fee
                    RatePlanChargeId: 2c93808457d787030157e02dbee919da
                    StartingUnit: 0
                    Tier: 1
                    UpdatedById: 2c93808457d787030157e02da3161854
                    UpdatedDate: 2016-10-20T05:41:16.000+02:00
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetRatePlanChargeTier"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    done: true
                    records: {}
                    size: 0
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Retrieve a rate plan charge tier"
      tags:
        - Rate Plan Charge Tiers
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/rate-plan-charge-tier/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/rate-plan-charge-tier/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/rate-plan-charge-tier/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/object/rate-plan-charge-tier/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/rate-plan-charge-tier/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/rate-plan-charge-tier/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/object/rate-plan-charge/{id}":
    get:
      description: ""
      operationId: Object_GETRatePlanCharge
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object fields to return
          in: query
          name: fields
          required: false
          schema:
            type: string
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    AccountingCode: name_1476934998566
                    BillCycleDay: 1
                    BillCycleType: DefaultFromCustomer
                    BillingPeriod: Month
                    BillingPeriodAlignment: AlignToCharge
                    BillingTiming: In Arrears
                    ChargeModel: Flat Fee Pricing
                    ChargeNumber: C-00000001
                    ChargeType: Recurring
                    CreatedById: 2c93808457d787030157e02f84852e27
                    CreatedDate: 2016-10-20T05:43:18.000+02:00
                    Description: Recurring Flat Fee Pricing
                    EndDateCondition: SubscriptionEnd
                    Id: 2c93808457d787030157e02f9b802fad
                    IsLastSegment: true
                    ListPriceBase: Per Billing Period
                    Name: Recurring_Flat Fee Pricing1476934998566
                    NumberOfPeriods: 1
                    OriginalId: 2c93808457d787030157e02f9b802fad
                    OverageCalculationOption: EndOfSmoothingPeriod
                    OverageUnusedUnitsCreditOption: NoCredit
                    PriceChangeOption: NoChange
                    PriceIncreasePercentage: 0
                    Quantity: 1
                    RatePlanId: 2c93808457d787030157e02f9b762fac
                    RolloverBalance: 0
                    Segment: 1
                    TriggerEvent: ContractEffective
                    UpToPeriodsType: Billing Periods
                    UpdatedById: 2c93808457d787030157e02f84852e27
                    UpdatedDate: 2016-10-20T05:43:19.000+02:00
                    Version: 1
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetRatePlanCharge"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    done: true
                    records: {}
                    size: 0
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Retrieve a rate plan charge"
      tags:
        - Rate Plan Charges
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/rate-plan-charge/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/rate-plan-charge/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/rate-plan-charge/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/object/rate-plan-charge/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/rate-plan-charge/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/rate-plan-charge/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: ""
      operationId: Object_PUTRatePlanCharge
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyModifyRatePlanCharge"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    Id: 2c92c0f86a79e2e4016a8bad616b257c
                    Success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Update a rate plan charge"
      tags:
        - Rate Plan Charges
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "PriceIncreasePercentage": 10
            }' "https://rest.zuora.com/v1/object/rate-plan-charge/{id}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/rate-plan-charge/{id}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "PriceIncreasePercentage": 10
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"PriceIncreasePercentage\": 10\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/rate-plan-charge/{id}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"PriceIncreasePercentage\": 10\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/object/rate-plan-charge/{id}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/rate-plan-charge/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"PriceIncreasePercentage\": 10\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/rate-plan-charge/{id}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"PriceIncreasePercentage\": 10\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/object/rate-plan/{id}":
    get:
      description: ""
      operationId: Object_GETRatePlan
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object fields to return
          in: query
          name: fields
          required: false
          schema:
            type: string
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    AmendmentId: 2c93808457d787030157e02ec4b42599
                    CreatedById: 2c93808457d787030157e02ea77723ef
                    CreatedDate: 2016-10-20T05:42:24.000+02:00
                    Id: 2c93808457d787030157e02ec54f259e
                    Name: ProductRatePlan1476934943281
                    UpdatedById: 2c93808457d787030157e02ea77723ef
                    UpdatedDate: 2016-10-20T05:42:24.000+02:00
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetRatePlan"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    done: true
                    records: {}
                    size: 0
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Retrieve a rate plan"
      tags:
        - Rate Plans
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/rate-plan/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/rate-plan/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/rate-plan/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/object/rate-plan/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/rate-plan/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/rate-plan/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  /v1/object/refund:
    post:
      description: |
        Creates a refund. 

        If you have the Invoice Settlement feature enabled, you can use this operation to unapply the payment from an invoice or multiple invoices, and refund the payment. 

        If the unapplied payment is left in the following scenarios, you have to reapply the unapplied payment to the original invoices:

        - An electronic refund in Processing status is handled to change to Error. An unapplied payment is left. 
        - An electronic refund gets to Error, and payment reapplying fails due to the concurrent issue. 
        - The refund canceling operation updates the status of a refund from Processed to Canceled. When it is successful, an unapplied payment is left.
      operationId: Object_POSTRefund
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyCreateRefund"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    Id: 2c93808457d787030157e03198c84918
                    Success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "400":
          content:
            application/json:
              examples:
                response:
                  value:
                    Errors:
                      - Code: INVALID_VALUE
                        Message: The account number 123xProxy is invalid.
                    Success: false
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyBadRequestResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Create a refund"
      tags:
        - Refunds
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "AccountId": "2c93808457d787030157e03190e748ea", 
                "Amount": 1.1, 
                "Comment": "this is comments", 
                "PaymentId": "2c93808457d787030157e03197714910", 
                "ReasonCode": "Standard Refund", 
                "RefundInvoicePaymentData": {
                    "RefundInvoicePayment": [
                        {
                            "InvoiceId": "2c93808457d787030157e03195604902", 
                            "RefundAmount": 1.1
                        }
                    ]
                }, 
                "SoftDescriptor": "thisSD", 
                "SoftDescriptorPhone": "contact@example.com", 
                "SourceType": "Payment", 
                "Type": "Electronic"
            }' "https://rest.zuora.com/v1/object/refund"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/refund');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "AccountId": "2c93808457d787030157e03190e748ea", 
                "Amount": 1.1, 
                "Comment": "this is comments", 
                "PaymentId": "2c93808457d787030157e03197714910", 
                "ReasonCode": "Standard Refund", 
                "RefundInvoicePaymentData": {
                    "RefundInvoicePayment": [
                        {
                            "InvoiceId": "2c93808457d787030157e03195604902", 
                            "RefundAmount": 1.1
                        }
                    ]
                }, 
                "SoftDescriptor": "thisSD", 
                "SoftDescriptorPhone": "contact@example.com", 
                "SourceType": "Payment", 
                "Type": "Electronic"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"AccountId\": \"2c93808457d787030157e03190e748ea\", \n    \"Amount\": 1.1, \n    \"Comment\": \"this is comments\", \n    \"PaymentId\": \"2c93808457d787030157e03197714910\", \n    \"ReasonCode\": \"Standard Refund\", \n    \"RefundInvoicePaymentData\": {\n        \"RefundInvoicePayment\": [\n            {\n                \"InvoiceId\": \"2c93808457d787030157e03195604902\", \n                \"RefundAmount\": 1.1\n            }\n        ]\n    }, \n    \"SoftDescriptor\": \"thisSD\", \n    \"SoftDescriptorPhone\": \"contact@example.com\", \n    \"SourceType\": \"Payment\", \n    \"Type\": \"Electronic\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/refund")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"AccountId\": \"2c93808457d787030157e03190e748ea\", \n    \"Amount\": 1.1, \n    \"Comment\": \"this is comments\", \n    \"PaymentId\": \"2c93808457d787030157e03197714910\", \n    \"ReasonCode\": \"Standard Refund\", \n    \"RefundInvoicePaymentData\": {\n        \"RefundInvoicePayment\": [\n            {\n                \"InvoiceId\": \"2c93808457d787030157e03195604902\", \n                \"RefundAmount\": 1.1\n            }\n        ]\n    }, \n    \"SoftDescriptor\": \"thisSD\", \n    \"SoftDescriptorPhone\": \"contact@example.com\", \n    \"SourceType\": \"Payment\", \n    \"Type\": \"Electronic\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/object/refund", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/refund")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"AccountId\": \"2c93808457d787030157e03190e748ea\", \n    \"Amount\": 1.1, \n    \"Comment\": \"this is comments\", \n    \"PaymentId\": \"2c93808457d787030157e03197714910\", \n    \"ReasonCode\": \"Standard Refund\", \n    \"RefundInvoicePaymentData\": {\n        \"RefundInvoicePayment\": [\n            {\n                \"InvoiceId\": \"2c93808457d787030157e03195604902\", \n                \"RefundAmount\": 1.1\n            }\n        ]\n    }, \n    \"SoftDescriptor\": \"thisSD\", \n    \"SoftDescriptorPhone\": \"contact@example.com\", \n    \"SourceType\": \"Payment\", \n    \"Type\": \"Electronic\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/refund");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"AccountId\": \"2c93808457d787030157e03190e748ea\", \n    \"Amount\": 1.1, \n    \"Comment\": \"this is comments\", \n    \"PaymentId\": \"2c93808457d787030157e03197714910\", \n    \"ReasonCode\": \"Standard Refund\", \n    \"RefundInvoicePaymentData\": {\n        \"RefundInvoicePayment\": [\n            {\n                \"InvoiceId\": \"2c93808457d787030157e03195604902\", \n                \"RefundAmount\": 1.1\n            }\n        ]\n    }, \n    \"SoftDescriptor\": \"thisSD\", \n    \"SoftDescriptorPhone\": \"contact@example.com\", \n    \"SourceType\": \"Payment\", \n    \"Type\": \"Electronic\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/object/refund-invoice-payment/{id}":
    get:
      description: ""
      operationId: Object_GETRefundInvoicePayment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object fields to return
          in: query
          name: fields
          required: false
          schema:
            type: string
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetRefundInvoicePayment"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    done: true
                    records: {}
                    size: 0
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Retrieve a refund invoice payment"
      tags:
        - Refund Invoice Payments
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/refund-invoice-payment/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/refund-invoice-payment/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/refund-invoice-payment/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/object/refund-invoice-payment/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/refund-invoice-payment/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/refund-invoice-payment/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/object/refund-transaction-log/{id}":
    get:
      description: ""
      operationId: Object_GETRefundTransactionLog
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object fields to return
          in: query
          name: fields
          required: false
          schema:
            type: string
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    Gateway: TEST gateway name1476935035677
                    GatewayReasonCode: approve
                    GatewayReasonCodeDescription: This transaction has been approved by Test gateway.
                    GatewayState: Submitted
                    GatewayTransactionType: Refund
                    Id: 2c93808457d787030157e0304c0538f2
                    RefundId: 2c93808457d787030157e0304bf638f0
                    TransactionDate: 2016-10-20T05:44:04.000+02:00
                    TransactionId: "9036150.175338026"
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetRefundTransactionLog"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    done: true
                    records: {}
                    size: 0
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Retrieve a refund transaction log"
      tags:
        - Refund Transaction Logs
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/refund-transaction-log/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/refund-transaction-log/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/refund-transaction-log/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/object/refund-transaction-log/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/refund-transaction-log/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/refund-transaction-log/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/object/refund/{id}":
    delete:
      description: ""
      operationId: Object_DELETERefund
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    id: 2c93808457d787030157e03198c84918
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyDeleteResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Delete a refund"
      tags:
        - Refunds
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/refund/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/refund/{id}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/refund/{id}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/v1/object/refund/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/refund/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/refund/{id}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      description: ""
      operationId: Object_GETRefund
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object fields to return
          in: query
          name: fields
          required: false
          schema:
            type: string
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value: null
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetRefund"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    done: true
                    records: {}
                    size: 0
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Retrieve a refund"
      tags:
        - Refunds
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/refund/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/refund/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/refund/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/object/refund/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/refund/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/refund/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: ""
      operationId: Object_PUTRefund
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyModifyRefund"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    Id: 2c93808457d787030157e03198c84918
                    Success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Update a refund"
      tags:
        - Refunds
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "Id": "2c93808457d787030157e03198c84918", 
                "Status": "Canceled"
            }' "https://rest.zuora.com/v1/object/refund/{id}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/refund/{id}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "Id": "2c93808457d787030157e03198c84918", 
                "Status": "Canceled"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"Id\": \"2c93808457d787030157e03198c84918\", \n    \"Status\": \"Canceled\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/refund/{id}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"Id\": \"2c93808457d787030157e03198c84918\", \n    \"Status\": \"Canceled\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/object/refund/{id}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/refund/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"Id\": \"2c93808457d787030157e03198c84918\", \n    \"Status\": \"Canceled\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/refund/{id}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"Id\": \"2c93808457d787030157e03198c84918\", \n    \"Status\": \"Canceled\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/object/subscription-product-feature/{id}":
    get:
      description: ""
      operationId: Object_GETSubscriptionProductFeature
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object fields to return
          in: query
          name: fields
          required: false
          schema:
            type: string
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    CreatedById: 2c93808457d787030157e03151e845e3
                    CreatedDate: 2016-10-20T05:45:17.000+02:00
                    Description: update description
                    FeatureCode: feature_code_1476935116658
                    FeatureId: 2c93808457d787030157e03167fe4758
                    Id: 2c93808457d787030157e0316ae7476a
                    Name: name_1476935116658
                    RatePlanId: 2c93808457d787030157e0316ae64769
                    UpdatedById: 2c93808457d787030157e03151e845e3
                    UpdatedDate: 2016-10-20T05:45:18.000+02:00
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetSubscriptionProductFeature"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    done: true
                    records: {}
                    size: 0
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Retrieve a subscription product feature"
      tags:
        - Subscription Product Features
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/subscription-product-feature/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/subscription-product-feature/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/subscription-product-feature/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/object/subscription-product-feature/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/subscription-product-feature/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/subscription-product-feature/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/object/subscription/{id}":
    delete:
      description: ""
      operationId: Object_DELETESubscription
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    id: 2c93808457d787030157e02ea04123cf
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyDeleteResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Delete a subscription"
      tags:
        - Subscriptions
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/subscription/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/subscription/{id}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/subscription/{id}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/v1/object/subscription/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/subscription/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/subscription/{id}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      description: ""
      operationId: Object_GETSubscription
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_X_Zuora_WSDL_Version"
        - description: Object fields to return
          in: query
          name: fields
          required: false
          schema:
            type: string
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    AccountId: 2c92c0fa6343984c0163498b71a604b2
                    AutoRenew: false
                    ContractAcceptanceDate: 2018-05-10
                    ContractEffectiveDate: 2018-05-10
                    CreatedById: 2c92c0f9631b0084016323ec8720683d
                    CreatedDate: 2018-05-10T18:14:25.000+08:00
                    CurrentTerm: 12
                    CurrentTermPeriodType: Month
                    Id: 2c92c0fa6343984c0163498b71fe04be
                    InitialTerm: 12
                    InitialTermPeriodType: Month
                    IsInvoiceSeparate: false
                    Name: A-S00000177
                    OriginalCreatedDate: 2018-05-10T18:14:25.000+08:00
                    OriginalId: 2c92c0fa6343984c0163498b71fe04be
                    RenewalSetting: RENEW_WITH_SPECIFIC_TERM
                    RenewalTerm: 12
                    RenewalTermPeriodType: Month
                    Revision: "1.0"
                    ServiceActivationDate: 2018-05-10
                    Status: Expired
                    SubscriptionEndDate: 2019-05-10
                    SubscriptionStartDate: 2018-05-10
                    TermEndDate: 2019-05-10
                    TermStartDate: 2018-05-10
                    TermType: TERMED
                    UpdatedById: 2c92c0f9631b0084016323ec8720683d
                    UpdatedDate: 2018-05-11T11:38:03.000+08:00
                    Version: 1
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetSubscription"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    done: true
                    records: {}
                    size: 0
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Retrieve a subscription"
      tags:
        - Subscriptions
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/subscription/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/subscription/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/subscription/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/object/subscription/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/subscription/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/subscription/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: ""
      operationId: Object_PUTSubscription
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyModifySubscription"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    Id: 2c93808457d787030157e02ea04123cf
                    Success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Update a subscription"
      tags:
        - Subscriptions
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "Name": "S_1476934934547_name", 
                "Notes": "this is notes_new"
            }' "https://rest.zuora.com/v1/object/subscription/{id}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/subscription/{id}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "Name": "S_1476934934547_name", 
                "Notes": "this is notes_new"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"Name\": \"S_1476934934547_name\", \n    \"Notes\": \"this is notes_new\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/subscription/{id}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"Name\": \"S_1476934934547_name\", \n    \"Notes\": \"this is notes_new\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/object/subscription/{id}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/subscription/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"Name\": \"S_1476934934547_name\", \n    \"Notes\": \"this is notes_new\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/subscription/{id}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"Name\": \"S_1476934934547_name\", \n    \"Notes\": \"this is notes_new\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/object/taxation-item:
    post:
      description: ""
      operationId: Object_POSTTaxationItem
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyCreateTaxationItem"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    Id: 2c93808457d787030157e0306f413a96
                    Success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "400":
          content:
            application/json:
              examples:
                response:
                  value:
                    Errors:
                      - Code: INVALID_VALUE
                        Message: The account number 123xProxy is invalid.
                    Success: false
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyBadRequestResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Create a taxation item"
      tags:
        - Taxation Items
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "AccountingCode": "Usage Revenue", 
                "ExemptAmount": 50, 
                "InvoiceItemId": "2c93808457d787030157e0306cd43a88", 
                "Jurisdiction": "test", 
                "LocationCode": "code - 001", 
                "Name": "test", 
                "TaxAmount": 3, 
                "TaxCode": "taxcode", 
                "TaxCodeDescription": "description", 
                "TaxDate": "2016-10-20", 
                "TaxMode": "TaxExclusive", 
                "TaxRate": 3, 
                "TaxRateDescription": "test", 
                "TaxRateType": "FlatFee"
            }' "https://rest.zuora.com/v1/object/taxation-item"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/taxation-item');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "AccountingCode": "Usage Revenue", 
                "ExemptAmount": 50, 
                "InvoiceItemId": "2c93808457d787030157e0306cd43a88", 
                "Jurisdiction": "test", 
                "LocationCode": "code - 001", 
                "Name": "test", 
                "TaxAmount": 3, 
                "TaxCode": "taxcode", 
                "TaxCodeDescription": "description", 
                "TaxDate": "2016-10-20", 
                "TaxMode": "TaxExclusive", 
                "TaxRate": 3, 
                "TaxRateDescription": "test", 
                "TaxRateType": "FlatFee"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"AccountingCode\": \"Usage Revenue\", \n    \"ExemptAmount\": 50, \n    \"InvoiceItemId\": \"2c93808457d787030157e0306cd43a88\", \n    \"Jurisdiction\": \"test\", \n    \"LocationCode\": \"code - 001\", \n    \"Name\": \"test\", \n    \"TaxAmount\": 3, \n    \"TaxCode\": \"taxcode\", \n    \"TaxCodeDescription\": \"description\", \n    \"TaxDate\": \"2016-10-20\", \n    \"TaxMode\": \"TaxExclusive\", \n    \"TaxRate\": 3, \n    \"TaxRateDescription\": \"test\", \n    \"TaxRateType\": \"FlatFee\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/taxation-item")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"AccountingCode\": \"Usage Revenue\", \n    \"ExemptAmount\": 50, \n    \"InvoiceItemId\": \"2c93808457d787030157e0306cd43a88\", \n    \"Jurisdiction\": \"test\", \n    \"LocationCode\": \"code - 001\", \n    \"Name\": \"test\", \n    \"TaxAmount\": 3, \n    \"TaxCode\": \"taxcode\", \n    \"TaxCodeDescription\": \"description\", \n    \"TaxDate\": \"2016-10-20\", \n    \"TaxMode\": \"TaxExclusive\", \n    \"TaxRate\": 3, \n    \"TaxRateDescription\": \"test\", \n    \"TaxRateType\": \"FlatFee\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/object/taxation-item", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/taxation-item")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"AccountingCode\": \"Usage Revenue\", \n    \"ExemptAmount\": 50, \n    \"InvoiceItemId\": \"2c93808457d787030157e0306cd43a88\", \n    \"Jurisdiction\": \"test\", \n    \"LocationCode\": \"code - 001\", \n    \"Name\": \"test\", \n    \"TaxAmount\": 3, \n    \"TaxCode\": \"taxcode\", \n    \"TaxCodeDescription\": \"description\", \n    \"TaxDate\": \"2016-10-20\", \n    \"TaxMode\": \"TaxExclusive\", \n    \"TaxRate\": 3, \n    \"TaxRateDescription\": \"test\", \n    \"TaxRateType\": \"FlatFee\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/taxation-item");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"AccountingCode\": \"Usage Revenue\", \n    \"ExemptAmount\": 50, \n    \"InvoiceItemId\": \"2c93808457d787030157e0306cd43a88\", \n    \"Jurisdiction\": \"test\", \n    \"LocationCode\": \"code - 001\", \n    \"Name\": \"test\", \n    \"TaxAmount\": 3, \n    \"TaxCode\": \"taxcode\", \n    \"TaxCodeDescription\": \"description\", \n    \"TaxDate\": \"2016-10-20\", \n    \"TaxMode\": \"TaxExclusive\", \n    \"TaxRate\": 3, \n    \"TaxRateDescription\": \"test\", \n    \"TaxRateType\": \"FlatFee\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/object/taxation-item/{id}":
    delete:
      description: ""
      operationId: Object_DELETETaxationItem
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyDeleteResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Delete a taxation item"
      tags:
        - Taxation Items
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/taxation-item/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/taxation-item/{id}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/taxation-item/{id}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/v1/object/taxation-item/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/taxation-item/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/taxation-item/{id}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      description: ""
      operationId: Object_GETTaxationItem
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object fields to return
          in: query
          name: fields
          required: false
          schema:
            type: string
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    AccountingCode: Usage Revenue
                    CreatedById: 2c93808457d787030157e0304e2f38f8
                    CreatedDate: 2016-10-20T05:44:13.000+02:00
                    ExemptAmount: 50
                    Id: 2c93808457d787030157e0306f413a96
                    InvoiceItemId: 2c93808457d787030157e0306cd43a88
                    Jurisdiction: test
                    LocationCode: code - 001
                    Name: test
                    TaxAmount: 3
                    TaxCode: taxcode
                    TaxCodeDescription: description
                    TaxDate: 2016-10-20
                    TaxRate: 3
                    TaxRateDescription: test
                    TaxRateType: FlatFee
                    UpdatedById: 2c93808457d787030157e0304e2f38f8
                    UpdatedDate: 2016-10-20T05:44:13.000+02:00
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetTaxationItem"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    done: true
                    records: {}
                    size: 0
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Retrieve a taxation item"
      tags:
        - Taxation Items
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/taxation-item/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/taxation-item/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/taxation-item/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/object/taxation-item/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/taxation-item/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/taxation-item/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: ""
      operationId: Object_PUTTaxationItem
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyModifyTaxationItem"
        required: true
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Update a taxation item"
      tags:
        - Taxation Items
      x-code-samples:
        - lang: Curl
          source: "curl -X PUT -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" -d '{}' \"https://rest.zuora.com/v1/object/taxation-item/{id}\""
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/taxation-item/{id}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/taxation-item/{id}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/object/taxation-item/{id}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/taxation-item/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/taxation-item/{id}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/object/unit-of-measure:
    post:
      description: ""
      operationId: Object_POSTUnitOfMeasure
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyCreateUnitOfMeasure"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    Id: 2c93808457d787030157e030232f3748
                    Success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "400":
          content:
            application/json:
              examples:
                response:
                  value:
                    Errors:
                      - Code: INVALID_VALUE
                        Message: The account number 123xProxy is invalid.
                    Success: false
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyBadRequestResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Create a unit of measure"
      tags:
        - Unit Of Measure
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "Active": true, 
                "DecimalPlaces": 9, 
                "DisplayedAs": "name_display_name_1476935033519", 
                "RoundingMode": "UP", 
                "UomName": "name_1476935033519"
            }' "https://rest.zuora.com/v1/object/unit-of-measure"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/unit-of-measure');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "Active": true, 
                "DecimalPlaces": 9, 
                "DisplayedAs": "name_display_name_1476935033519", 
                "RoundingMode": "UP", 
                "UomName": "name_1476935033519"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"Active\": true, \n    \"DecimalPlaces\": 9, \n    \"DisplayedAs\": \"name_display_name_1476935033519\", \n    \"RoundingMode\": \"UP\", \n    \"UomName\": \"name_1476935033519\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/unit-of-measure")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"Active\": true, \n    \"DecimalPlaces\": 9, \n    \"DisplayedAs\": \"name_display_name_1476935033519\", \n    \"RoundingMode\": \"UP\", \n    \"UomName\": \"name_1476935033519\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/object/unit-of-measure", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/unit-of-measure")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"Active\": true, \n    \"DecimalPlaces\": 9, \n    \"DisplayedAs\": \"name_display_name_1476935033519\", \n    \"RoundingMode\": \"UP\", \n    \"UomName\": \"name_1476935033519\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/unit-of-measure");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"Active\": true, \n    \"DecimalPlaces\": 9, \n    \"DisplayedAs\": \"name_display_name_1476935033519\", \n    \"RoundingMode\": \"UP\", \n    \"UomName\": \"name_1476935033519\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/object/unit-of-measure/{id}":
    delete:
      description: ""
      operationId: Object_DELETEUnitOfMeasure
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyDeleteResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Delete a unit of measure"
      tags:
        - Unit Of Measure
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/unit-of-measure/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/unit-of-measure/{id}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/unit-of-measure/{id}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/v1/object/unit-of-measure/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/unit-of-measure/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/unit-of-measure/{id}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      description: ""
      operationId: Object_GETUnitOfMeasure
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object fields to return
          in: query
          name: fields
          required: false
          schema:
            type: string
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    Active: true
                    CreatedById: 2c93808457d787030157e0300f6735d3
                    CreatedDate: 2016-10-20T05:43:53.000+02:00
                    DecimalPlaces: 9
                    DisplayedAs: name_display_name_1476935033519
                    Id: 2c93808457d787030157e030232f3748
                    RoundingMode: UP
                    UomName: name_1476935033519
                    UpdatedById: 2c93808457d787030157e0300f6735d3
                    UpdatedDate: 2016-10-20T05:43:53.000+02:00
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetUnitOfMeasure"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    done: true
                    records: {}
                    size: 0
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Retrieve a unit of measure"
      tags:
        - Unit Of Measure
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/unit-of-measure/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/unit-of-measure/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/unit-of-measure/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/object/unit-of-measure/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/unit-of-measure/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/unit-of-measure/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: ""
      operationId: Object_PUTUnitOfMeasure
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyModifyUnitOfMeasure"
        required: true
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Update a unit of measure"
      tags:
        - Unit Of Measure
      x-code-samples:
        - lang: Curl
          source: "curl -X PUT -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" -d '{}' \"https://rest.zuora.com/v1/object/unit-of-measure/{id}\""
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/unit-of-measure/{id}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/unit-of-measure/{id}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/object/unit-of-measure/{id}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/unit-of-measure/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/unit-of-measure/{id}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/object/usage:
    post:
      description: ""
      operationId: Object_POSTUsage
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyCreateUsage"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    Id: 2c93808457d787030157e02e0a301d0a
                    Success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "400":
          content:
            application/json:
              examples:
                response:
                  value:
                    Errors:
                      - Code: INVALID_VALUE
                        Message: The account number 123xProxy is invalid.
                    Success: false
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyBadRequestResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Create a usage record"
      tags:
        - Usage
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "AccountId": "2c92c0f956bc8fb40156d502fc3718b1", 
                "ChargeNumber": "C-00000229", 
                "Description": "test", 
                "Quantity": 9, 
                "StartDateTime": "2017-12-01T16:41:36.000+01:00", 
                "SubscriptionNumber": "A-S00000100", 
                "UOM": "Each"
            }' "https://rest.zuora.com/v1/object/usage"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/usage');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "AccountId": "2c92c0f956bc8fb40156d502fc3718b1", 
                "ChargeNumber": "C-00000229", 
                "Description": "test", 
                "Quantity": 9, 
                "StartDateTime": "2017-12-01T16:41:36.000+01:00", 
                "SubscriptionNumber": "A-S00000100", 
                "UOM": "Each"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"AccountId\": \"2c92c0f956bc8fb40156d502fc3718b1\", \n    \"ChargeNumber\": \"C-00000229\", \n    \"Description\": \"test\", \n    \"Quantity\": 9, \n    \"StartDateTime\": \"2017-12-01T16:41:36.000+01:00\", \n    \"SubscriptionNumber\": \"A-S00000100\", \n    \"UOM\": \"Each\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/usage")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"AccountId\": \"2c92c0f956bc8fb40156d502fc3718b1\", \n    \"ChargeNumber\": \"C-00000229\", \n    \"Description\": \"test\", \n    \"Quantity\": 9, \n    \"StartDateTime\": \"2017-12-01T16:41:36.000+01:00\", \n    \"SubscriptionNumber\": \"A-S00000100\", \n    \"UOM\": \"Each\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/object/usage", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/usage")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"AccountId\": \"2c92c0f956bc8fb40156d502fc3718b1\", \n    \"ChargeNumber\": \"C-00000229\", \n    \"Description\": \"test\", \n    \"Quantity\": 9, \n    \"StartDateTime\": \"2017-12-01T16:41:36.000+01:00\", \n    \"SubscriptionNumber\": \"A-S00000100\", \n    \"UOM\": \"Each\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/usage");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"AccountId\": \"2c92c0f956bc8fb40156d502fc3718b1\", \n    \"ChargeNumber\": \"C-00000229\", \n    \"Description\": \"test\", \n    \"Quantity\": 9, \n    \"StartDateTime\": \"2017-12-01T16:41:36.000+01:00\", \n    \"SubscriptionNumber\": \"A-S00000100\", \n    \"UOM\": \"Each\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/object/usage/{id}":
    delete:
      description: ""
      operationId: Object_DELETEUsage
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyDeleteResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Delete a usage record"
      tags:
        - Usage
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/usage/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/usage/{id}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/usage/{id}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/v1/object/usage/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/usage/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/usage/{id}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      description: ""
      operationId: Object_GETUsage
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object fields to return
          in: query
          name: fields
          required: false
          schema:
            type: string
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    AccountId: 2c92c0f956bc8fb40156d502fc3718b1
                    AccountNumber: A00000030
                    ChargeId: 2c92c0f956bc8fcb0156d5039e275aa9
                    ChargeNumber: C-00000229
                    CreatedById: 2c92c0f958fffd7d015914aeefc71a5d
                    CreatedDate: 2019-07-18T15:36:43.000+08:00
                    Description: test
                    Id: 2c92c0f86bf50ca0016c040309316ca4
                    Quantity: 9
                    RbeStatus: Pending
                    SourceType: API
                    StartDateTime: 2017-12-01T23:41:36.000+08:00
                    SubmissionDateTime: 2019-07-18T15:36:43.000+08:00
                    SubscriptionId: 2c92c0f956bc8fcb0156d5039e0a5aa0
                    SubscriptionNumber: A-S00000100
                    UOM: Each
                    UpdatedById: 2c92c0f958fffd7d015914aeefc71a5d
                    UpdatedDate: 2019-07-18T15:36:43.000+08:00
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyGetUsage"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    done: true
                    records: {}
                    size: 0
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyNoDataResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Retrieve a usage record"
      tags:
        - Usage
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/object/usage/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/usage/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/usage/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/object/usage/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/usage/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/usage/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: ""
      operationId: Object_PUTUsage
      parameters:
        - $ref: "#/components/parameters/GLOBAL_REQUEST_rejectUnknownFields"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: Object id
          in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ProxyModifyUsage"
        required: true
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyCreateOrModifyResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "401":
          content:
            application/json:
              examples:
                response:
                  value:
                    message: Authentication error
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ProxyUnauthorizedResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            WWW-Authenticate:
              description: |
                The value of this header is:

                ```
                Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                ```
              schema:
                enum:
                  - Basic realm=Zuora API, ZSession realm=Zuora API, Bearer realm=Zuora API
                type: string
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "CRUD: Update a usage record"
      tags:
        - Usage
      x-code-samples:
        - lang: Curl
          source: "curl -X PUT -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" -d '{}' \"https://rest.zuora.com/v1/object/usage/{id}\""
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/object/usage/{id}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/object/usage/{id}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/object/usage/{id}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/object/usage/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/object/usage/{id}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/operations/billing-preview:
    post:
      description: |
        **Note:** The Billing Preview feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/). 


        Generates a preview of future invoice items for one customer account. Use the BillingPreview call to calculate how much a single customer will be invoiced from the most recent invoice to a specific end of term date in the future.

        Additionally, you can use the BillingPreview service to access real-time data on an individual customer's usage consumption. 

        The BillingPreview call does not calculate taxes for charges in the subscription.

        If you have the Invoice Settlement feature enabled, you can also generate a preview of future credit memo items for one customer account. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 
      operationId: POST_BillingPreview
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PostBillingPreviewParam"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 402890b75972406c0159724cd4d00011
                    creditMemoItems:
                      - amount: 50
                        amountWithoutTax: 50
                        chargeDate: 2017-01-06 16:38:26
                        chargeNumber: C-00000002
                        chargeType: Recurring
                        comment: ""
                        id: cf6326638f3c4ddda3722734aebd7ba7
                        processingType: Charge
                        quantity: 1
                        ratePlanChargeId: 402890b75972406c0159724e2ef10032
                        serviceEndDate: 2017-05-31
                        serviceStartDate: 2017-05-01
                        sku: SKU-00000001
                        skuName: negative_charge
                        subscriptionId: 402890b75972406c0159724e2e810029
                        subscriptionNumber: A-S00000001
                        unitOfMeasure: License
                      - appliedToItemId: cf6326638f3c4ddda3722734aebd7ba7
                        chargeAmount: 5
                        chargeDate: 2017-01-06 16:38:26
                        chargeDescription: ""
                        chargeId: 402890b75972406c0159724e2eec0031
                        chargeName: discount-charge
                        chargeNumber: C-00000003
                        chargeType: Recurring
                        id: 3e28d61d442f433797e268e2b7c11eeb
                        processingType: Discount
                        productName: FA-freshAir
                        quantity: 0
                        serviceEndDate: 2017-05-31
                        serviceStartDate: 2017-05-01
                        subscriptionId: c2d9a5768db440cbbf2709a55c614bed
                        subscriptionName: A-S00000001
                        subscriptionNumber: A-S00000001
                        taxAmount: 0
                        unitOfMeasure: ""
                    invoiceItems:
                      - appliedToItemId: null
                        chargeAmount: 100
                        chargeDate: 2017-01-06 16:38:26
                        chargeDescription: ""
                        chargeId: 402890b75972406c0159724e2eec0031
                        chargeName: positive-charge
                        chargeNumber: C-00000001
                        chargeType: Recurring
                        id: 93ac165212294c1a8bef1c8f99121461
                        processingType: Charge
                        productName: FA-freshAir
                        quantity: 1
                        serviceEndDate: 2017-05-31
                        serviceStartDate: 2017-05-01
                        subscriptionId: 402890b75972406c0159724e2e810029
                        subscriptionName: A-S00000001
                        subscriptionNumber: A-S00000001
                        taxAmount: 0
                        unitOfMeasure: License
                      - appliedToItemId: 93ac165212294c1a8bef1c8f99121461
                        chargeAmount: 10
                        chargeDate: 2017-01-06 16:38:26
                        chargeDescription: ""
                        chargeId: 402890b75972406c0159724e2eec0031
                        chargeName: discount-charge
                        chargeNumber: C-00000003
                        chargeType: Recurring
                        id: 3e28d61d442f433797e268e2b7c11eeb
                        processingType: Discount
                        productName: FA-freshAir
                        quantity: 0
                        serviceEndDate: 2017-05-31
                        serviceStartDate: 2017-05-01
                        subscriptionId: c2d9a5768db440cbbf2709a55c614bed
                        subscriptionName: A-S00000001
                        subscriptionNumber: A-S00000001
                        taxAmount: 0
                        unitOfMeasure: ""
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/BillingPreviewResult"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Generate a billing preview
      tags:
        - Operations
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "accountId": "402890b75972406c0159724cd4d00011", 
                "assumeRenewal": "None", 
                "chargeTypeToExclude": "", 
                "includingEvergreenSubscription": "true", 
                "targetDate": "2017-05-10"
            }' "https://rest.zuora.com/v1/operations/billing-preview"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/operations/billing-preview');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "accountId": "402890b75972406c0159724cd4d00011", 
                "assumeRenewal": "None", 
                "chargeTypeToExclude": "", 
                "includingEvergreenSubscription": "true", 
                "targetDate": "2017-05-10"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"accountId\": \"402890b75972406c0159724cd4d00011\", \n    \"assumeRenewal\": \"None\", \n    \"chargeTypeToExclude\": \"\", \n    \"includingEvergreenSubscription\": \"true\", \n    \"targetDate\": \"2017-05-10\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/operations/billing-preview")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"accountId\": \"402890b75972406c0159724cd4d00011\", \n    \"assumeRenewal\": \"None\", \n    \"chargeTypeToExclude\": \"\", \n    \"includingEvergreenSubscription\": \"true\", \n    \"targetDate\": \"2017-05-10\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/operations/billing-preview", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/operations/billing-preview")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"accountId\": \"402890b75972406c0159724cd4d00011\", \n    \"assumeRenewal\": \"None\", \n    \"chargeTypeToExclude\": \"\", \n    \"includingEvergreenSubscription\": \"true\", \n    \"targetDate\": \"2017-05-10\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/operations/billing-preview");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"accountId\": \"402890b75972406c0159724cd4d00011\", \n    \"assumeRenewal\": \"None\", \n    \"chargeTypeToExclude\": \"\", \n    \"includingEvergreenSubscription\": \"true\", \n    \"targetDate\": \"2017-05-10\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/operations/invoice-collect:
    post:
      description: |
        Generates and posts invoices and credit memos and collects payments for posted invoices. Credit memos are only available if you have the Invoice Settlement feature enabled and negative charges exist. Credit memos will not be applied to invoices. If draft invoices and credit memos exist when you run this operation, this operation will post the invoices and credit memos. Note that draft credit memos created from an invoice or a product rate plan charge will not be posted.

        You can use this operation to generate invoices and collect payments on the posted invoices,
         or else simply collect payment on a specified existing
        invoice. The customer's default payment method is used, and the full
        amount due is collected. The operation depends on the parameters you
        specify.

        - To generate one or more new invoices for that customer and collect
        payment on the generated and other unpaid invoice(s), leave the **invoiceId** field empty. 

        - To collect payment on an existing invoice, specify the invoice ID. 


        The operation is atomic; if any part is unsuccessful, the entire
        operation is rolled back.

        When an error occurs, gateway reason codes and error messages are returned the error response of this operation. The following items are some gateway response code examples.

        - Orbital: `05 Do Not Honor`; `14 Invalid Credit Card Number`
        - Vantiv: `301 Invalid Account Number`; `304 Lost/Stolen Card`  
        - CyberSource2: `202 Expired card`; `231 Invalid account number`

        For more reason code information, see the corresponding payment gateway documentation. 


        ## Notes

        Timeouts may occur when using this method on an account that
        has an extremely high number of subscriptions.
      operationId: POST_TransactionInvoicePayment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            
            The minor version of the Zuora REST API. 

            You need to set this parameter if you use the following fields:
            * documentDate
            * targetDate            

            If you have the Invoice Settlement feature enabled, you need to specify this parameter. Otherwise, an error is returned.


            See [Zuora REST API Versions](https://www.zuora.com/developer/api-reference/#section/API-Versions) for more information.
          in: header
          name: zuora-version
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTInvoiceCollectType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    amountCollected: 801.73
                    creditMemos:
                      - id: 402890555a7e9791015a879f064a0054
                        memoAmount: 801.73
                        memoNumber: CM00000012
                    invoices:
                      - invoiceAmount: 801.73
                        invoiceId: 4028925a4cb74ec9014cb7540988002e
                        invoiceNumber: INV00000091
                    paymentId: 402892053e100406013e1024ab7c00e3
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTInvoiceCollectResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Invoice and collect
      tags:
        - Operations
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "accountKey": "4028925a4cb74ec9014cb7520fc00005", 
                "invoiceId": "4028925a4cb74ec9014cb7540988002e", 
                "paymentGateway": "TestGateway"
            }' "https://rest.zuora.com/v1/operations/invoice-collect"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/operations/invoice-collect');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "accountKey": "4028925a4cb74ec9014cb7520fc00005", 
                "invoiceId": "4028925a4cb74ec9014cb7540988002e", 
                "paymentGateway": "TestGateway"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"accountKey\": \"4028925a4cb74ec9014cb7520fc00005\", \n    \"invoiceId\": \"4028925a4cb74ec9014cb7540988002e\", \n    \"paymentGateway\": \"TestGateway\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/operations/invoice-collect")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"accountKey\": \"4028925a4cb74ec9014cb7520fc00005\", \n    \"invoiceId\": \"4028925a4cb74ec9014cb7540988002e\", \n    \"paymentGateway\": \"TestGateway\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/operations/invoice-collect", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/operations/invoice-collect")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"accountKey\": \"4028925a4cb74ec9014cb7520fc00005\", \n    \"invoiceId\": \"4028925a4cb74ec9014cb7540988002e\", \n    \"paymentGateway\": \"TestGateway\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/operations/invoice-collect");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"accountKey\": \"4028925a4cb74ec9014cb7520fc00005\", \n    \"invoiceId\": \"4028925a4cb74ec9014cb7540988002e\", \n    \"paymentGateway\": \"TestGateway\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/order-line-items/bulk:
    post:
      description: |
        **Note:** The [Order Line Items](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Line_Items/AA_Overview_of_Order_Line_Items) feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. If you want to join this early adopter program, submit a request at [Zuora Global Support](https://support.zuora.com/).

        **Note:** You also need to enable the [Orders](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AA_Overview_of_Orders#Orders) feature to access the Order Line Items feature. Orders is now generally available as of Zuora Billing Release 284 (August 2020). If you are an existing Zuora Subscribe and Amend customer and want to adopt Orders, see [What is Orders Harmonization](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Orders_Harmonization/Orders_Harmonization#What_is_Orders_Harmonization.3F) and join the [Orders Harmonization community group](https://community.zuora.com/t5/Orders-Harmonization/gp-p/Orders-Harmonization) for more information. If you want to enable Orders, submit a request at [Zuora Global Support](https://support.zuora.com/).

        Bulk-updates multiple order line items. You can also choose to generate an invoice for these updated order line items.

        The maximum number of order line items allowable to update in a call is 100.          
      operationId: Post_OrderLineItems
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PostOrderLineItemsRequestType"
        required: true
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GetOrderLineItemResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Update order line items
      tags:
        - Order Line Items
      x-code-samples:
        - lang: Curl
          source: "curl -X POST -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" -d '{}' \"https://rest.zuora.com/v1/order-line-items/bulk\""
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/order-line-items/bulk');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/order-line-items/bulk")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/order-line-items/bulk", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/order-line-items/bulk")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/order-line-items/bulk");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/order-line-items/{itemId}":
    get:
      description: |
        **Note:** The [Order Line Items](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Line_Items/AA_Overview_of_Order_Line_Items) feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. If you want to join this early adopter program, submit a request at [Zuora Global Support](https://support.zuora.com/).

        **Note:** You also need to enable the [Orders](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AA_Overview_of_Orders#Orders) feature to access the Order Line Items feature. Orders is now generally available as of Zuora Billing Release 284 (August 2020). If you are an existing Zuora Subscribe and Amend customer and want to adopt Orders, see [What is Orders Harmonization](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Orders_Harmonization/Orders_Harmonization#What_is_Orders_Harmonization.3F) and join the [Orders Harmonization community group](https://community.zuora.com/t5/Orders-Harmonization/gp-p/Orders-Harmonization) for more information. If you want to enable Orders, submit a request at [Zuora Global Support](https://support.zuora.com/).

        Retrieves the detailed information about a specified order line item.
      operationId: GET_OrderLineItem
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: The id of the Order Line Item to retrieve.
          in: path
          name: itemId
          required: true
          schema:
            format: UUID
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    orderLineItem:
                      UOM: null
                      accountingCode: null
                      amount: 10000
                      amountPerUnit: 5000
                      billTargetDate: null
                      customFields:
                        externalNumber5__c: olinumber-023
                      description: With Dual Stereo Microphones, HD 1080p, Black,USB connectivity for ease of use.
                      id: 4028fc827a0e48c1017a0e4dccc60002
                      itemName: webcam
                      itemNumber: "1"
                      itemState: Executing
                      itemType: Product
                      listPricePerUnit: 59
                      orderId: 4028fc827a0e48c1017a0e58b9330014
                      productCode: C9201
                      productRatePlanChargeId: null
                      purchaseOrderNumber: 960-000764
                      quantity: 2
                      soldTo: null
                      soldToData:
                        address1: "2841 Junction Ave., Suite #201"
                        address2: ""
                        city: San Jose
                        country: United States
                        county: null
                        firstName: Jasmine
                        lastName: Fu
                        postalCode: "95134"
                        state: California
                      transactionDate: 2021-02-01
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GetOrderLineItemResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve an order line item
      tags:
        - Order Line Items
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/order-line-items/{itemId}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/order-line-items/{itemId}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/order-line-items/{itemId}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/order-line-items/{itemId}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/order-line-items/{itemId}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/order-line-items/{itemId}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: |
        **Note:** The [Order Line Items](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Line_Items/AA_Overview_of_Order_Line_Items) feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. If you want to join this early adopter program, submit a request at [Zuora Global Support](https://support.zuora.com/).

        **Note:** You also need to enable the [Orders](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AA_Overview_of_Orders#Orders) feature to access the Order Line Items feature. Orders is now generally available as of Zuora Billing Release 284 (August 2020). If you are an existing Zuora Subscribe and Amend customer and want to adopt Orders, see [What is Orders Harmonization](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Orders_Harmonization/Orders_Harmonization#What_is_Orders_Harmonization.3F) and join the [Orders Harmonization community group](https://community.zuora.com/t5/Orders-Harmonization/gp-p/Orders-Harmonization) for more information. If you want to enable Orders, submit a request at [Zuora Global Support](https://support.zuora.com/).

        Updates a specified order line item.
      operationId: PUT_OrderLineItem
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: The id of the Order Line Item to update.
          in: path
          name: itemId
          required: true
          schema:
            format: UUID
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTOrderLineItemRequestType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PutOrderLineItemResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Update an order line item
      tags:
        - Order Line Items
      x-code-samples:
        - lang: Curl
          source: "curl -X PUT -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" -d '{}' \"https://rest.zuora.com/v1/order-line-items/{itemId}\""
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/order-line-items/{itemId}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/order-line-items/{itemId}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/order-line-items/{itemId}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/order-line-items/{itemId}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/order-line-items/{itemId}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/orders:
    get:
      description: |
        **Note:** This feature is only available if you have the [Order Metrics](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AA_Overview_of_Orders#Order_Metrics) feature enabled. As of Zuora Billing Release 284, Orders is generally available and the Order Metrics feature is no longer available as a standalone feature. If you are an existing Subscribe and Amend customer and want Order Metrics only, you must turn on [Orders Harmonization](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Orders_Harmonization/Orders_Harmonization). You can still keep the existing Subscribe and Amend API integrations to create and manage subscriptions.

        **Note:** The [Order Line Items](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Line_Items/AA_Overview_of_Order_Line_Items) feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. If you want to join this early adopter program, submit a request at [Zuora Global Support](https://support.zuora.com/).


        Retrieves information about all orders in your tenant. By default, it returns the first page of the orders. 
      operationId: GET_AllOrders
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The page number of the orders retrieved. 
          in: query
          name: page
          required: false
          schema:
            default: 1
            type: integer
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - description: |
            The date type to filter on. This field value can be orderDate or updatedDate. Default is orderDate.
          in: query
          name: dateFilterOption
          required: false
          schema:
            type: string
        - description: |
            The result will only contain the orders with the date of dateFilterOption later than or equal to this date.
          in: query
          name: startDate
          required: false
          schema:
            format: date
            type: string
        - description: |
            The result will only contains orders with the date of dateFilterOption earlier than or equal to this date.
          in: query
          name: endDate
          required: false
          schema:
            format: date
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    orders:
                      - createdBy: 2c989028622282520162235ab0f603ba
                        createdDate: 2018-03-14 15:12:58
                        currency: USD
                        customFields:
                          order_cf_date__c: 2017-01-01
                        description: This is a description for the Order.
                        existingAccountNumber: accountA_Num
                        orderDate: 2017-03-01
                        orderLineItems:
                          - UOM: null
                            accountingCode: null
                            amount: 10000
                            amountPerUnit: 5000
                            billTargetDate: null
                            customFields:
                              orderLineItemCF__c: olinumber-023
                            description: With Dual Stereo Microphones, HD 1080p, Black,USB connectivity for ease of use.
                            id: 4028fc827a0e48c1017a0e4dccc60002
                            itemName: webcam
                            itemNumber: "1"
                            itemState: Executing
                            itemType: Product
                            listPricePerUnit: 59
                            orderId: 4028fc827a0e48c1017a0e58b9330014
                            productCode: C9201
                            productRatePlanChargeId: null
                            purchaseOrderNumber: 960-000764
                            quantity: 2
                            soldTo: null
                            soldToData:
                              address1: "2841 Junction Ave., Suite #201"
                              address2: ""
                              city: San Jose
                              country: United States
                              county: null
                              firstName: Jasmine
                              lastName: Fu
                              postalCode: "95134"
                              state: California
                            transactionDate: 2021-02-01
                        orderNumber: O-00000002
                        status: Completed
                        subscriptions:
                          - baseVersion: 1
                            customFields:
                              sub_cf_picklist__c: null
                            newVersion: 2
                            orderActions:
                              - customFields:
                                  oa_cf_text__c: null
                                sequence: 0
                                triggerDates:
                                  - name: ContractEffective
                                    triggerDate: 2017-03-01
                                  - name: ServiceActivation
                                    triggerDate: 2017-03-01
                                  - name: CustomerAcceptance
                                    triggerDate: 2017-03-01
                                type: UpdateProduct
                                updateProduct:
                                  chargeUpdates:
                                    - billing:
                                        billingPeriodAlignment: null
                                      chargeNumber: C-00000001
                                      customFields:
                                        srpc_cf_picklist__c: null
                                      description: null
                                      effectiveDate:
                                        specificTriggerDate: null
                                      newRatePlanChargeId: 2c989028622282520162235adabc0651
                                      pricing:
                                        recurringVolume:
                                          priceChangeOption: null
                                          priceIncreasePercentage: null
                                          quantity: 7
                                          tiers: []
                                      uniqueToken: null
                                  customFields: {}
                                  newRatePlanId: 2c989028622282520162235ada870649
                                  ratePlanId: 2c989028622282520162235acd1b05d2
                                  specificUpdateDate: null
                                  uniqueToken: null
                            subscriptionNumber: A-S00000001
                        updatedBy: 2c989028622282520162235ab0f603ba
                        updatedDate: 2018-03-14 15:12:58
                      - createdBy: 2c989028622282520162235ab0f603ba
                        createdDate: 2018-03-14 15:12:55
                        currency: USD
                        existingAccountNumber: accountA_Num
                        orderDate: 2017-01-01
                        orderNumber: O-00000001
                        status: Completed
                        subscriptions:
                          - baseVersion: null
                            customFields:
                              sub_cf_picklist__c: sub123
                            newVersion: 1
                            orderActions:
                              - createSubscription:
                                  invoiceSeparately: null
                                  notes: null
                                  subscribeToRatePlans:
                                    - chargeOverrides:
                                        - billing:
                                            billCycleDay: null
                                            billCycleType: null
                                            billingPeriod: null
                                            billingPeriodAlignment: null
                                            billingTiming: null
                                            specificBillingPeriod: null
                                            weeklyBillCycleDay: null
                                          chargeNumber: C-00000001
                                          customFields:
                                            srpc_cf_picklist__c: null
                                          description: null
                                          endDate:
                                            endDateCondition: null
                                            specificEndDate: null
                                            upToPeriods: null
                                            upToPeriodsType: null
                                          pricing:
                                            recurringVolume:
                                              listPriceBase: Per_Billing_Period
                                              priceChangeOption: null
                                              priceIncreasePercentage: null
                                              quantity: 12
                                              tiers: []
                                          productRateplanChargeId: 2c989028622282520162235aca7a05b9
                                          startDate:
                                            specificTriggerDate: null
                                          uniqueToken: null
                                      customFields: {}
                                      newRatePlanId: 2c989028622282520162235acd1b05d2
                                      productRatePlanId: 2c989028622282520162235ac91605b3
                                      uniqueToken: null
                                  subscriptionOwnerAccountNumber: accountA_Num
                                  terms:
                                    autoRenew: false
                                    initialTerm:
                                      period: 12
                                      periodType: Month
                                      startDate: 2017-01-01
                                      termType: TERMED
                                    renewalSetting: RENEW_WITH_SPECIFIC_TERM
                                    renewalTerms:
                                      - period: 0
                                        periodType: Month
                                customFields:
                                  order_cf_date__c: 2017-01-01
                                sequence: 0
                                triggerDates:
                                  - name: ContractEffective
                                    triggerDate: 2017-01-01
                                  - name: ServiceActivation
                                    triggerDate: 2017-01-01
                                  - name: CustomerAcceptance
                                    triggerDate: 2017-01-01
                                type: CreateSubscription
                            subscriptionNumber: A-S00000001
                        success: true
                        updatedBy: 2c989028622282520162235ab0f603ba
                        updatedDate: 2018-03-14 15:12:55
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GetAllOrdersResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List orders
      tags:
        - Orders
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/orders"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/orders');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/orders")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/orders", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/orders")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/orders");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    post:
      description: |
        **Note:** This operation is only available if you have the [Orders](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AA_Overview_of_Orders#Orders) feature enabled. Orders is now generally available as of Zuora Billing Release 284 (August 2020). If you are an existing Zuora Subscribe and Amend customer and want to adopt Orders, see [What is Orders Harmonization](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Orders_Harmonization/Orders_Harmonization#What_is_Orders_Harmonization.3F) and join the [Orders Harmonization community group](https://community.zuora.com/t5/Orders-Harmonization/gp-p/Orders-Harmonization) for more information. If you want to enable Orders, submit a request at [Zuora Global Support](https://support.zuora.com/).

        **Note:** The [Order Line Items](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Line_Items/AA_Overview_of_Order_Line_Items) feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. If you want to join this early adopter program, submit a request at [Zuora Global Support](https://support.zuora.com/).

        You can use this operation to create subscriptions and make changes to subscriptions by creating orders. You can also use this operation to create order line items by creating orders. The following tutorials demonstrate how to use this operation:

         * [Create a Subscription](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AC_Orders_Tutorials/A_Create_a_Subscription)
         * [Add a Product to a Subscription](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AC_Orders_Tutorials/A_Add_a_Product_to_a_Subscription)
         * [Create a Ramp Deal](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Ramps_and_Ramp_Metrics/B_Create_a_Ramp_Deal)
         * [Add a Product Mid-Interval Update on a Ramp Deal](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Ramps_and_Ramp_Metrics/E_Update_a_Product_in_a_Ramp_Deal)
         * [Add a Product in a Ramp Deal](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Ramps_and_Ramp_Metrics/C_Add_a_Product_in_a_Ramp_Deal)
         * [Change the Terms and Conditions of a Ramp Deal](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Ramps_and_Ramp_Metrics/D_Change_the_Terms_and_Conditions_of_a_Ramp_Deal_and_Update_the_Ramp)
         * [Change the Owner of a Subscription](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AC_Orders_Tutorials/C_Change_the_Owner_of_a_Subscription)
         * [Change the Terms and Conditions of a Subscription](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AC_Orders_Tutorials/C_Change_the_Terms_and_Conditions_of_a_Subscription)
         * [Renew a Subscription](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AC_Orders_Tutorials/C_Renew_a_Subscription)
         * [Renew a Subscription and Upgrade a Product](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AC_Orders_Tutorials/C_Renew_a_Subscription_and_Upgrade_a_Product)
         * [Replace a Product in a Subscription](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AC_Orders_Tutorials/C_Replace_a_Product_in_a_Subscription)
         * [Update a Product in a Subscription](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AC_Orders_Tutorials/C_Update_a_Product_in_a_Subscription)
         * [Cancel a Subscription](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AC_Orders_Tutorials/D_Cancel_a_Subscription)
         * [Remove a Product from a Subscription](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AC_Orders_Tutorials/D_Remove_a_Product_from_a_Subscription)
         * [Create an order line item](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Line_Items/Create_an_order_line_item)
         * [Create an order line item with a new subscription](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Line_Items/Create_an_order_line_item_with_a_new_subscription)

        You can also see the [API Guides](https://www.zuora.com/developer/api-guides/) for more use cases of the "Create an order" operation.

        Creating a draft order is currently not supported. See [Known Limitations in Orders](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/C_Known_Limitations_in_Orders) for additional limitations.

        The limit of orders allowed on a subscription is 1000.

        The limit of order line items allowed in an order is 100.

        Zuora has the following limits on the Orders synchronous API to prevent performance degradation: 
        * Up to 50 subscriptions are allowed in a single [Create an order](https://www.zuora.com/developer/api-reference/#operation/POST_Order) or [Preview an order](https://www.zuora.com/developer/api-reference/#operation/POST_PreviewOrder) operation call.
        * Up to 50 order actions are allowed in a single [Create an order](https://www.zuora.com/developer/api-reference/#operation/POST_Order) or [Preview an order](https://www.zuora.com/developer/api-reference/#operation/POST_PreviewOrder) operation call.
        * Up to 50 order actions are allowed on a single subscription in a [Create an order](https://www.zuora.com/developer/api-reference/#operation/POST_Order) or [Preview an order](https://www.zuora.com/developer/api-reference/#operation/POST_PreviewOrder) operation call.

        If you have an Order that exceeds any limits of the above, Zuora recommends you use the following asynchronous API operations:
        * [Create an order asynchronously](https://www.zuora.com/developer/api-reference/#operation/POST_CreateOrderAsynchronously)
        * [Preview an order asynchronously](https://www.zuora.com/developer/api-reference/#operation/POST_PreviewOrderAsynchronously)

        Zuora has the following limits on the Orders asynchronous API operations to prevent performance degradation:
        * Up to 300 subscriptions are allowed in a single [Create an order asynchronously](https://www.zuora.com/developer/api-reference/#operation/POST_CreateOrderAsynchronously) or [Preview an order asynchronously](https://www.zuora.com/developer/api-reference/#operation/POST_PreviewOrderAsynchronously) operation call.
        * Up to 300 order actions are allowed in a single [Create an order asynchronously](https://www.zuora.com/developer/api-reference/#operation/POST_CreateOrderAsynchronously) or [Preview an order asynchronously](https://www.zuora.com/developer/api-reference/#operation/POST_PreviewOrderAsynchronously) operation call.
        * Up to 300 order actions are allowed on a single subscription in a [Create an order asynchronously](https://www.zuora.com/developer/api-reference/#operation/POST_CreateOrderAsynchronously) or [Preview an order asynchronously](https://www.zuora.com/developer/api-reference/#operation/POST_PreviewOrderAsynchronously) operation call.

        If you have a need for a large order that exceeds any limits of the above, you can request a limit increase for the Orders asynchronous API by submitting a request at [Zuora Global Support](https://support.zuora.com).        

        **Note:** When you are to suspend a subcription (via the `suspend` order action), if in the same "Create an order" call you are to perform other subsequent order actions on the supscription to suspend, you must first resume the subscription (via a `resume` order action). 

        **Note:** When using this operation to create an account, create a subscription, run billing, and collect payment in a single call, if any error occurs during the call, such as a payment processing failure and a tax engine failure, then all the other steps will be rolled back. This means that the invoice will not be generated, the subscription will not be created, and the account will not be created.
      operationId: POST_Order
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            Specify whether to return IDs associated with the numbers returned in the "Create an order" operation.
          in: query
          name: returnIds
          required: false
          schema:
            default: false
            type: boolean
        - description: |
            
            The minor version of the Zuora REST API. 

            You need to set this parameter if you use the following fields:
            * subscriptions
            * subscriptionNumbers
          in: header
          name: zuora-version
          required: false
          schema:
            type: string
      requestBody:
        $ref: "#/components/requestBodies/POSTOrderRequestType"
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountNumber: A00000001
                    invoiceNumbers:
                      - INV00000001
                    orderLineItems:
                      - id: bd78c052-2adf-42c2-aa0f-ccacc997fa20
                        itemNumber: "116"
                    orderNumber: OM-00002
                    paidAmount: 300
                    paymentNumber: P-00000002
                    status: Pending
                    subscriptions:
                      - status: Pending Activation
                        subscriptionNumber: SM-00001
                      - status: Pending Acceptance
                        subscriptionNumber: SM-00002
                      - status: Active
                        subscriptionNumber: SM-00003
                      - status: Pending Acceptance
                        subscriptionNumber: SM-00004
                      - status: Suspended
                        subscriptionNumber: SM-00005
                      - status: Active
                        subscriptionNumber: SM-00006
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PostOrderResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Create an order
      tags:
        - Orders
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "description": "This is a description for the Order.", 
                "existingAccountNumber": "A00000001", 
                "orderDate": "2017-01-01", 
                "orderLineItems": [
                    {
                        "billingTrigger": "BillImmediately", 
                        "chargeAmountPerUnit": 50, 
                        "customFields": {
                            "someField__c": "some string"
                        }, 
                        "deferredRevenueAccountingCode": "Unearned Revenues", 
                        "description": "With Dual Stereo Microphones, HD 1080p, Black", 
                        "itemName": "webcam", 
                        "itemType": "Product", 
                        "listPricePerUnit": 59, 
                        "productCode": "C9201", 
                        "purchaseOrderNumber": "960-000764", 
                        "quantity": 2, 
                        "recognizedRevenueAccountingCode": "Earned Revenues", 
                        "revenueRecognitionRule": "recognized upon invoice", 
                        "taxCode": "8018", 
                        "taxMode": "TaxInclusive", 
                        "transactionDate": "2021-02-01"
                    }
                ], 
                "orderNumber": "OM-00001", 
                "processingOptions": {
                    "applyCreditBalance": true, 
                    "billingOptions": {
                        "targetDate": "2017-08-01"
                    }, 
                    "collectPayment": true, 
                    "runBilling": true
                }, 
                "subscriptions": [
                    {
                        "orderActions": [
                            {
                                "createSubscription": {
                                    "subscribeToRatePlans": [
                                        {
                                            "productRatePlanId": "efbff07e6290dfb8016291003bd00dda"
                                        }
                                    ], 
                                    "subscriptionNumber": "SM-00001", 
                                    "terms": {
                                        "autoRenew": true, 
                                        "initialTerm": {
                                            "period": 12, 
                                            "periodType": "Month", 
                                            "startDate": "2017-01-01", 
                                            "termType": "TERMED"
                                        }, 
                                        "renewalSetting": "RENEW_WITH_SPECIFIC_TERM", 
                                        "renewalTerms": [
                                            {
                                                "period": 12, 
                                                "periodType": "Month"
                                            }
                                        ]
                                    }
                                }, 
                                "triggerDates": [
                                    {
                                        "name": "ContractEffective", 
                                        "triggerDate": "2017-01-01"
                                    }
                                ], 
                                "type": "CreateSubscription"
                            }
                        ]
                    }, 
                    {
                        "orderActions": [
                            {
                                "createSubscription": {
                                    "subscribeToRatePlans": [
                                        {
                                            "productRatePlanId": "efbff07e6290dfb8016291003bd00dda"
                                        }
                                    ], 
                                    "subscriptionNumber": "SM-00002", 
                                    "terms": {
                                        "autoRenew": true, 
                                        "initialTerm": {
                                            "period": 12, 
                                            "periodType": "Month", 
                                            "startDate": "2017-02-01", 
                                            "termType": "TERMED"
                                        }, 
                                        "renewalSetting": "RENEW_WITH_SPECIFIC_TERM", 
                                        "renewalTerms": [
                                            {
                                                "period": 12, 
                                                "periodType": "Month"
                                            }
                                        ]
                                    }
                                }, 
                                "triggerDates": [
                                    {
                                        "name": "ServiceActivation", 
                                        "triggerDate": "2017-02-01"
                                    }
                                ], 
                                "type": "CreateSubscription"
                            }
                        ]
                    }, 
                    {
                        "orderActions": [
                            {
                                "createSubscription": {
                                    "subscribeToRatePlans": [
                                        {
                                            "productRatePlanId": "efbff07e6290dfb80162910024c80dd5"
                                        }
                                    ], 
                                    "subscriptionNumber": "SM-00003", 
                                    "terms": {
                                        "autoRenew": true, 
                                        "initialTerm": {
                                            "period": 12, 
                                            "periodType": "Month", 
                                            "startDate": "2017-01-01", 
                                            "termType": "TERMED"
                                        }, 
                                        "renewalSetting": "RENEW_WITH_SPECIFIC_TERM", 
                                        "renewalTerms": [
                                            {
                                                "period": 12, 
                                                "periodType": "Month"
                                            }
                                        ]
                                    }
                                }, 
                                "triggerDates": [
                                    {
                                        "name": "ServiceActivation", 
                                        "triggerDate": "2017-03-01"
                                    }, 
                                    {
                                        "name": "CustomerAcceptance", 
                                        "triggerDate": "2017-04-01"
                                    }
                                ], 
                                "type": "CreateSubscription"
                            }
                        ]
                    }, 
                    {
                        "orderActions": [
                            {
                                "createSubscription": {
                                    "subscribeToRatePlans": [
                                        {
                                            "chargeOverrides": [
                                                {
                                                    "productRatePlanChargeId": "efbff07e6290dfb80162910024d80dd7", 
                                                    "startDate": {
                                                        "triggerEvent": "SpecificDate"
                                                    }
                                                }
                                            ], 
                                            "productRatePlanId": "efbff07e6290dfb80162910024c80dd5", 
                                            "uniqueToken": "Sugar-free Monthly"
                                        }
                                    ], 
                                    "subscriptionNumber": "SM-00004", 
                                    "terms": {
                                        "autoRenew": true, 
                                        "initialTerm": {
                                            "period": 12, 
                                            "periodType": "Month", 
                                            "startDate": "2017-01-01", 
                                            "termType": "TERMED"
                                        }, 
                                        "renewalSetting": "RENEW_WITH_SPECIFIC_TERM", 
                                        "renewalTerms": [
                                            {
                                                "period": 12, 
                                                "periodType": "Month"
                                            }
                                        ]
                                    }
                                }, 
                                "triggerDates": [
                                    {
                                        "name": "ServiceActivation", 
                                        "triggerDate": "2017-03-01"
                                    }, 
                                    {
                                        "name": "CustomerAcceptance", 
                                        "triggerDate": "2017-04-01"
                                    }
                                ], 
                                "type": "CreateSubscription"
                            }
                        ]
                    }, 
                    {
                        "orderActions": [
                            {
                                "suspend": {
                                    "suspendPeriods": 2, 
                                    "suspendPeriodsType": "Week", 
                                    "suspendPolicy": "FixedPeriodsFromToday"
                                }, 
                                "triggerDates": [
                                    {
                                        "name": "ContractEffective", 
                                        "triggerDate": "2018-01-01"
                                    }, 
                                    {
                                        "name": "ServiceActivation", 
                                        "triggerDate": "2018-01-01"
                                    }, 
                                    {
                                        "name": "CustomerAcceptance", 
                                        "triggerDate": "2018-01-01"
                                    }
                                ], 
                                "type": "Suspend"
                            }
                        ], 
                        "subscriptionNumber": "SM-00005"
                    }, 
                    {
                        "orderActions": [
                            {
                                "resume": {
                                    "extendsTerm": true, 
                                    "resumePolicy": "SpecificDate", 
                                    "resumeSpecificDate": "2018-10-01"
                                }, 
                                "triggerDates": [
                                    {
                                        "name": "ContractEffective", 
                                        "triggerDate": "2018-01-01"
                                    }, 
                                    {
                                        "name": "ServiceActivation", 
                                        "triggerDate": "2018-01-01"
                                    }, 
                                    {
                                        "name": "CustomerAcceptance", 
                                        "triggerDate": "2018-01-01"
                                    }
                                ], 
                                "type": "Resume"
                            }
                        ], 
                        "subscriptionNumber": "SM-00006"
                    }
                ]
            }' "https://rest.zuora.com/v1/orders"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/orders');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "description": "This is a description for the Order.", 
                "existingAccountNumber": "A00000001", 
                "orderDate": "2017-01-01", 
                "orderLineItems": [
                    {
                        "billingTrigger": "BillImmediately", 
                        "chargeAmountPerUnit": 50, 
                        "customFields": {
                            "someField__c": "some string"
                        }, 
                        "deferredRevenueAccountingCode": "Unearned Revenues", 
                        "description": "With Dual Stereo Microphones, HD 1080p, Black", 
                        "itemName": "webcam", 
                        "itemType": "Product", 
                        "listPricePerUnit": 59, 
                        "productCode": "C9201", 
                        "purchaseOrderNumber": "960-000764", 
                        "quantity": 2, 
                        "recognizedRevenueAccountingCode": "Earned Revenues", 
                        "revenueRecognitionRule": "recognized upon invoice", 
                        "taxCode": "8018", 
                        "taxMode": "TaxInclusive", 
                        "transactionDate": "2021-02-01"
                    }
                ], 
                "orderNumber": "OM-00001", 
                "processingOptions": {
                    "applyCreditBalance": true, 
                    "billingOptions": {
                        "targetDate": "2017-08-01"
                    }, 
                    "collectPayment": true, 
                    "runBilling": true
                }, 
                "subscriptions": [
                    {
                        "orderActions": [
                            {
                                "createSubscription": {
                                    "subscribeToRatePlans": [
                                        {
                                            "productRatePlanId": "efbff07e6290dfb8016291003bd00dda"
                                        }
                                    ], 
                                    "subscriptionNumber": "SM-00001", 
                                    "terms": {
                                        "autoRenew": true, 
                                        "initialTerm": {
                                            "period": 12, 
                                            "periodType": "Month", 
                                            "startDate": "2017-01-01", 
                                            "termType": "TERMED"
                                        }, 
                                        "renewalSetting": "RENEW_WITH_SPECIFIC_TERM", 
                                        "renewalTerms": [
                                            {
                                                "period": 12, 
                                                "periodType": "Month"
                                            }
                                        ]
                                    }
                                }, 
                                "triggerDates": [
                                    {
                                        "name": "ContractEffective", 
                                        "triggerDate": "2017-01-01"
                                    }
                                ], 
                                "type": "CreateSubscription"
                            }
                        ]
                    }, 
                    {
                        "orderActions": [
                            {
                                "createSubscription": {
                                    "subscribeToRatePlans": [
                                        {
                                            "productRatePlanId": "efbff07e6290dfb8016291003bd00dda"
                                        }
                                    ], 
                                    "subscriptionNumber": "SM-00002", 
                                    "terms": {
                                        "autoRenew": true, 
                                        "initialTerm": {
                                            "period": 12, 
                                            "periodType": "Month", 
                                            "startDate": "2017-02-01", 
                                            "termType": "TERMED"
                                        }, 
                                        "renewalSetting": "RENEW_WITH_SPECIFIC_TERM", 
                                        "renewalTerms": [
                                            {
                                                "period": 12, 
                                                "periodType": "Month"
                                            }
                                        ]
                                    }
                                }, 
                                "triggerDates": [
                                    {
                                        "name": "ServiceActivation", 
                                        "triggerDate": "2017-02-01"
                                    }
                                ], 
                                "type": "CreateSubscription"
                            }
                        ]
                    }, 
                    {
                        "orderActions": [
                            {
                                "createSubscription": {
                                    "subscribeToRatePlans": [
                                        {
                                            "productRatePlanId": "efbff07e6290dfb80162910024c80dd5"
                                        }
                                    ], 
                                    "subscriptionNumber": "SM-00003", 
                                    "terms": {
                                        "autoRenew": true, 
                                        "initialTerm": {
                                            "period": 12, 
                                            "periodType": "Month", 
                                            "startDate": "2017-01-01", 
                                            "termType": "TERMED"
                                        }, 
                                        "renewalSetting": "RENEW_WITH_SPECIFIC_TERM", 
                                        "renewalTerms": [
                                            {
                                                "period": 12, 
                                                "periodType": "Month"
                                            }
                                        ]
                                    }
                                }, 
                                "triggerDates": [
                                    {
                                        "name": "ServiceActivation", 
                                        "triggerDate": "2017-03-01"
                                    }, 
                                    {
                                        "name": "CustomerAcceptance", 
                                        "triggerDate": "2017-04-01"
                                    }
                                ], 
                                "type": "CreateSubscription"
                            }
                        ]
                    }, 
                    {
                        "orderActions": [
                            {
                                "createSubscription": {
                                    "subscribeToRatePlans": [
                                        {
                                            "chargeOverrides": [
                                                {
                                                    "productRatePlanChargeId": "efbff07e6290dfb80162910024d80dd7", 
                                                    "startDate": {
                                                        "triggerEvent": "SpecificDate"
                                                    }
                                                }
                                            ], 
                                            "productRatePlanId": "efbff07e6290dfb80162910024c80dd5", 
                                            "uniqueToken": "Sugar-free Monthly"
                                        }
                                    ], 
                                    "subscriptionNumber": "SM-00004", 
                                    "terms": {
                                        "autoRenew": true, 
                                        "initialTerm": {
                                            "period": 12, 
                                            "periodType": "Month", 
                                            "startDate": "2017-01-01", 
                                            "termType": "TERMED"
                                        }, 
                                        "renewalSetting": "RENEW_WITH_SPECIFIC_TERM", 
                                        "renewalTerms": [
                                            {
                                                "period": 12, 
                                                "periodType": "Month"
                                            }
                                        ]
                                    }
                                }, 
                                "triggerDates": [
                                    {
                                        "name": "ServiceActivation", 
                                        "triggerDate": "2017-03-01"
                                    }, 
                                    {
                                        "name": "CustomerAcceptance", 
                                        "triggerDate": "2017-04-01"
                                    }
                                ], 
                                "type": "CreateSubscription"
                            }
                        ]
                    }, 
                    {
                        "orderActions": [
                            {
                                "suspend": {
                                    "suspendPeriods": 2, 
                                    "suspendPeriodsType": "Week", 
                                    "suspendPolicy": "FixedPeriodsFromToday"
                                }, 
                                "triggerDates": [
                                    {
                                        "name": "ContractEffective", 
                                        "triggerDate": "2018-01-01"
                                    }, 
                                    {
                                        "name": "ServiceActivation", 
                                        "triggerDate": "2018-01-01"
                                    }, 
                                    {
                                        "name": "CustomerAcceptance", 
                                        "triggerDate": "2018-01-01"
                                    }
                                ], 
                                "type": "Suspend"
                            }
                        ], 
                        "subscriptionNumber": "SM-00005"
                    }, 
                    {
                        "orderActions": [
                            {
                                "resume": {
                                    "extendsTerm": true, 
                                    "resumePolicy": "SpecificDate", 
                                    "resumeSpecificDate": "2018-10-01"
                                }, 
                                "triggerDates": [
                                    {
                                        "name": "ContractEffective", 
                                        "triggerDate": "2018-01-01"
                                    }, 
                                    {
                                        "name": "ServiceActivation", 
                                        "triggerDate": "2018-01-01"
                                    }, 
                                    {
                                        "name": "CustomerAcceptance", 
                                        "triggerDate": "2018-01-01"
                                    }
                                ], 
                                "type": "Resume"
                            }
                        ], 
                        "subscriptionNumber": "SM-00006"
                    }
                ]
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"description\": \"This is a description for the Order.\", \n    \"existingAccountNumber\": \"A00000001\", \n    \"orderDate\": \"2017-01-01\", \n    \"orderLineItems\": [\n        {\n            \"billingTrigger\": \"BillImmediately\", \n            \"chargeAmountPerUnit\": 50, \n            \"customFields\": {\n                \"someField__c\": \"some string\"\n            }, \n            \"deferredRevenueAccountingCode\": \"Unearned Revenues\", \n            \"description\": \"With Dual Stereo Microphones, HD 1080p, Black\", \n            \"itemName\": \"webcam\", \n            \"itemType\": \"Product\", \n            \"listPricePerUnit\": 59, \n            \"productCode\": \"C9201\", \n            \"purchaseOrderNumber\": \"960-000764\", \n            \"quantity\": 2, \n            \"recognizedRevenueAccountingCode\": \"Earned Revenues\", \n            \"revenueRecognitionRule\": \"recognized upon invoice\", \n            \"taxCode\": \"8018\", \n            \"taxMode\": \"TaxInclusive\", \n            \"transactionDate\": \"2021-02-01\"\n        }\n    ], \n    \"orderNumber\": \"OM-00001\", \n    \"processingOptions\": {\n        \"applyCreditBalance\": true, \n        \"billingOptions\": {\n            \"targetDate\": \"2017-08-01\"\n        }, \n        \"collectPayment\": true, \n        \"runBilling\": true\n    }, \n    \"subscriptions\": [\n        {\n            \"orderActions\": [\n                {\n                    \"createSubscription\": {\n                        \"subscribeToRatePlans\": [\n                            {\n                                \"productRatePlanId\": \"efbff07e6290dfb8016291003bd00dda\"\n                            }\n                        ], \n                        \"subscriptionNumber\": \"SM-00001\", \n                        \"terms\": {\n                            \"autoRenew\": true, \n                            \"initialTerm\": {\n                                \"period\": 12, \n                                \"periodType\": \"Month\", \n                                \"startDate\": \"2017-01-01\", \n                                \"termType\": \"TERMED\"\n                            }, \n                            \"renewalSetting\": \"RENEW_WITH_SPECIFIC_TERM\", \n                            \"renewalTerms\": [\n                                {\n                                    \"period\": 12, \n                                    \"periodType\": \"Month\"\n                                }\n                            ]\n                        }\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2017-01-01\"\n                        }\n                    ], \n                    \"type\": \"CreateSubscription\"\n                }\n            ]\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"createSubscription\": {\n                        \"subscribeToRatePlans\": [\n                            {\n                                \"productRatePlanId\": \"efbff07e6290dfb8016291003bd00dda\"\n                            }\n                        ], \n                        \"subscriptionNumber\": \"SM-00002\", \n                        \"terms\": {\n                            \"autoRenew\": true, \n                            \"initialTerm\": {\n                                \"period\": 12, \n                                \"periodType\": \"Month\", \n                                \"startDate\": \"2017-02-01\", \n                                \"termType\": \"TERMED\"\n                            }, \n                            \"renewalSetting\": \"RENEW_WITH_SPECIFIC_TERM\", \n                            \"renewalTerms\": [\n                                {\n                                    \"period\": 12, \n                                    \"periodType\": \"Month\"\n                                }\n                            ]\n                        }\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2017-02-01\"\n                        }\n                    ], \n                    \"type\": \"CreateSubscription\"\n                }\n            ]\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"createSubscription\": {\n                        \"subscribeToRatePlans\": [\n                            {\n                                \"productRatePlanId\": \"efbff07e6290dfb80162910024c80dd5\"\n                            }\n                        ], \n                        \"subscriptionNumber\": \"SM-00003\", \n                        \"terms\": {\n                            \"autoRenew\": true, \n                            \"initialTerm\": {\n                                \"period\": 12, \n                                \"periodType\": \"Month\", \n                                \"startDate\": \"2017-01-01\", \n                                \"termType\": \"TERMED\"\n                            }, \n                            \"renewalSetting\": \"RENEW_WITH_SPECIFIC_TERM\", \n                            \"renewalTerms\": [\n                                {\n                                    \"period\": 12, \n                                    \"periodType\": \"Month\"\n                                }\n                            ]\n                        }\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2017-03-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2017-04-01\"\n                        }\n                    ], \n                    \"type\": \"CreateSubscription\"\n                }\n            ]\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"createSubscription\": {\n                        \"subscribeToRatePlans\": [\n                            {\n                                \"chargeOverrides\": [\n                                    {\n                                        \"productRatePlanChargeId\": \"efbff07e6290dfb80162910024d80dd7\", \n                                        \"startDate\": {\n                                            \"triggerEvent\": \"SpecificDate\"\n                                        }\n                                    }\n                                ], \n                                \"productRatePlanId\": \"efbff07e6290dfb80162910024c80dd5\", \n                                \"uniqueToken\": \"Sugar-free Monthly\"\n                            }\n                        ], \n                        \"subscriptionNumber\": \"SM-00004\", \n                        \"terms\": {\n                            \"autoRenew\": true, \n                            \"initialTerm\": {\n                                \"period\": 12, \n                                \"periodType\": \"Month\", \n                                \"startDate\": \"2017-01-01\", \n                                \"termType\": \"TERMED\"\n                            }, \n                            \"renewalSetting\": \"RENEW_WITH_SPECIFIC_TERM\", \n                            \"renewalTerms\": [\n                                {\n                                    \"period\": 12, \n                                    \"periodType\": \"Month\"\n                                }\n                            ]\n                        }\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2017-03-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2017-04-01\"\n                        }\n                    ], \n                    \"type\": \"CreateSubscription\"\n                }\n            ]\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"suspend\": {\n                        \"suspendPeriods\": 2, \n                        \"suspendPeriodsType\": \"Week\", \n                        \"suspendPolicy\": \"FixedPeriodsFromToday\"\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }, \n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }\n                    ], \n                    \"type\": \"Suspend\"\n                }\n            ], \n            \"subscriptionNumber\": \"SM-00005\"\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"resume\": {\n                        \"extendsTerm\": true, \n                        \"resumePolicy\": \"SpecificDate\", \n                        \"resumeSpecificDate\": \"2018-10-01\"\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }, \n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }\n                    ], \n                    \"type\": \"Resume\"\n                }\n            ], \n            \"subscriptionNumber\": \"SM-00006\"\n        }\n    ]\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/orders")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"description\": \"This is a description for the Order.\", \n    \"existingAccountNumber\": \"A00000001\", \n    \"orderDate\": \"2017-01-01\", \n    \"orderLineItems\": [\n        {\n            \"billingTrigger\": \"BillImmediately\", \n            \"chargeAmountPerUnit\": 50, \n            \"customFields\": {\n                \"someField__c\": \"some string\"\n            }, \n            \"deferredRevenueAccountingCode\": \"Unearned Revenues\", \n            \"description\": \"With Dual Stereo Microphones, HD 1080p, Black\", \n            \"itemName\": \"webcam\", \n            \"itemType\": \"Product\", \n            \"listPricePerUnit\": 59, \n            \"productCode\": \"C9201\", \n            \"purchaseOrderNumber\": \"960-000764\", \n            \"quantity\": 2, \n            \"recognizedRevenueAccountingCode\": \"Earned Revenues\", \n            \"revenueRecognitionRule\": \"recognized upon invoice\", \n            \"taxCode\": \"8018\", \n            \"taxMode\": \"TaxInclusive\", \n            \"transactionDate\": \"2021-02-01\"\n        }\n    ], \n    \"orderNumber\": \"OM-00001\", \n    \"processingOptions\": {\n        \"applyCreditBalance\": true, \n        \"billingOptions\": {\n            \"targetDate\": \"2017-08-01\"\n        }, \n        \"collectPayment\": true, \n        \"runBilling\": true\n    }, \n    \"subscriptions\": [\n        {\n            \"orderActions\": [\n                {\n                    \"createSubscription\": {\n                        \"subscribeToRatePlans\": [\n                            {\n                                \"productRatePlanId\": \"efbff07e6290dfb8016291003bd00dda\"\n                            }\n                        ], \n                        \"subscriptionNumber\": \"SM-00001\", \n                        \"terms\": {\n                            \"autoRenew\": true, \n                            \"initialTerm\": {\n                                \"period\": 12, \n                                \"periodType\": \"Month\", \n                                \"startDate\": \"2017-01-01\", \n                                \"termType\": \"TERMED\"\n                            }, \n                            \"renewalSetting\": \"RENEW_WITH_SPECIFIC_TERM\", \n                            \"renewalTerms\": [\n                                {\n                                    \"period\": 12, \n                                    \"periodType\": \"Month\"\n                                }\n                            ]\n                        }\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2017-01-01\"\n                        }\n                    ], \n                    \"type\": \"CreateSubscription\"\n                }\n            ]\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"createSubscription\": {\n                        \"subscribeToRatePlans\": [\n                            {\n                                \"productRatePlanId\": \"efbff07e6290dfb8016291003bd00dda\"\n                            }\n                        ], \n                        \"subscriptionNumber\": \"SM-00002\", \n                        \"terms\": {\n                            \"autoRenew\": true, \n                            \"initialTerm\": {\n                                \"period\": 12, \n                                \"periodType\": \"Month\", \n                                \"startDate\": \"2017-02-01\", \n                                \"termType\": \"TERMED\"\n                            }, \n                            \"renewalSetting\": \"RENEW_WITH_SPECIFIC_TERM\", \n                            \"renewalTerms\": [\n                                {\n                                    \"period\": 12, \n                                    \"periodType\": \"Month\"\n                                }\n                            ]\n                        }\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2017-02-01\"\n                        }\n                    ], \n                    \"type\": \"CreateSubscription\"\n                }\n            ]\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"createSubscription\": {\n                        \"subscribeToRatePlans\": [\n                            {\n                                \"productRatePlanId\": \"efbff07e6290dfb80162910024c80dd5\"\n                            }\n                        ], \n                        \"subscriptionNumber\": \"SM-00003\", \n                        \"terms\": {\n                            \"autoRenew\": true, \n                            \"initialTerm\": {\n                                \"period\": 12, \n                                \"periodType\": \"Month\", \n                                \"startDate\": \"2017-01-01\", \n                                \"termType\": \"TERMED\"\n                            }, \n                            \"renewalSetting\": \"RENEW_WITH_SPECIFIC_TERM\", \n                            \"renewalTerms\": [\n                                {\n                                    \"period\": 12, \n                                    \"periodType\": \"Month\"\n                                }\n                            ]\n                        }\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2017-03-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2017-04-01\"\n                        }\n                    ], \n                    \"type\": \"CreateSubscription\"\n                }\n            ]\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"createSubscription\": {\n                        \"subscribeToRatePlans\": [\n                            {\n                                \"chargeOverrides\": [\n                                    {\n                                        \"productRatePlanChargeId\": \"efbff07e6290dfb80162910024d80dd7\", \n                                        \"startDate\": {\n                                            \"triggerEvent\": \"SpecificDate\"\n                                        }\n                                    }\n                                ], \n                                \"productRatePlanId\": \"efbff07e6290dfb80162910024c80dd5\", \n                                \"uniqueToken\": \"Sugar-free Monthly\"\n                            }\n                        ], \n                        \"subscriptionNumber\": \"SM-00004\", \n                        \"terms\": {\n                            \"autoRenew\": true, \n                            \"initialTerm\": {\n                                \"period\": 12, \n                                \"periodType\": \"Month\", \n                                \"startDate\": \"2017-01-01\", \n                                \"termType\": \"TERMED\"\n                            }, \n                            \"renewalSetting\": \"RENEW_WITH_SPECIFIC_TERM\", \n                            \"renewalTerms\": [\n                                {\n                                    \"period\": 12, \n                                    \"periodType\": \"Month\"\n                                }\n                            ]\n                        }\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2017-03-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2017-04-01\"\n                        }\n                    ], \n                    \"type\": \"CreateSubscription\"\n                }\n            ]\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"suspend\": {\n                        \"suspendPeriods\": 2, \n                        \"suspendPeriodsType\": \"Week\", \n                        \"suspendPolicy\": \"FixedPeriodsFromToday\"\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }, \n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }\n                    ], \n                    \"type\": \"Suspend\"\n                }\n            ], \n            \"subscriptionNumber\": \"SM-00005\"\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"resume\": {\n                        \"extendsTerm\": true, \n                        \"resumePolicy\": \"SpecificDate\", \n                        \"resumeSpecificDate\": \"2018-10-01\"\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }, \n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }\n                    ], \n                    \"type\": \"Resume\"\n                }\n            ], \n            \"subscriptionNumber\": \"SM-00006\"\n        }\n    ]\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/orders", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/orders")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"description\": \"This is a description for the Order.\", \n    \"existingAccountNumber\": \"A00000001\", \n    \"orderDate\": \"2017-01-01\", \n    \"orderLineItems\": [\n        {\n            \"billingTrigger\": \"BillImmediately\", \n            \"chargeAmountPerUnit\": 50, \n            \"customFields\": {\n                \"someField__c\": \"some string\"\n            }, \n            \"deferredRevenueAccountingCode\": \"Unearned Revenues\", \n            \"description\": \"With Dual Stereo Microphones, HD 1080p, Black\", \n            \"itemName\": \"webcam\", \n            \"itemType\": \"Product\", \n            \"listPricePerUnit\": 59, \n            \"productCode\": \"C9201\", \n            \"purchaseOrderNumber\": \"960-000764\", \n            \"quantity\": 2, \n            \"recognizedRevenueAccountingCode\": \"Earned Revenues\", \n            \"revenueRecognitionRule\": \"recognized upon invoice\", \n            \"taxCode\": \"8018\", \n            \"taxMode\": \"TaxInclusive\", \n            \"transactionDate\": \"2021-02-01\"\n        }\n    ], \n    \"orderNumber\": \"OM-00001\", \n    \"processingOptions\": {\n        \"applyCreditBalance\": true, \n        \"billingOptions\": {\n            \"targetDate\": \"2017-08-01\"\n        }, \n        \"collectPayment\": true, \n        \"runBilling\": true\n    }, \n    \"subscriptions\": [\n        {\n            \"orderActions\": [\n                {\n                    \"createSubscription\": {\n                        \"subscribeToRatePlans\": [\n                            {\n                                \"productRatePlanId\": \"efbff07e6290dfb8016291003bd00dda\"\n                            }\n                        ], \n                        \"subscriptionNumber\": \"SM-00001\", \n                        \"terms\": {\n                            \"autoRenew\": true, \n                            \"initialTerm\": {\n                                \"period\": 12, \n                                \"periodType\": \"Month\", \n                                \"startDate\": \"2017-01-01\", \n                                \"termType\": \"TERMED\"\n                            }, \n                            \"renewalSetting\": \"RENEW_WITH_SPECIFIC_TERM\", \n                            \"renewalTerms\": [\n                                {\n                                    \"period\": 12, \n                                    \"periodType\": \"Month\"\n                                }\n                            ]\n                        }\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2017-01-01\"\n                        }\n                    ], \n                    \"type\": \"CreateSubscription\"\n                }\n            ]\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"createSubscription\": {\n                        \"subscribeToRatePlans\": [\n                            {\n                                \"productRatePlanId\": \"efbff07e6290dfb8016291003bd00dda\"\n                            }\n                        ], \n                        \"subscriptionNumber\": \"SM-00002\", \n                        \"terms\": {\n                            \"autoRenew\": true, \n                            \"initialTerm\": {\n                                \"period\": 12, \n                                \"periodType\": \"Month\", \n                                \"startDate\": \"2017-02-01\", \n                                \"termType\": \"TERMED\"\n                            }, \n                            \"renewalSetting\": \"RENEW_WITH_SPECIFIC_TERM\", \n                            \"renewalTerms\": [\n                                {\n                                    \"period\": 12, \n                                    \"periodType\": \"Month\"\n                                }\n                            ]\n                        }\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2017-02-01\"\n                        }\n                    ], \n                    \"type\": \"CreateSubscription\"\n                }\n            ]\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"createSubscription\": {\n                        \"subscribeToRatePlans\": [\n                            {\n                                \"productRatePlanId\": \"efbff07e6290dfb80162910024c80dd5\"\n                            }\n                        ], \n                        \"subscriptionNumber\": \"SM-00003\", \n                        \"terms\": {\n                            \"autoRenew\": true, \n                            \"initialTerm\": {\n                                \"period\": 12, \n                                \"periodType\": \"Month\", \n                                \"startDate\": \"2017-01-01\", \n                                \"termType\": \"TERMED\"\n                            }, \n                            \"renewalSetting\": \"RENEW_WITH_SPECIFIC_TERM\", \n                            \"renewalTerms\": [\n                                {\n                                    \"period\": 12, \n                                    \"periodType\": \"Month\"\n                                }\n                            ]\n                        }\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2017-03-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2017-04-01\"\n                        }\n                    ], \n                    \"type\": \"CreateSubscription\"\n                }\n            ]\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"createSubscription\": {\n                        \"subscribeToRatePlans\": [\n                            {\n                                \"chargeOverrides\": [\n                                    {\n                                        \"productRatePlanChargeId\": \"efbff07e6290dfb80162910024d80dd7\", \n                                        \"startDate\": {\n                                            \"triggerEvent\": \"SpecificDate\"\n                                        }\n                                    }\n                                ], \n                                \"productRatePlanId\": \"efbff07e6290dfb80162910024c80dd5\", \n                                \"uniqueToken\": \"Sugar-free Monthly\"\n                            }\n                        ], \n                        \"subscriptionNumber\": \"SM-00004\", \n                        \"terms\": {\n                            \"autoRenew\": true, \n                            \"initialTerm\": {\n                                \"period\": 12, \n                                \"periodType\": \"Month\", \n                                \"startDate\": \"2017-01-01\", \n                                \"termType\": \"TERMED\"\n                            }, \n                            \"renewalSetting\": \"RENEW_WITH_SPECIFIC_TERM\", \n                            \"renewalTerms\": [\n                                {\n                                    \"period\": 12, \n                                    \"periodType\": \"Month\"\n                                }\n                            ]\n                        }\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2017-03-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2017-04-01\"\n                        }\n                    ], \n                    \"type\": \"CreateSubscription\"\n                }\n            ]\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"suspend\": {\n                        \"suspendPeriods\": 2, \n                        \"suspendPeriodsType\": \"Week\", \n                        \"suspendPolicy\": \"FixedPeriodsFromToday\"\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }, \n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }\n                    ], \n                    \"type\": \"Suspend\"\n                }\n            ], \n            \"subscriptionNumber\": \"SM-00005\"\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"resume\": {\n                        \"extendsTerm\": true, \n                        \"resumePolicy\": \"SpecificDate\", \n                        \"resumeSpecificDate\": \"2018-10-01\"\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }, \n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }\n                    ], \n                    \"type\": \"Resume\"\n                }\n            ], \n            \"subscriptionNumber\": \"SM-00006\"\n        }\n    ]\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/orders");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"description\": \"This is a description for the Order.\", \n    \"existingAccountNumber\": \"A00000001\", \n    \"orderDate\": \"2017-01-01\", \n    \"orderLineItems\": [\n        {\n            \"billingTrigger\": \"BillImmediately\", \n            \"chargeAmountPerUnit\": 50, \n            \"customFields\": {\n                \"someField__c\": \"some string\"\n            }, \n            \"deferredRevenueAccountingCode\": \"Unearned Revenues\", \n            \"description\": \"With Dual Stereo Microphones, HD 1080p, Black\", \n            \"itemName\": \"webcam\", \n            \"itemType\": \"Product\", \n            \"listPricePerUnit\": 59, \n            \"productCode\": \"C9201\", \n            \"purchaseOrderNumber\": \"960-000764\", \n            \"quantity\": 2, \n            \"recognizedRevenueAccountingCode\": \"Earned Revenues\", \n            \"revenueRecognitionRule\": \"recognized upon invoice\", \n            \"taxCode\": \"8018\", \n            \"taxMode\": \"TaxInclusive\", \n            \"transactionDate\": \"2021-02-01\"\n        }\n    ], \n    \"orderNumber\": \"OM-00001\", \n    \"processingOptions\": {\n        \"applyCreditBalance\": true, \n        \"billingOptions\": {\n            \"targetDate\": \"2017-08-01\"\n        }, \n        \"collectPayment\": true, \n        \"runBilling\": true\n    }, \n    \"subscriptions\": [\n        {\n            \"orderActions\": [\n                {\n                    \"createSubscription\": {\n                        \"subscribeToRatePlans\": [\n                            {\n                                \"productRatePlanId\": \"efbff07e6290dfb8016291003bd00dda\"\n                            }\n                        ], \n                        \"subscriptionNumber\": \"SM-00001\", \n                        \"terms\": {\n                            \"autoRenew\": true, \n                            \"initialTerm\": {\n                                \"period\": 12, \n                                \"periodType\": \"Month\", \n                                \"startDate\": \"2017-01-01\", \n                                \"termType\": \"TERMED\"\n                            }, \n                            \"renewalSetting\": \"RENEW_WITH_SPECIFIC_TERM\", \n                            \"renewalTerms\": [\n                                {\n                                    \"period\": 12, \n                                    \"periodType\": \"Month\"\n                                }\n                            ]\n                        }\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2017-01-01\"\n                        }\n                    ], \n                    \"type\": \"CreateSubscription\"\n                }\n            ]\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"createSubscription\": {\n                        \"subscribeToRatePlans\": [\n                            {\n                                \"productRatePlanId\": \"efbff07e6290dfb8016291003bd00dda\"\n                            }\n                        ], \n                        \"subscriptionNumber\": \"SM-00002\", \n                        \"terms\": {\n                            \"autoRenew\": true, \n                            \"initialTerm\": {\n                                \"period\": 12, \n                                \"periodType\": \"Month\", \n                                \"startDate\": \"2017-02-01\", \n                                \"termType\": \"TERMED\"\n                            }, \n                            \"renewalSetting\": \"RENEW_WITH_SPECIFIC_TERM\", \n                            \"renewalTerms\": [\n                                {\n                                    \"period\": 12, \n                                    \"periodType\": \"Month\"\n                                }\n                            ]\n                        }\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2017-02-01\"\n                        }\n                    ], \n                    \"type\": \"CreateSubscription\"\n                }\n            ]\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"createSubscription\": {\n                        \"subscribeToRatePlans\": [\n                            {\n                                \"productRatePlanId\": \"efbff07e6290dfb80162910024c80dd5\"\n                            }\n                        ], \n                        \"subscriptionNumber\": \"SM-00003\", \n                        \"terms\": {\n                            \"autoRenew\": true, \n                            \"initialTerm\": {\n                                \"period\": 12, \n                                \"periodType\": \"Month\", \n                                \"startDate\": \"2017-01-01\", \n                                \"termType\": \"TERMED\"\n                            }, \n                            \"renewalSetting\": \"RENEW_WITH_SPECIFIC_TERM\", \n                            \"renewalTerms\": [\n                                {\n                                    \"period\": 12, \n                                    \"periodType\": \"Month\"\n                                }\n                            ]\n                        }\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2017-03-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2017-04-01\"\n                        }\n                    ], \n                    \"type\": \"CreateSubscription\"\n                }\n            ]\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"createSubscription\": {\n                        \"subscribeToRatePlans\": [\n                            {\n                                \"chargeOverrides\": [\n                                    {\n                                        \"productRatePlanChargeId\": \"efbff07e6290dfb80162910024d80dd7\", \n                                        \"startDate\": {\n                                            \"triggerEvent\": \"SpecificDate\"\n                                        }\n                                    }\n                                ], \n                                \"productRatePlanId\": \"efbff07e6290dfb80162910024c80dd5\", \n                                \"uniqueToken\": \"Sugar-free Monthly\"\n                            }\n                        ], \n                        \"subscriptionNumber\": \"SM-00004\", \n                        \"terms\": {\n                            \"autoRenew\": true, \n                            \"initialTerm\": {\n                                \"period\": 12, \n                                \"periodType\": \"Month\", \n                                \"startDate\": \"2017-01-01\", \n                                \"termType\": \"TERMED\"\n                            }, \n                            \"renewalSetting\": \"RENEW_WITH_SPECIFIC_TERM\", \n                            \"renewalTerms\": [\n                                {\n                                    \"period\": 12, \n                                    \"periodType\": \"Month\"\n                                }\n                            ]\n                        }\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2017-03-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2017-04-01\"\n                        }\n                    ], \n                    \"type\": \"CreateSubscription\"\n                }\n            ]\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"suspend\": {\n                        \"suspendPeriods\": 2, \n                        \"suspendPeriodsType\": \"Week\", \n                        \"suspendPolicy\": \"FixedPeriodsFromToday\"\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }, \n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }\n                    ], \n                    \"type\": \"Suspend\"\n                }\n            ], \n            \"subscriptionNumber\": \"SM-00005\"\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"resume\": {\n                        \"extendsTerm\": true, \n                        \"resumePolicy\": \"SpecificDate\", \n                        \"resumeSpecificDate\": \"2018-10-01\"\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }, \n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2018-01-01\"\n                        }\n                    ], \n                    \"type\": \"Resume\"\n                }\n            ], \n            \"subscriptionNumber\": \"SM-00006\"\n        }\n    ]\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/orders/invoiceOwner/{accountNumber}":
    get:
      description: |
        **Note:** This feature is only available if you have the [Order Metrics](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AA_Overview_of_Orders#Order_Metrics) feature enabled. As of Zuora Billing Release 284, Orders is generally available and the Order Metrics feature is no longer available as a standalone feature. If you are an existing Subscribe and Amend customer and want Order Metrics only, you must turn on [Orders Harmonization](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Orders_Harmonization/Orders_Harmonization). You can still keep the existing Subscribe and Amend API integrations to create and manage subscriptions.

        **Note:** The [Order Line Items](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Line_Items/AA_Overview_of_Order_Line_Items) feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. If you want to join this early adopter program, submit a request at [Zuora Global Support](https://support.zuora.com/).

        Retrieves the detailed information about all orders for a specified invoice owner.
      operationId: GET_OrdersByInvoiceOwner
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: The invoice owner account number.
          in: path
          name: accountNumber
          required: true
          schema:
            format: string
            type: string
        - description: |
            The page number of the orders retrieved. The default is 1.
          in: query
          name: page
          required: false
          schema:
            type: integer
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - description: |
            The date type to filter on. This field value can be orderDate or updatedDate. Default is orderDate.
          in: query
          name: dateFilterOption
          required: false
          schema:
            type: string
        - description: |
            The result will only contain the orders with the date of dateFilterOption later than or equal to this date.
          in: query
          name: startDate
          required: false
          schema:
            format: date
            type: string
        - description: |
            The result will only contain the orders with the date of dateFilterOption earlier than or equal to this date.
          in: query
          name: endDate
          required: false
          schema:
            format: date
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    orders:
                      - createdBy: 2c989028622282520162235ab0f603ba
                        createdDate: 2018-03-14 15:12:58
                        currency: USD
                        customFields:
                          order_cf_date__c: 2017-01-01
                        description: This is a description for the Order.
                        existingAccountNumber: accountA_Num
                        orderDate: 2017-03-01
                        orderNumber: O-00000002
                        status: Completed
                        subscriptions:
                          - baseVersion: 1
                            customFields:
                              sub_cf_picklist__c: null
                            newVersion: 2
                            orderActions:
                              - customFields:
                                  oa_cf_text__c: null
                                sequence: 0
                                triggerDates:
                                  - name: ContractEffective
                                    triggerDate: 2017-03-01
                                  - name: ServiceActivation
                                    triggerDate: 2017-03-01
                                  - name: CustomerAcceptance
                                    triggerDate: 2017-03-01
                                type: UpdateProduct
                                updateProduct:
                                  chargeUpdates:
                                    - billing:
                                        billingPeriodAlignment: null
                                      chargeNumber: C-00000001
                                      customFields:
                                        srpc_cf_picklist__c: null
                                      description: null
                                      effectiveDate:
                                        specificTriggerDate: null
                                      newRatePlanChargeId: 2c989028622282520162235adabc0651
                                      pricing:
                                        recurringVolume:
                                          priceChangeOption: null
                                          priceIncreasePercentage: null
                                          quantity: 7
                                          tiers: []
                                      uniqueToken: null
                                  customFields: {}
                                  newRatePlanId: 2c989028622282520162235ada870649
                                  ratePlanId: 2c989028622282520162235acd1b05d2
                                  specificUpdateDate: null
                                  uniqueToken: null
                            subscriptionNumber: A-S00000001
                        updatedBy: 2c989028622282520162235ab0f603ba
                        updatedDate: 2018-03-14 15:12:58
                      - createdBy: 2c989028622282520162235ab0f603ba
                        createdDate: 2018-03-14 15:12:55
                        currency: USD
                        customFields:
                          order_cf_date__c: 2017-01-01
                        existingAccountNumber: accountA_Num
                        orderDate: 2017-01-01
                        orderNumber: O-00000001
                        status: Completed
                        subscriptions:
                          - baseVersion: null
                            customFields:
                              sub_cf_picklist__c: sub123
                            newVersion: 1
                            orderActions:
                              - createSubscription:
                                  invoiceSeparately: null
                                  notes: null
                                  subscribeToRatePlans:
                                    - chargeOverrides:
                                        - billing:
                                            billCycleDay: null
                                            billCycleType: null
                                            billingPeriod: null
                                            billingPeriodAlignment: null
                                            billingTiming: null
                                            specificBillingPeriod: null
                                            weeklyBillCycleDay: null
                                          chargeNumber: C-00000001
                                          customFields:
                                            srpc_cf_picklist__c: null
                                          description: null
                                          endDate:
                                            endDateCondition: null
                                            specificEndDate: null
                                            upToPeriods: null
                                            upToPeriodsType: null
                                          pricing:
                                            recurringVolume:
                                              listPriceBase: Per_Billing_Period
                                              priceChangeOption: null
                                              priceIncreasePercentage: null
                                              quantity: 12
                                              tiers: []
                                          productRateplanChargeId: 2c989028622282520162235aca7a05b9
                                          startDate:
                                            specificTriggerDate: null
                                          uniqueToken: null
                                      customFields: {}
                                      newRatePlanId: 2c989028622282520162235acd1b05d2
                                      productRatePlanId: 2c989028622282520162235ac91605b3
                                      uniqueToken: null
                                  subscriptionOwnerAccountNumber: accountA_Num
                                  terms:
                                    autoRenew: false
                                    initialTerm:
                                      period: 12
                                      periodType: Month
                                      startDate: 2017-01-01
                                      termType: TERMED
                                    renewalSetting: RENEW_WITH_SPECIFIC_TERM
                                    renewalTerms:
                                      - period: 0
                                        periodType: Month
                                customFields:
                                  oa_cf_text__c: oa cf test
                                sequence: 0
                                triggerDates:
                                  - name: ContractEffective
                                    triggerDate: 2017-01-01
                                  - name: ServiceActivation
                                    triggerDate: 2017-01-01
                                  - name: CustomerAcceptance
                                    triggerDate: 2017-01-01
                                type: CreateSubscription
                            subscriptionNumber: A-S00000001
                        updatedBy: 2c989028622282520162235ab0f603ba
                        updatedDate: 2018-03-14 15:12:55
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GetOrdersResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List orders of an invoice owner
      tags:
        - Orders
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/orders/invoiceOwner/{accountNumber}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/orders/invoiceOwner/{accountNumber}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/orders/invoiceOwner/{accountNumber}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/orders/invoiceOwner/{accountNumber}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/orders/invoiceOwner/{accountNumber}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/orders/invoiceOwner/{accountNumber}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  /v1/orders/preview:
    post:
      description: |
        **Note:** This operation is only available if you have the [Orders](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AA_Overview_of_Orders#Orders) feature enabled. Orders is now generally available as of Zuora Billing Release 284 (August 2020). If you are an existing Zuora Subscribe and Amend customer and want to adopt Orders, see [What is Orders Harmonization](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Orders_Harmonization/Orders_Harmonization#What_is_Orders_Harmonization.3F) and join the [Orders Harmonization community group](https://community.zuora.com/t5/Orders-Harmonization/gp-p/Orders-Harmonization) for more information. If you want to enable Orders, submit a request at [Zuora Global Support](https://support.zuora.com/).

        **Note:** The [Order Line Items](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Line_Items/AA_Overview_of_Order_Line_Items) feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. If you want to join this early adopter program, submit a request at [Zuora Global Support](https://support.zuora.com/).        

        Retrieves the preview of the charge metrics and invoice items of a specified order. Preview for subscriptions and order line items are both supported. This operation is only an order preview and no order is created.  

        See [Preview a Subscription Creation Order](https://www.zuora.com/developer/api-guides/#Create-a-subscription-for-a-new-customer) for a use case of the "Preview an order" operation.

        The limit of orders allowed on a subscription is 1000.

        The limit of order line items allowed in an order is 100.

        Zuora has the following limits on the Orders synchronous API to prevent performance degradation: 
        * Up to 50 subscriptions are allowed in a single [Create an order](https://www.zuora.com/developer/api-reference/#operation/POST_Order) or [Preview an order](https://www.zuora.com/developer/api-reference/#operation/POST_PreviewOrder) operation call.
        * Up to 50 order actions are allowed in a single [Create an order](https://www.zuora.com/developer/api-reference/#operation/POST_Order) or [Preview an order](https://www.zuora.com/developer/api-reference/#operation/POST_PreviewOrder) operation call.
        * Up to 50 order actions are allowed on a single subscription in a [Create an order](https://www.zuora.com/developer/api-reference/#operation/POST_Order) or [Preview an order](https://www.zuora.com/developer/api-reference/#operation/POST_PreviewOrder) operation call.

        If you have an Order that exceeds any limits of the above, Zuora recommends you use the following asynchronous API operations:
        * [Create an order asynchronously](https://www.zuora.com/developer/api-reference/#operation/POST_CreateOrderAsynchronously)
        * [Preview an order asynchronously](https://www.zuora.com/developer/api-reference/#operation/POST_PreviewOrderAsynchronously)

        Zuora has the following limits on the Orders asynchronous API operations to prevent performance degradation:
        * Up to 300 subscriptions are allowed in a single [Create an order asynchronously](https://www.zuora.com/developer/api-reference/#operation/POST_CreateOrderAsynchronously) or [Preview an order asynchronously](https://www.zuora.com/developer/api-reference/#operation/POST_PreviewOrderAsynchronously) operation call.
        * Up to 300 order actions are allowed in a single [Create an order asynchronously](https://www.zuora.com/developer/api-reference/#operation/POST_CreateOrderAsynchronously) or [Preview an order asynchronously](https://www.zuora.com/developer/api-reference/#operation/POST_PreviewOrderAsynchronously) operation call.
        * Up to 300 order actions are allowed on a single subscription in a [Create an order asynchronously](https://www.zuora.com/developer/api-reference/#operation/POST_CreateOrderAsynchronously) or [Preview an order asynchronously](https://www.zuora.com/developer/api-reference/#operation/POST_PreviewOrderAsynchronously) operation call.

        If you have a need for a large order that exceeds any limits of the above, you can request a limit increase for the Orders asynchronous API by submitting a request at [Zuora Global Support](https://support.zuora.com).
      operationId: POST_PreviewOrder
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
      requestBody:
        $ref: "#/components/requestBodies/POSTOrderPreviewRequestType"
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    previewResult:
                      chargeMetrics:
                        - charges:
                            - chargeNumber: C-00000211
                              cmrr:
                                discount: null
                                discountDelta: null
                                regular: 30
                                regularDelta: 0
                              originRatePlanId: 2c98919c67a5ae9d0167a6901c5a027f
                              productRatePlanChargeId: 2c98901f6706718c016706b91c6e001f
                              productRatePlanId: 2c98901f6706718c016706b8c0720012
                              tcb:
                                discount: null
                                discountDelta: null
                                regular: 11.61
                                regularDelta: -348.39
                              tcv:
                                discount: null
                                discountDelta: null
                                regular: 11.61
                                regularDelta: -348.39
                          subscriptionNumber: A-S00000101
                        - charges:
                            - chargeNumber: C-00000210
                              cmrr:
                                discount: null
                                discountDelta: null
                                regular: 40
                                regularDelta: 10
                              originRatePlanId: 2c98919c67a5ae9d0167a68f8eb20262
                              productRatePlanChargeId: 2c98901f6706718c016706b91c6e001f
                              productRatePlanId: 2c98901f6706718c016706b8c0720012
                              tcb:
                                discount: null
                                discountDelta: null
                                regular: 480
                                regularDelta: 120
                              tcv:
                                discount: null
                                discountDelta: null
                                regular: 480
                                regularDelta: 120
                          subscriptionNumber: A-S00000100
                        - charges:
                            - chargeNumber: C-00000212
                              cmrr:
                                discount: null
                                discountDelta: null
                                regular: 30
                                regularDelta: 30
                              originRatePlanId: 2c98919c67a5ae9d0167a69089bd029c
                              productRatePlanChargeId: 2c98901f6706718c016706b91c6e001f
                              productRatePlanId: 2c98901f6706718c016706b8c0720012
                              tcb:
                                discount: null
                                discountDelta: null
                                regular: 360
                                regularDelta: 348.39
                              tcv:
                                discount: null
                                discountDelta: null
                                regular: 359.61
                                regularDelta: 348
                          subscriptionNumber: A-S00000102
                      invoices:
                        - amount: 141.93
                          amountWithoutTax: 141.93
                          invoiceItems:
                            - additionalInfo:
                                quantity: 2
                                unitOfMeasure: Each
                              amountWithoutTax: 11.61
                              chargeDescription: ""
                              chargeName: Charge
                              chargeNumber: C-00000212
                              processingType: Charge
                              productName: Product
                              productRatePlanChargeId: 2c98901f6706718c016706b91c6e001f
                              serviceEndDate: 2018-12-12
                              serviceStartDate: 2018-12-01
                              subscriptionNumber: A-S00000102
                              taxAmount: 0
                            - additionalInfo:
                                quantity: 2
                                unitOfMeasure: Each
                              amountWithoutTax: 8.71
                              chargeDescription: ""
                              chargeName: Charge
                              chargeNumber: C-00000212
                              processingType: Charge
                              productName: Product
                              productRatePlanChargeId: 2c98901f6706718c016706b91c6e001f
                              serviceEndDate: 2018-12-31
                              serviceStartDate: 2018-12-23
                              subscriptionNumber: A-S00000102
                              taxAmount: 0
                            - additionalInfo:
                                quantity: 2
                                unitOfMeasure: Each
                              amountWithoutTax: 30
                              chargeDescription: ""
                              chargeName: Charge
                              chargeNumber: C-00000212
                              processingType: Charge
                              productName: Product
                              productRatePlanChargeId: 2c98901f6706718c016706b91c6e001f
                              serviceEndDate: 2019-01-31
                              serviceStartDate: 2019-01-01
                              subscriptionNumber: A-S00000102
                              taxAmount: 0
                            - additionalInfo:
                                quantity: 2
                                unitOfMeasure: Each
                              amountWithoutTax: 11.61
                              chargeDescription: ""
                              chargeName: Charge
                              chargeNumber: C-00000211
                              processingType: Charge
                              productName: Product
                              productRatePlanChargeId: 2c98901f6706718c016706b91c6e001f
                              serviceEndDate: 2018-12-12
                              serviceStartDate: 2018-12-01
                              subscriptionNumber: A-S00000101
                              taxAmount: 0
                            - additionalInfo:
                                quantity: 2
                                unitOfMeasure: Each
                              amountWithoutTax: 40
                              chargeDescription: ""
                              chargeName: Charge
                              chargeNumber: C-00000210
                              processingType: Charge
                              productName: Product
                              productRatePlanChargeId: 2c98901f6706718c016706b91c6e001f
                              serviceEndDate: 2018-12-31
                              serviceStartDate: 2018-12-01
                              subscriptionNumber: A-S00000100
                              taxAmount: 0
                            - additionalInfo:
                                quantity: 2
                                unitOfMeasure: Each
                              amountWithoutTax: 40
                              chargeDescription: ""
                              chargeName: Charge
                              chargeNumber: C-00000210
                              processingType: Charge
                              productName: Product
                              productRatePlanChargeId: 2c98901f6706718c016706b91c6e001f
                              serviceEndDate: 2019-01-31
                              serviceStartDate: 2019-01-01
                              subscriptionNumber: A-S00000100
                              taxAmount: 0
                          targetDate: 2019-01-01
                          taxAmount: 0
                      orderDeltaMetrics:
                        orderDeltaMrr:
                          - chargeNumber: C-00000210
                            currency: USD
                            endDate: 2021-01-01
                            grossAmount: 100
                            netAmount: 80
                            orderActionId: 4028818475f8cfd5017608b0a0d303d2
                            orderActionSequence: 0
                            orderActionType: CreateSubscription
                            productRatePlanChargeId: 4028818278829c7b01788313e5d704d4
                            ratePlanChargeId: 4028818475f8cfd5017608b0a2aa03de
                            startDate: 2020-01-01
                            subscriptionNumber: A-S00000100
                        orderDeltaTcb:
                          - chargeNumber: C-00000210
                            currency: USD
                            endDate: 2021-01-01
                            grossAmount: 1200
                            netAmount: 960
                            orderActionId: 4028818475f8cfd5017608b0a0d303d2
                            orderActionSequence: 0
                            orderActionType: CreateSubscription
                            productRatePlanChargeId: 4028818278829c7b01788313e5d704d4
                            ratePlanChargeId: 4028818475f8cfd5017608b0a2aa03de
                            startDate: 2020-01-01
                            subscriptionNumber: A-S00000100
                          - currency: USD
                            endDate: 2020-01-02
                            grossAmount: 565
                            netAmount: 565
                            orderLineItemId: 69ee0828eb844c7e8ae66dbe3ef68dc4
                            productRatePlanChargeId: 4028818475f8cfd5017608b0a2aa03de
                            startDate: 2020-01-01
                        orderDeltaTcv:
                          - chargeNumber: C-00000210
                            currency: USD
                            endDate: 2021-01-01
                            grossAmount: 1200
                            netAmount: 960
                            orderActionId: 4028818475f8cfd5017608b0a0d303d2
                            orderActionSequence: 0
                            orderActionType: CreateSubscription
                            productRatePlanChargeId: 4028818278829c7b01788313e5d704d4
                            ratePlanChargeId: 4028818475f8cfd5017608b0a2aa03de
                            startDate: 2020-01-01
                            subscriptionNumber: A-S00000100
                          - currency: USD
                            endDate: 2020-01-02
                            grossAmount: 565
                            netAmount: 565
                            orderLineItemId: 69ee0828eb844c7e8ae66dbe3ef68dc4
                            productRatePlanChargeId: 4028818475f8cfd5017608b0a2aa03de
                            startDate: 2020-01-01
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PostOrderPreviewResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Preview an order
      tags:
        - Orders
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "customFields": {}, 
                "description": "This is a description for the Order.", 
                "existingAccountNumber": "A00000101", 
                "orderDate": "2018-10-01", 
                "orderLineItems": [
                    {
                        "amountPerUnit": 50, 
                        "billingTrigger": "BillImmediately", 
                        "customFields": {
                            "someField__c": "some string"
                        }, 
                        "deferredRevenueAccountingCode": "Unearned Revenues", 
                        "description": "With Dual Stereo Microphones, HD 1080p, Black", 
                        "itemName": "webcam", 
                        "itemType": "Product", 
                        "listPricePerUnit": 59, 
                        "productCode": "C9201", 
                        "purchaseOrderNumber": "960-000764", 
                        "quantity": 2, 
                        "recognizedRevenueAccountingCode": "Earned Revenues", 
                        "revenueRecognitionRule": "recognized upon invoice", 
                        "taxCode": "8018", 
                        "taxMode": "TaxInclusive", 
                        "transactionDate": "2021-02-01"
                    }
                ], 
                "previewOptions": {
                    "previewThruType": "SpecificDate", 
                    "previewTypes": [
                        "OrderMetrics", 
                        "BillingDocs", 
                        "ChargeMetrics"
                    ], 
                    "specificPreviewThruDate": "2019-01-01"
                }, 
                "subscriptions": [
                    {
                        "orderActions": [
                            {
                                "triggerDates": [
                                    {
                                        "name": "ContractEffective", 
                                        "triggerDate": "2018-12-01"
                                    }, 
                                    {
                                        "name": "ServiceActivation", 
                                        "triggerDate": "2018-12-01"
                                    }, 
                                    {
                                        "name": "CustomerAcceptance", 
                                        "triggerDate": "2018-12-01"
                                    }
                                ], 
                                "type": "UpdateProduct", 
                                "updateProduct": {
                                    "chargeUpdates": [
                                        {
                                            "chargeNumber": "C-00000210", 
                                            "pricing": {
                                                "recurringPerUnit": {
                                                    "listPrice": 20
                                                }
                                            }
                                        }
                                    ], 
                                    "ratePlanId": "2c98919c67a5ae9d0167a68f8eb20262"
                                }
                            }
                        ], 
                        "subscriptionNumber": "A-S00000100"
                    }, 
                    {
                        "orderActions": [
                            {
                                "suspend": {
                                    "suspendPolicy": "Today"
                                }, 
                                "triggerDates": [
                                    {
                                        "name": "ContractEffective", 
                                        "triggerDate": "2018-12-01"
                                    }, 
                                    {
                                        "name": "ServiceActivation", 
                                        "triggerDate": "2018-12-01"
                                    }, 
                                    {
                                        "name": "CustomerAcceptance", 
                                        "triggerDate": "2018-12-01"
                                    }
                                ], 
                                "type": "Suspend"
                            }
                        ], 
                        "subscriptionNumber": "A-S00000101"
                    }, 
                    {
                        "orderActions": [
                            {
                                "resume": {
                                    "extendsTerm": true, 
                                    "resumePeriods": 10, 
                                    "resumePeriodsType": "Day", 
                                    "resumePolicy": "FixedPeriodsFromSuspendDate"
                                }, 
                                "triggerDates": [
                                    {
                                        "name": "ContractEffective", 
                                        "triggerDate": "2018-12-12"
                                    }, 
                                    {
                                        "name": "ServiceActivation", 
                                        "triggerDate": "2018-12-12"
                                    }, 
                                    {
                                        "name": "CustomerAcceptance", 
                                        "triggerDate": "2018-12-12"
                                    }
                                ], 
                                "type": "Resume"
                            }
                        ], 
                        "subscriptionNumber": "A-S00000102"
                    }
                ]
            }' "https://rest.zuora.com/v1/orders/preview"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/orders/preview');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "customFields": {}, 
                "description": "This is a description for the Order.", 
                "existingAccountNumber": "A00000101", 
                "orderDate": "2018-10-01", 
                "orderLineItems": [
                    {
                        "amountPerUnit": 50, 
                        "billingTrigger": "BillImmediately", 
                        "customFields": {
                            "someField__c": "some string"
                        }, 
                        "deferredRevenueAccountingCode": "Unearned Revenues", 
                        "description": "With Dual Stereo Microphones, HD 1080p, Black", 
                        "itemName": "webcam", 
                        "itemType": "Product", 
                        "listPricePerUnit": 59, 
                        "productCode": "C9201", 
                        "purchaseOrderNumber": "960-000764", 
                        "quantity": 2, 
                        "recognizedRevenueAccountingCode": "Earned Revenues", 
                        "revenueRecognitionRule": "recognized upon invoice", 
                        "taxCode": "8018", 
                        "taxMode": "TaxInclusive", 
                        "transactionDate": "2021-02-01"
                    }
                ], 
                "previewOptions": {
                    "previewThruType": "SpecificDate", 
                    "previewTypes": [
                        "OrderMetrics", 
                        "BillingDocs", 
                        "ChargeMetrics"
                    ], 
                    "specificPreviewThruDate": "2019-01-01"
                }, 
                "subscriptions": [
                    {
                        "orderActions": [
                            {
                                "triggerDates": [
                                    {
                                        "name": "ContractEffective", 
                                        "triggerDate": "2018-12-01"
                                    }, 
                                    {
                                        "name": "ServiceActivation", 
                                        "triggerDate": "2018-12-01"
                                    }, 
                                    {
                                        "name": "CustomerAcceptance", 
                                        "triggerDate": "2018-12-01"
                                    }
                                ], 
                                "type": "UpdateProduct", 
                                "updateProduct": {
                                    "chargeUpdates": [
                                        {
                                            "chargeNumber": "C-00000210", 
                                            "pricing": {
                                                "recurringPerUnit": {
                                                    "listPrice": 20
                                                }
                                            }
                                        }
                                    ], 
                                    "ratePlanId": "2c98919c67a5ae9d0167a68f8eb20262"
                                }
                            }
                        ], 
                        "subscriptionNumber": "A-S00000100"
                    }, 
                    {
                        "orderActions": [
                            {
                                "suspend": {
                                    "suspendPolicy": "Today"
                                }, 
                                "triggerDates": [
                                    {
                                        "name": "ContractEffective", 
                                        "triggerDate": "2018-12-01"
                                    }, 
                                    {
                                        "name": "ServiceActivation", 
                                        "triggerDate": "2018-12-01"
                                    }, 
                                    {
                                        "name": "CustomerAcceptance", 
                                        "triggerDate": "2018-12-01"
                                    }
                                ], 
                                "type": "Suspend"
                            }
                        ], 
                        "subscriptionNumber": "A-S00000101"
                    }, 
                    {
                        "orderActions": [
                            {
                                "resume": {
                                    "extendsTerm": true, 
                                    "resumePeriods": 10, 
                                    "resumePeriodsType": "Day", 
                                    "resumePolicy": "FixedPeriodsFromSuspendDate"
                                }, 
                                "triggerDates": [
                                    {
                                        "name": "ContractEffective", 
                                        "triggerDate": "2018-12-12"
                                    }, 
                                    {
                                        "name": "ServiceActivation", 
                                        "triggerDate": "2018-12-12"
                                    }, 
                                    {
                                        "name": "CustomerAcceptance", 
                                        "triggerDate": "2018-12-12"
                                    }
                                ], 
                                "type": "Resume"
                            }
                        ], 
                        "subscriptionNumber": "A-S00000102"
                    }
                ]
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"customFields\": {}, \n    \"description\": \"This is a description for the Order.\", \n    \"existingAccountNumber\": \"A00000101\", \n    \"orderDate\": \"2018-10-01\", \n    \"orderLineItems\": [\n        {\n            \"amountPerUnit\": 50, \n            \"billingTrigger\": \"BillImmediately\", \n            \"customFields\": {\n                \"someField__c\": \"some string\"\n            }, \n            \"deferredRevenueAccountingCode\": \"Unearned Revenues\", \n            \"description\": \"With Dual Stereo Microphones, HD 1080p, Black\", \n            \"itemName\": \"webcam\", \n            \"itemType\": \"Product\", \n            \"listPricePerUnit\": 59, \n            \"productCode\": \"C9201\", \n            \"purchaseOrderNumber\": \"960-000764\", \n            \"quantity\": 2, \n            \"recognizedRevenueAccountingCode\": \"Earned Revenues\", \n            \"revenueRecognitionRule\": \"recognized upon invoice\", \n            \"taxCode\": \"8018\", \n            \"taxMode\": \"TaxInclusive\", \n            \"transactionDate\": \"2021-02-01\"\n        }\n    ], \n    \"previewOptions\": {\n        \"previewThruType\": \"SpecificDate\", \n        \"previewTypes\": [\n            \"OrderMetrics\", \n            \"BillingDocs\", \n            \"ChargeMetrics\"\n        ], \n        \"specificPreviewThruDate\": \"2019-01-01\"\n    }, \n    \"subscriptions\": [\n        {\n            \"orderActions\": [\n                {\n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }, \n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }\n                    ], \n                    \"type\": \"UpdateProduct\", \n                    \"updateProduct\": {\n                        \"chargeUpdates\": [\n                            {\n                                \"chargeNumber\": \"C-00000210\", \n                                \"pricing\": {\n                                    \"recurringPerUnit\": {\n                                        \"listPrice\": 20\n                                    }\n                                }\n                            }\n                        ], \n                        \"ratePlanId\": \"2c98919c67a5ae9d0167a68f8eb20262\"\n                    }\n                }\n            ], \n            \"subscriptionNumber\": \"A-S00000100\"\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"suspend\": {\n                        \"suspendPolicy\": \"Today\"\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }, \n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }\n                    ], \n                    \"type\": \"Suspend\"\n                }\n            ], \n            \"subscriptionNumber\": \"A-S00000101\"\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"resume\": {\n                        \"extendsTerm\": true, \n                        \"resumePeriods\": 10, \n                        \"resumePeriodsType\": \"Day\", \n                        \"resumePolicy\": \"FixedPeriodsFromSuspendDate\"\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2018-12-12\"\n                        }, \n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2018-12-12\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2018-12-12\"\n                        }\n                    ], \n                    \"type\": \"Resume\"\n                }\n            ], \n            \"subscriptionNumber\": \"A-S00000102\"\n        }\n    ]\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/orders/preview")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"customFields\": {}, \n    \"description\": \"This is a description for the Order.\", \n    \"existingAccountNumber\": \"A00000101\", \n    \"orderDate\": \"2018-10-01\", \n    \"orderLineItems\": [\n        {\n            \"amountPerUnit\": 50, \n            \"billingTrigger\": \"BillImmediately\", \n            \"customFields\": {\n                \"someField__c\": \"some string\"\n            }, \n            \"deferredRevenueAccountingCode\": \"Unearned Revenues\", \n            \"description\": \"With Dual Stereo Microphones, HD 1080p, Black\", \n            \"itemName\": \"webcam\", \n            \"itemType\": \"Product\", \n            \"listPricePerUnit\": 59, \n            \"productCode\": \"C9201\", \n            \"purchaseOrderNumber\": \"960-000764\", \n            \"quantity\": 2, \n            \"recognizedRevenueAccountingCode\": \"Earned Revenues\", \n            \"revenueRecognitionRule\": \"recognized upon invoice\", \n            \"taxCode\": \"8018\", \n            \"taxMode\": \"TaxInclusive\", \n            \"transactionDate\": \"2021-02-01\"\n        }\n    ], \n    \"previewOptions\": {\n        \"previewThruType\": \"SpecificDate\", \n        \"previewTypes\": [\n            \"OrderMetrics\", \n            \"BillingDocs\", \n            \"ChargeMetrics\"\n        ], \n        \"specificPreviewThruDate\": \"2019-01-01\"\n    }, \n    \"subscriptions\": [\n        {\n            \"orderActions\": [\n                {\n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }, \n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }\n                    ], \n                    \"type\": \"UpdateProduct\", \n                    \"updateProduct\": {\n                        \"chargeUpdates\": [\n                            {\n                                \"chargeNumber\": \"C-00000210\", \n                                \"pricing\": {\n                                    \"recurringPerUnit\": {\n                                        \"listPrice\": 20\n                                    }\n                                }\n                            }\n                        ], \n                        \"ratePlanId\": \"2c98919c67a5ae9d0167a68f8eb20262\"\n                    }\n                }\n            ], \n            \"subscriptionNumber\": \"A-S00000100\"\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"suspend\": {\n                        \"suspendPolicy\": \"Today\"\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }, \n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }\n                    ], \n                    \"type\": \"Suspend\"\n                }\n            ], \n            \"subscriptionNumber\": \"A-S00000101\"\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"resume\": {\n                        \"extendsTerm\": true, \n                        \"resumePeriods\": 10, \n                        \"resumePeriodsType\": \"Day\", \n                        \"resumePolicy\": \"FixedPeriodsFromSuspendDate\"\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2018-12-12\"\n                        }, \n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2018-12-12\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2018-12-12\"\n                        }\n                    ], \n                    \"type\": \"Resume\"\n                }\n            ], \n            \"subscriptionNumber\": \"A-S00000102\"\n        }\n    ]\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/orders/preview", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/orders/preview")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"customFields\": {}, \n    \"description\": \"This is a description for the Order.\", \n    \"existingAccountNumber\": \"A00000101\", \n    \"orderDate\": \"2018-10-01\", \n    \"orderLineItems\": [\n        {\n            \"amountPerUnit\": 50, \n            \"billingTrigger\": \"BillImmediately\", \n            \"customFields\": {\n                \"someField__c\": \"some string\"\n            }, \n            \"deferredRevenueAccountingCode\": \"Unearned Revenues\", \n            \"description\": \"With Dual Stereo Microphones, HD 1080p, Black\", \n            \"itemName\": \"webcam\", \n            \"itemType\": \"Product\", \n            \"listPricePerUnit\": 59, \n            \"productCode\": \"C9201\", \n            \"purchaseOrderNumber\": \"960-000764\", \n            \"quantity\": 2, \n            \"recognizedRevenueAccountingCode\": \"Earned Revenues\", \n            \"revenueRecognitionRule\": \"recognized upon invoice\", \n            \"taxCode\": \"8018\", \n            \"taxMode\": \"TaxInclusive\", \n            \"transactionDate\": \"2021-02-01\"\n        }\n    ], \n    \"previewOptions\": {\n        \"previewThruType\": \"SpecificDate\", \n        \"previewTypes\": [\n            \"OrderMetrics\", \n            \"BillingDocs\", \n            \"ChargeMetrics\"\n        ], \n        \"specificPreviewThruDate\": \"2019-01-01\"\n    }, \n    \"subscriptions\": [\n        {\n            \"orderActions\": [\n                {\n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }, \n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }\n                    ], \n                    \"type\": \"UpdateProduct\", \n                    \"updateProduct\": {\n                        \"chargeUpdates\": [\n                            {\n                                \"chargeNumber\": \"C-00000210\", \n                                \"pricing\": {\n                                    \"recurringPerUnit\": {\n                                        \"listPrice\": 20\n                                    }\n                                }\n                            }\n                        ], \n                        \"ratePlanId\": \"2c98919c67a5ae9d0167a68f8eb20262\"\n                    }\n                }\n            ], \n            \"subscriptionNumber\": \"A-S00000100\"\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"suspend\": {\n                        \"suspendPolicy\": \"Today\"\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }, \n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }\n                    ], \n                    \"type\": \"Suspend\"\n                }\n            ], \n            \"subscriptionNumber\": \"A-S00000101\"\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"resume\": {\n                        \"extendsTerm\": true, \n                        \"resumePeriods\": 10, \n                        \"resumePeriodsType\": \"Day\", \n                        \"resumePolicy\": \"FixedPeriodsFromSuspendDate\"\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2018-12-12\"\n                        }, \n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2018-12-12\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2018-12-12\"\n                        }\n                    ], \n                    \"type\": \"Resume\"\n                }\n            ], \n            \"subscriptionNumber\": \"A-S00000102\"\n        }\n    ]\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/orders/preview");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"customFields\": {}, \n    \"description\": \"This is a description for the Order.\", \n    \"existingAccountNumber\": \"A00000101\", \n    \"orderDate\": \"2018-10-01\", \n    \"orderLineItems\": [\n        {\n            \"amountPerUnit\": 50, \n            \"billingTrigger\": \"BillImmediately\", \n            \"customFields\": {\n                \"someField__c\": \"some string\"\n            }, \n            \"deferredRevenueAccountingCode\": \"Unearned Revenues\", \n            \"description\": \"With Dual Stereo Microphones, HD 1080p, Black\", \n            \"itemName\": \"webcam\", \n            \"itemType\": \"Product\", \n            \"listPricePerUnit\": 59, \n            \"productCode\": \"C9201\", \n            \"purchaseOrderNumber\": \"960-000764\", \n            \"quantity\": 2, \n            \"recognizedRevenueAccountingCode\": \"Earned Revenues\", \n            \"revenueRecognitionRule\": \"recognized upon invoice\", \n            \"taxCode\": \"8018\", \n            \"taxMode\": \"TaxInclusive\", \n            \"transactionDate\": \"2021-02-01\"\n        }\n    ], \n    \"previewOptions\": {\n        \"previewThruType\": \"SpecificDate\", \n        \"previewTypes\": [\n            \"OrderMetrics\", \n            \"BillingDocs\", \n            \"ChargeMetrics\"\n        ], \n        \"specificPreviewThruDate\": \"2019-01-01\"\n    }, \n    \"subscriptions\": [\n        {\n            \"orderActions\": [\n                {\n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }, \n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }\n                    ], \n                    \"type\": \"UpdateProduct\", \n                    \"updateProduct\": {\n                        \"chargeUpdates\": [\n                            {\n                                \"chargeNumber\": \"C-00000210\", \n                                \"pricing\": {\n                                    \"recurringPerUnit\": {\n                                        \"listPrice\": 20\n                                    }\n                                }\n                            }\n                        ], \n                        \"ratePlanId\": \"2c98919c67a5ae9d0167a68f8eb20262\"\n                    }\n                }\n            ], \n            \"subscriptionNumber\": \"A-S00000100\"\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"suspend\": {\n                        \"suspendPolicy\": \"Today\"\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }, \n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2018-12-01\"\n                        }\n                    ], \n                    \"type\": \"Suspend\"\n                }\n            ], \n            \"subscriptionNumber\": \"A-S00000101\"\n        }, \n        {\n            \"orderActions\": [\n                {\n                    \"resume\": {\n                        \"extendsTerm\": true, \n                        \"resumePeriods\": 10, \n                        \"resumePeriodsType\": \"Day\", \n                        \"resumePolicy\": \"FixedPeriodsFromSuspendDate\"\n                    }, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"ContractEffective\", \n                            \"triggerDate\": \"2018-12-12\"\n                        }, \n                        {\n                            \"name\": \"ServiceActivation\", \n                            \"triggerDate\": \"2018-12-12\"\n                        }, \n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2018-12-12\"\n                        }\n                    ], \n                    \"type\": \"Resume\"\n                }\n            ], \n            \"subscriptionNumber\": \"A-S00000102\"\n        }\n    ]\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/orders/subscription/{subscriptionNumber}":
    get:
      description: |
        **Note:** This feature is only available if you have the [Order Metrics](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AA_Overview_of_Orders#Order_Metrics) feature enabled. As of Zuora Billing Release 284, Orders is generally available and the Order Metrics feature is no longer available as a standalone feature. If you are an existing Subscribe and Amend customer and want Order Metrics only, you must turn on [Orders Harmonization](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Orders_Harmonization/Orders_Harmonization). You can still keep the existing Subscribe and Amend API integrations to create and manage subscriptions.

        **Note:** The [Order Line Items](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Line_Items/AA_Overview_of_Order_Line_Items) feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. If you want to join this early adopter program, submit a request at [Zuora Global Support](https://support.zuora.com/).

        Retrieves the detailed information about all orders for a specified subscription. Any orders containing the changes on the specified subscription are returned.
      operationId: GET_OrdersBySubscriptionNumber
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: The subscription number.
          in: path
          name: subscriptionNumber
          required: true
          schema:
            type: string
        - description: |
            The page number of the orders retrieved. The default is '1'.
          in: query
          name: page
          required: false
          schema:
            type: integer
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - description: |
            The date type to filter on. This field value can be 'orderDate' or 'updatedDate'. Default is orderDate.
          in: query
          name: dateFilterOption
          required: false
          schema:
            type: string
        - description: |
            The result will only contain the orders with the date of 'dateFilterOption' later than or equal to this date.
          in: query
          name: startDate
          required: false
          schema:
            format: date
            type: string
        - description: |
            The result will only contain the orders with the date of 'dateFilterOption' earlier than or equal to this date.
          in: query
          name: endDate
          required: false
          schema:
            format: date
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    orders:
                      - createdBy: 2c989028622282520162235ab0f603ba
                        createdDate: 2018-03-14 15:12:58
                        currency: USD
                        customFields:
                          order_cf_date__c: 2017-01-01
                        description: This is a description for the Order.
                        existingAccountNumber: accountA_Num
                        orderDate: 2017-03-01
                        orderNumber: O-00000002
                        status: Completed
                        subscriptions:
                          - baseVersion: 1
                            customFields:
                              sub_cf_picklist__c: null
                            newVersion: 2
                            orderActions:
                              - customFields:
                                  oa_cf_text__c: null
                                sequence: 0
                                triggerDates:
                                  - name: ContractEffective
                                    triggerDate: 2017-03-01
                                  - name: ServiceActivation
                                    triggerDate: 2017-03-01
                                  - name: CustomerAcceptance
                                    triggerDate: 2017-03-01
                                type: UpdateProduct
                                updateProduct:
                                  chargeUpdates:
                                    - billing:
                                        billingPeriodAlignment: null
                                      chargeNumber: C-00000001
                                      customFields:
                                        srpc_cf_picklist__c: null
                                      description: null
                                      effectiveDate:
                                        specificTriggerDate: null
                                      newRatePlanChargeId: 2c989028622282520162235adabc0651
                                      pricing:
                                        recurringVolume:
                                          priceChangeOption: null
                                          priceIncreasePercentage: null
                                          quantity: 7
                                          tiers: []
                                      uniqueToken: null
                                  customFields: {}
                                  newRatePlanId: 2c989028622282520162235ada870649
                                  ratePlanId: 2c989028622282520162235acd1b05d2
                                  specificUpdateDate: null
                                  uniqueToken: null
                            subscriptionNumber: A-S00000001
                        updatedBy: 2c989028622282520162235ab0f603ba
                        updatedDate: 2018-03-14 15:12:58
                      - createdBy: 2c989028622282520162235ab0f603ba
                        createdDate: 2018-03-14 15:12:55
                        currency: USD
                        customFields:
                          order_cf_date__c: 2017-01-01
                        existingAccountNumber: accountA_Num
                        orderDate: 2017-01-01
                        orderNumber: O-00000001
                        status: Completed
                        subscriptions:
                          - baseVersion: null
                            customFields:
                              sub_cf_picklist__c: sub123
                            newVersion: 1
                            orderActions:
                              - createSubscription:
                                  invoiceSeparately: null
                                  notes: null
                                  subscribeToRatePlans:
                                    - chargeOverrides:
                                        - billing:
                                            billCycleDay: null
                                            billCycleType: null
                                            billingPeriod: null
                                            billingPeriodAlignment: null
                                            billingTiming: null
                                            specificBillingPeriod: null
                                            weeklyBillCycleDay: null
                                          chargeNumber: C-00000001
                                          customFields:
                                            srpc_cf_picklist__c: null
                                          description: null
                                          endDate:
                                            endDateCondition: null
                                            specificEndDate: null
                                            upToPeriods: null
                                            upToPeriodsType: null
                                          pricing:
                                            recurringVolume:
                                              listPriceBase: Per_Billing_Period
                                              priceChangeOption: null
                                              priceIncreasePercentage: null
                                              quantity: 12
                                              tiers: []
                                          productRateplanChargeId: 2c989028622282520162235aca7a05b9
                                          startDate:
                                            specificTriggerDate: null
                                          uniqueToken: null
                                      customFields: {}
                                      newRatePlanId: 2c989028622282520162235acd1b05d2
                                      productRatePlanId: 2c989028622282520162235ac91605b3
                                      uniqueToken: null
                                  subscriptionOwnerAccountNumber: accountA_Num
                                  terms:
                                    autoRenew: false
                                    initialTerm:
                                      period: 12
                                      periodType: Month
                                      startDate: 2017-01-01
                                      termType: TERMED
                                    renewalSetting: RENEW_WITH_SPECIFIC_TERM
                                    renewalTerms:
                                      - period: 0
                                        periodType: Month
                                customFields:
                                  oa_cf_text__c: oa cf test
                                sequence: 0
                                triggerDates:
                                  - name: ContractEffective
                                    triggerDate: 2017-01-01
                                  - name: ServiceActivation
                                    triggerDate: 2017-01-01
                                  - name: CustomerAcceptance
                                    triggerDate: 2017-01-01
                                type: CreateSubscription
                            subscriptionNumber: A-S00000001
                        updatedBy: 2c989028622282520162235ab0f603ba
                        updatedDate: 2018-03-14 15:12:55
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GetOrdersResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List orders by subscription number
      tags:
        - Orders
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/orders/subscription/{subscriptionNumber}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/orders/subscription/{subscriptionNumber}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/orders/subscription/{subscriptionNumber}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/orders/subscription/{subscriptionNumber}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/orders/subscription/{subscriptionNumber}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/orders/subscription/{subscriptionNumber}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/orders/subscriptionOwner/{accountNumber}":
    get:
      description: |
        **Note:** This feature is only available if you have the [Order Metrics](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AA_Overview_of_Orders#Order_Metrics) feature enabled. As of Zuora Billing Release 284, Orders is generally available and the Order Metrics feature is no longer available as a standalone feature. If you are an existing Subscribe and Amend customer and want Order Metrics only, you must turn on [Orders Harmonization](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Orders_Harmonization/Orders_Harmonization). You can still keep the existing Subscribe and Amend API integrations to create and manage subscriptions.

        **Note:** The [Order Line Items](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Line_Items/AA_Overview_of_Order_Line_Items) feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. If you want to join this early adopter program, submit a request at [Zuora Global Support](https://support.zuora.com/).

        Retrieves the detailed information about all orders for a specified subscription owner. Any orders containing the changes on the subscriptions owned by this account are returned.
      operationId: GET_OrdersBySubscriptionOwner
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: The subscription owner account number.
          in: path
          name: accountNumber
          required: true
          schema:
            format: string
            type: string
        - description: |
            The page number of the orders retrieved. The default is 1.
          in: query
          name: page
          required: false
          schema:
            type: integer
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - description: |
            The date type to filter on.
            This field value can be 'orderDate' or 'updatedDate'. Default is orderDate.
          in: query
          name: dateFilterOption
          required: false
          schema:
            type: string
        - description: |
            The result will only contain the orders with the date of 'dateFilterOption' later than or equal to this date.
          in: query
          name: startDate
          required: false
          schema:
            format: date
            type: string
        - description: |
            The result will only contain the orders with the date of 'dateFilterOption' earlier than or equal to this date.
          in: query
          name: endDate
          required: false
          schema:
            format: date
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    orders:
                      - createdBy: 2c989028622282520162235ab0f603ba
                        createdDate: 2018-03-14 15:12:58
                        currency: USD
                        customFields:
                          order_cf_date__c: 2017-01-01
                        description: This is a description for the Order.
                        existingAccountNumber: accountA_Num
                        orderDate: 2017-03-01
                        orderNumber: O-00000002
                        status: Completed
                        subscriptions:
                          - baseVersion: 1
                            customFields:
                              sub_cf_picklist__c: null
                            newVersion: 2
                            orderActions:
                              - customFields:
                                  oa_cf_text__c: null
                                sequence: 0
                                triggerDates:
                                  - name: ContractEffective
                                    triggerDate: 2017-03-01
                                  - name: ServiceActivation
                                    triggerDate: 2017-03-01
                                  - name: CustomerAcceptance
                                    triggerDate: 2017-03-01
                                type: UpdateProduct
                                updateProduct:
                                  chargeUpdates:
                                    - billing:
                                        billingPeriodAlignment: null
                                      chargeNumber: C-00000001
                                      customFields:
                                        srpc_cf_picklist__c: null
                                      description: null
                                      effectiveDate:
                                        specificTriggerDate: null
                                      newRatePlanChargeId: 2c989028622282520162235adabc0651
                                      pricing:
                                        recurringVolume:
                                          priceChangeOption: null
                                          priceIncreasePercentage: null
                                          quantity: 7
                                          tiers: []
                                      uniqueToken: null
                                  customFields: {}
                                  newRatePlanId: 2c989028622282520162235ada870649
                                  ratePlanId: 2c989028622282520162235acd1b05d2
                                  specificUpdateDate: null
                                  uniqueToken: null
                            subscriptionNumber: A-S00000001
                        updatedBy: 2c989028622282520162235ab0f603ba
                        updatedDate: 2018-03-14 15:12:58
                      - createdBy: 2c989028622282520162235ab0f603ba
                        createdDate: 2018-03-14 15:12:55
                        currency: USD
                        customFields:
                          order_cf_date__c: 2017-01-01
                        existingAccountNumber: accountA_Num
                        orderDate: 2017-01-01
                        orderNumber: O-00000001
                        status: Completed
                        subscriptions:
                          - baseVersion: null
                            customFields:
                              sub_cf_picklist__c: sub123
                            newVersion: 1
                            orderActions:
                              - createSubscription:
                                  invoiceSeparately: null
                                  notes: null
                                  subscribeToRatePlans:
                                    - chargeOverrides:
                                        - billing:
                                            billCycleDay: null
                                            billCycleType: null
                                            billingPeriod: null
                                            billingPeriodAlignment: null
                                            billingTiming: null
                                            specificBillingPeriod: null
                                            weeklyBillCycleDay: null
                                          chargeNumber: C-00000001
                                          customFields:
                                            srpc_cf_picklist__c: null
                                          description: null
                                          endDate:
                                            endDateCondition: null
                                            specificEndDate: null
                                            upToPeriods: null
                                            upToPeriodsType: null
                                          pricing:
                                            recurringVolume:
                                              listPriceBase: Per_Billing_Period
                                              priceChangeOption: null
                                              priceIncreasePercentage: null
                                              quantity: 12
                                              tiers: []
                                          productRateplanChargeId: 2c989028622282520162235aca7a05b9
                                          startDate:
                                            specificTriggerDate: null
                                          uniqueToken: null
                                      customFields: {}
                                      newRatePlanId: 2c989028622282520162235acd1b05d2
                                      productRatePlanId: 2c989028622282520162235ac91605b3
                                      uniqueToken: null
                                  subscriptionOwnerAccountNumber: accountA_Num
                                  terms:
                                    autoRenew: false
                                    initialTerm:
                                      period: 12
                                      periodType: Month
                                      startDate: 2017-01-01
                                      termType: TERMED
                                    renewalSetting: RENEW_WITH_SPECIFIC_TERM
                                    renewalTerms:
                                      - period: 0
                                        periodType: Month
                                customFields:
                                  oa_cf_text__c: oa cf test
                                sequence: 0
                                triggerDates:
                                  - name: ContractEffective
                                    triggerDate: 2017-01-01
                                  - name: ServiceActivation
                                    triggerDate: 2017-01-01
                                  - name: CustomerAcceptance
                                    triggerDate: 2017-01-01
                                type: CreateSubscription
                            subscriptionNumber: A-S00000001
                        updatedBy: 2c989028622282520162235ab0f603ba
                        updatedDate: 2018-03-14 15:12:55
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GetOrdersResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List orders of a subscription owner
      tags:
        - Orders
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/orders/subscriptionOwner/{accountNumber}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/orders/subscriptionOwner/{accountNumber}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/orders/subscriptionOwner/{accountNumber}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/orders/subscriptionOwner/{accountNumber}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/orders/subscriptionOwner/{accountNumber}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/orders/subscriptionOwner/{accountNumber}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/orders/term/{subscriptionNumber}":
    get:
      description: |
        **Note:** This feature is only available if you have the [Order Metrics](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AA_Overview_of_Orders#Order_Metrics) feature enabled. As of Zuora Billing Release 284, Orders is generally available and the Order Metrics feature is no longer available as a standalone feature. If you are an existing Subscribe and Amend customer and want Order Metrics only, you must turn on [Orders Harmonization](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Orders_Harmonization/Orders_Harmonization). You can still keep the existing Subscribe and Amend API integrations to create and manage subscriptions.

        Retrieves the terms of the specified subscription.
      operationId: GET_SubscriptionTermInfo
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The number of the subscription to retrieve terms for. For example, A-S00000001.
          in: path
          name: subscriptionNumber
          required: true
          schema:
            type: string
        - description: |
            The version of the subscription to retrieve terms for. If you do not specify this parameter, Zuora returns the terms for the latest version of the subscription.
          in: query
          name: version
          required: false
          schema:
            type: integer
        - description: |
            The page number of the terms retrieved.
          in: query
          name: page
          required: false
          schema:
            default: 1
            type: integer
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    nextPage: https://rest.zuora.com/v1/orders/term/A-S00000001?page=2
                    success: true
                    terms:
                      - endDate: 2017-12-01
                        isEvergreen: false
                        startDate: 2017-11-01
                        termNumber: 1
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GetSubscriptionTermInfoResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List subscription terms
      tags:
        - Orders
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/orders/term/{subscriptionNumber}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/orders/term/{subscriptionNumber}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/orders/term/{subscriptionNumber}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/orders/term/{subscriptionNumber}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/orders/term/{subscriptionNumber}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/orders/term/{subscriptionNumber}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/orders/{orderNumber}":
    delete:
      description: |
        **Note:** This operation is only available if you have the [Orders](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AA_Overview_of_Orders#Orders) feature enabled. Orders is now generally available as of Zuora Billing Release 284 (August 2020). If you are an existing Zuora Subscribe and Amend customer and want to adopt Orders, see [What is Orders Harmonization](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Orders_Harmonization/Orders_Harmonization#What_is_Orders_Harmonization.3F) and join the [Orders Harmonization community group](https://community.zuora.com/t5/Orders-Harmonization/gp-p/Orders-Harmonization) for more information. If you want to enable Orders, submit a request at [Zuora Global Support](https://support.zuora.com/).

        **Note:** The [Order Line Items](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Line_Items/AA_Overview_of_Order_Line_Items) feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. If you want to join this early adopter program, submit a request at [Zuora Global Support](https://support.zuora.com/).
               
        Deletes a specified order. 

        * All the subscriptions changed by this order are deleted. After the deletion, the subscriptions are rolled back to the previous version. 

        * All the order line items created in this order are deleted.

        You are not allowed to delete an order if the charges that are affected by this order are invoiced.
      operationId: DELETE_Order
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: The number of the order to be deleted.
          in: path
          name: orderNumber
          required: true
          schema:
            format: string
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Delete an order
      tags:
        - Orders
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/orders/{orderNumber}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/orders/{orderNumber}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/orders/{orderNumber}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/v1/orders/{orderNumber}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/orders/{orderNumber}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/orders/{orderNumber}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      description: |
        **Note:** This feature is only available if you have the [Order Metrics](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AA_Overview_of_Orders#Order_Metrics) feature enabled. As of Zuora Billing Release 284, Orders is generally available and the Order Metrics feature is no longer available as a standalone feature. If you are an existing Subscribe and Amend customer and want Order Metrics only, you must turn on [Orders Harmonization](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Orders_Harmonization/Orders_Harmonization). You can still keep the existing Subscribe and Amend API integrations to create and manage subscriptions.

        **Note:** The [Order Line Items](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Line_Items/AA_Overview_of_Order_Line_Items) feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. If you want to join this early adopter program, submit a request at [Zuora Global Support](https://support.zuora.com/).
                
        Retrieves the detailed information about a specified order.
      operationId: GET_Order
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: The order number to be retrieved.
          in: path
          name: orderNumber
          required: true
          schema:
            format: string
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    order:
                      createdBy: 402881e522cf4f9b0122cf5d82860002
                      createdDate: 2018-12-13 17:21:43
                      currency: USD
                      customFields: {}
                      description: This is a description for the Order.
                      existingAccountNumber: A00000101
                      orderDate: 2018-10-01
                      orderLineItems:
                        - UOM: null
                          accountingCode: null
                          amount: 10000
                          amountPerUnit: 5000
                          billTargetDate: null
                          customFields:
                            orderLineItemCF__c: olinumber-023
                          description: With Dual Stereo Microphones, HD 1080p, Black,USB connectivity for ease of use.
                          id: 4028fc827a0e48c1017a0e4dccc60002
                          itemName: webcam
                          itemNumber: "1"
                          itemState: Executing
                          itemType: Product
                          listPricePerUnit: 59
                          orderId: 4028fc827a0e48c1017a0e58b9330014
                          productCode: C9201
                          productRatePlanChargeId: null
                          purchaseOrderNumber: 960-000764
                          quantity: 2
                          soldTo: null
                          soldToData:
                            address1: "2841 Junction Ave., Suite #201"
                            address2: ""
                            city: San Jose
                            country: United States
                            county: null
                            firstName: Jasmine
                            lastName: Fu
                            postalCode: "95134"
                            state: California
                          transactionDate: 2021-02-01
                      orderNumber: O-00000282
                      status: Completed
                      subscriptions:
                        - baseVersion: 1
                          customFields: {}
                          newVersion: 2
                          orderActions:
                            - customFields: {}
                              sequence: 0
                              triggerDates:
                                - name: ContractEffective
                                  triggerDate: 2018-12-01
                                - name: ServiceActivation
                                  triggerDate: 2018-12-01
                                - name: CustomerAcceptance
                                  triggerDate: 2018-12-01
                              type: UpdateProduct
                              updateProduct:
                                chargeUpdates:
                                  - billing:
                                      billingPeriodAlignment: null
                                    chargeNumber: C-00000210
                                    customFields: {}
                                    description: null
                                    effectiveDate:
                                      specificTriggerDate: null
                                    newRatePlanChargeId: 2c98919c67a5ae9d0167a6df304b0372
                                    pricing:
                                      recurringPerUnit:
                                        listPrice: 20
                                        priceChangeOption: null
                                        priceIncreasePercentage: null
                                        quantity: null
                                    uniqueToken: null
                                customFields: {}
                                newRatePlanId: 2c98919c67a5ae9d0167a6df3011036e
                                ratePlanId: 2c98919c67a5ae9d0167a68f8eb20262
                                specificUpdateDate: null
                                uniqueToken: null
                          subscriptionNumber: A-S00000100
                        - baseVersion: 1
                          customFields: {}
                          newVersion: 2
                          orderActions:
                            - customFields: {}
                              sequence: 0
                              suspend:
                                suspendDate: 2018-12-13
                                suspendPeriods: null
                                suspendPeriodsType: null
                                suspendPolicy: Today
                                suspendSpecificDate: null
                              triggerDates:
                                - name: ContractEffective
                                  triggerDate: 2018-12-01
                                - name: ServiceActivation
                                  triggerDate: 2018-12-01
                                - name: CustomerAcceptance
                                  triggerDate: 2018-12-01
                              type: Suspend
                          subscriptionNumber: A-S00000101
                        - baseVersion: 2
                          customFields: {}
                          newVersion: 3
                          orderActions:
                            - customFields: {}
                              resume:
                                extendsTerm: true
                                resumeDate: 2018-12-23
                                resumePeriods: 10
                                resumePeriodsType: Day
                                resumePolicy: FixedPeriodsFromSuspendDate
                                resumeSpecificDate: null
                              sequence: 0
                              triggerDates:
                                - name: ContractEffective
                                  triggerDate: 2018-12-12
                                - name: ServiceActivation
                                  triggerDate: 2018-12-12
                                - name: CustomerAcceptance
                                  triggerDate: 2018-12-12
                              type: Resume
                            - customFields: {}
                              sequence: 1
                              termsAndConditions:
                                autoRenew: null
                                initialTerm:
                                  period: 375
                                  periodType: Day
                                  startDate: null
                                  termType: null
                                renewalSetting: null
                                renewalTerms:
                                  - period: null
                                    periodType: null
                              triggerDates:
                                - name: ContractEffective
                                  triggerDate: 2018-12-12
                                - name: ServiceActivation
                                  triggerDate: 2018-12-12
                                - name: CustomerAcceptance
                                  triggerDate: 2018-12-12
                              type: TermsAndConditions
                          subscriptionNumber: A-S00000102
                      updatedBy: 402881e522cf4f9b0122cf5d82860002
                      updatedDate: 2018-12-13 17:21:45
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GetOrderResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve an order
      tags:
        - Orders
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/orders/{orderNumber}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/orders/{orderNumber}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/orders/{orderNumber}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/orders/{orderNumber}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/orders/{orderNumber}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/orders/{orderNumber}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/orders/{orderNumber}/customFields":
    put:
      description: |
        **Note:** This feature is only available if you have the [Order Metrics](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AA_Overview_of_Orders#Order_Metrics) feature enabled. As of Zuora Billing Release 284, Orders is generally available and the Order Metrics feature is no longer available as a standalone feature. If you are an existing Subscribe and Amend customer and want Order Metrics only, you must turn on [Orders Harmonization](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Orders_Harmonization/Orders_Harmonization). You can still keep the existing Subscribe and Amend API integrations to create and manage subscriptions.

        **Note:** To update the custom fields of an order line item, you must use the "Update an order line item" or "Update order line items" operation.

        Updates the custom fields of a specified order.
      operationId: PUT_UpdateOrderCustomFields
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: The order number.
          in: path
          name: orderNumber
          required: true
          schema:
            format: string
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTOrderPatchRequestType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Update order custom fields
      tags:
        - Orders
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "customFields": {
                    "order_cf__c": "order custom fields"
                }, 
                "subscriptions": [
                    {
                        "orderActions": [
                            {
                                "customFields": {
                                    "order_action_cf__c": "Order action custom fields", 
                                    "order_action_undex__c": "Order action custom fields"
                                }, 
                                "sequence": 0
                            }
                        ], 
                        "subscriptionNumber": "S-00005"
                    }
                ]
            }' "https://rest.zuora.com/v1/orders/{orderNumber}/customFields"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/orders/{orderNumber}/customFields');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "customFields": {
                    "order_cf__c": "order custom fields"
                }, 
                "subscriptions": [
                    {
                        "orderActions": [
                            {
                                "customFields": {
                                    "order_action_cf__c": "Order action custom fields", 
                                    "order_action_undex__c": "Order action custom fields"
                                }, 
                                "sequence": 0
                            }
                        ], 
                        "subscriptionNumber": "S-00005"
                    }
                ]
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"customFields\": {\n        \"order_cf__c\": \"order custom fields\"\n    }, \n    \"subscriptions\": [\n        {\n            \"orderActions\": [\n                {\n                    \"customFields\": {\n                        \"order_action_cf__c\": \"Order action custom fields\", \n                        \"order_action_undex__c\": \"Order action custom fields\"\n                    }, \n                    \"sequence\": 0\n                }\n            ], \n            \"subscriptionNumber\": \"S-00005\"\n        }\n    ]\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/orders/{orderNumber}/customFields")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"customFields\": {\n        \"order_cf__c\": \"order custom fields\"\n    }, \n    \"subscriptions\": [\n        {\n            \"orderActions\": [\n                {\n                    \"customFields\": {\n                        \"order_action_cf__c\": \"Order action custom fields\", \n                        \"order_action_undex__c\": \"Order action custom fields\"\n                    }, \n                    \"sequence\": 0\n                }\n            ], \n            \"subscriptionNumber\": \"S-00005\"\n        }\n    ]\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/orders/{orderNumber}/customFields", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/orders/{orderNumber}/customFields")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"customFields\": {\n        \"order_cf__c\": \"order custom fields\"\n    }, \n    \"subscriptions\": [\n        {\n            \"orderActions\": [\n                {\n                    \"customFields\": {\n                        \"order_action_cf__c\": \"Order action custom fields\", \n                        \"order_action_undex__c\": \"Order action custom fields\"\n                    }, \n                    \"sequence\": 0\n                }\n            ], \n            \"subscriptionNumber\": \"S-00005\"\n        }\n    ]\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/orders/{orderNumber}/customFields");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"customFields\": {\n        \"order_cf__c\": \"order custom fields\"\n    }, \n    \"subscriptions\": [\n        {\n            \"orderActions\": [\n                {\n                    \"customFields\": {\n                        \"order_action_cf__c\": \"Order action custom fields\", \n                        \"order_action_undex__c\": \"Order action custom fields\"\n                    }, \n                    \"sequence\": 0\n                }\n            ], \n            \"subscriptionNumber\": \"S-00005\"\n        }\n    ]\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/orders/{orderNumber}/evergreenMetrics/{subscriptionNumber}":
    get:
      description: |
        **Note:** This feature is only available if you have the [Order Metrics](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AA_Overview_of_Orders#Order_Metrics) feature enabled. As of Zuora Billing Release 284, Orders is generally available and the Order Metrics feature is no longer available as a standalone feature. If you are an existing Subscribe and Amend customer and want Order Metrics only, you must turn on [Orders Harmonization](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Orders_Harmonization/Orders_Harmonization). You can still keep the existing Subscribe and Amend API integrations to create and manage subscriptions.

        **Note:** As of Zuora Billing Release 306, Zuora has upgraded the methodologies for calculating metrics in [Orders](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders). The new methodologies are reflected in the following Order Delta Metrics objects. 
        * [Order Delta Mrr](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Delta_Metrics/Order_Delta_Mrr)
        * [Order Delta Tcv](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Delta_Metrics/Order_Delta_Tcv)
        * [Order Delta Tcb](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Delta_Metrics/Order_Delta_Tcb)

        It is recommended that all customers use the new [Order Delta Metrics](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Delta_Metrics/AA_Overview_of_Order_Delta_Metrics). If you are an existing [Order Metrics](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/AA_Overview_of_Orders/Key_Metrics_for_Orders) customer and want to migrate to Order Delta Metrics, submit a request at [Zuora Global Support](https://support.zuora.com/).

        Whereas new customers, and existing customers not currently on [Order Metrics](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/AA_Overview_of_Orders/Key_Metrics_for_Orders), will no longer have access to Order Metrics, existing customers currently using Order Metrics will continue to be supported.

        **Note:** As of Zuora Billing Release 306, any new customers who onboard on [Orders](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/AA_Overview_of_Orders) or [Orders Harmonization](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Orders_Harmonization/Orders_Harmonization) will no longer get this operation.


        Retrieves the metrics of an evergreen subscription in a specified order.
      operationId: GET_OrderMetricsforEvergreenSubscription
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The order number.
          in: path
          name: orderNumber
          required: true
          schema:
            format: string
            type: string
        - description: |
            The subscription number you want to get the metrics for.
          in: path
          name: subscriptionNumber
          required: true
          schema:
            type: string
        - description: |
            The start date of the date range for which you want to get the metrics. The date must be in yyyy-mm-dd format. For example, 2017-12-03.
          in: query
          name: startDate
          required: true
          schema:
            format: date
            type: string
        - description: |
            The end date of the date range for which you want to get the metrics. The date must be in yyyy-mm-dd format. For example, 2017-12-03.
          in: query
          name: endDate
          required: true
          schema:
            format: date
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    order:
                      createdBy: 8a8081085d834928015d837c3c4e0037
                      createdDate: 2017-08-02
                      currency: USD
                      customFields: {}
                      description: This is a description for the Order.
                      existingAccountNumber: A-00002
                      orderDate: 2017-01-01
                      orderNumber: OR-00015
                      status: Completed
                      subscriptions:
                        - baseVersion: null
                          customFields: {}
                          newVersion: 1
                          orderActions:
                            - createSubscription:
                                invoiceSeparately: null
                                notes: null
                                subscribeToRatePlans:
                                  - chargeOverrides:
                                      - billing:
                                          billCycleDay: null
                                          billCycleType: null
                                          billingPeriod: null
                                          billingPeriodAlignment: null
                                          billingTiming: null
                                          specificBillingPeriod: null
                                          weeklyBillCycleDay: null
                                        chargeNumber: C-00000015
                                        customFields: {}
                                        description: null
                                        endDate:
                                          endDateCondition: null
                                          specificEndDate: null
                                          upToPeriods: null
                                          upToPeriodsType: null
                                        pricing:
                                          recurringPerUnit:
                                            listPrice: null
                                            priceChangeOption: null
                                            priceIncreasePercentage: null
                                        productRateplanChargeId: 8a8081085d834928015d9c55d45f0aac
                                        startDate:
                                          specificTriggerDate: null
                                        uniqueToken: Sugar-free Membership Monthly Charge
                                    customFields: {}
                                    newRatePlanId: 8a8081085d834928015da1e36fdd2061
                                    productRatePlanId: 8a8081085d834928015d9c54e67f0aa9
                                    uniqueToken: Sugar-free Monthly
                                subscriptionOwnerAccountNumber: null
                                terms:
                                  autoRenew: null
                                  initialTerm:
                                    period: null
                                    periodType: null
                                    startDate: 2017-01-01
                                    termType: EVERGREEN
                                  renewalSetting: null
                                  renewalTerms:
                                    - period: null
                                      periodType: null
                              customFields: {}
                              orderMetrics:
                                - chargeNumber: C-00000015
                                  mrr:
                                    - amount: 20
                                      endDate: 2017-02-28
                                      invoiceOwner: A-00002
                                      startDate: 2017-01-07
                                      subscriptionOwner: A-00002
                                      termNumber: 1
                                      type: Regular
                                  originRatePlanId: 8a8081085d834928015da1e36fdd2061
                                  productRatePlanChargeId: 8a8081085d834928015d9c55d45f0aac
                                  productRatePlanId: 8a8081085d834928015da1e36fd9205e
                                  quantity:
                                    - amount: 10
                                      endDate: 2017-02-28
                                      invoiceOwner: A-00002
                                      startDate: 2017-01-07
                                      subscriptionOwner: A-00002
                                      termNumber: 1
                                  tcb:
                                    - amount: 36.129032258
                                      endDate: 2017-02-28
                                      invoiceOwner: A-00002
                                      startDate: 2017-01-07
                                      subscriptionOwner: A-00002
                                      tax: 0
                                      termNumber: 1
                                      type: Regular
                                  tcv:
                                    - amount: 35.714285714
                                      endDate: 2017-02-28
                                      invoiceOwner: A-00002
                                      startDate: 2017-01-07
                                      subscriptionOwner: A-00002
                                      termNumber: 1
                                      type: Regular
                              sequence: 0
                              triggerDates:
                                - name: ServiceActivation
                                  triggerDate: 2017-01-01
                                - name: CustomerAcceptance
                                  triggerDate: 2017-01-01
                              type: CreateSubscription
                          subscriptionNumber: S-00004
                      updatedBy: 8a8081085d834928015d837c3c4e0037
                      updatedDate: 2017-08-02
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GetOrderResponseForEvergreen"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List order metrics for an evergreen subscription
      tags:
        - Orders
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/orders/{orderNumber}/evergreenMetrics/{subscriptionNumber}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/orders/{orderNumber}/evergreenMetrics/{subscriptionNumber}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/orders/{orderNumber}/evergreenMetrics/{subscriptionNumber}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/orders/{orderNumber}/evergreenMetrics/{subscriptionNumber}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/orders/{orderNumber}/evergreenMetrics/{subscriptionNumber}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/orders/{orderNumber}/evergreenMetrics/{subscriptionNumber}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/orders/{orderNumber}/ramp-metrics":
    get:
      description: |
        **Note**: This operation is only available if you have the Ramps feature enabled. The [Orders](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/AA_Overview_of_Orders) feature must be enabled before you can access the [Ramps](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Ramps_and_Ramp_Metrics/A_Overview_of_Ramps_and_Ramp_Metrics) feature. The Ramps feature is available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information coming October 2020.

        Retrieves key ramp metrics about a specified order, including the following metrics:

        * TCB, TCV in the Ramp level
        * TCB, TCV in the Interval level
        * TCB, TCV, Quantity, and MRR in Interval Metrics
        * Delta TCB, Delta TCV, Delta Quantity, and Delta MRR in Interval Delta Metrics

        See [Key metrics for Ramps](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Ramps_and_Ramp_Metrics/F_Key_metrics_for_Ramps) for more information.
      operationId: GET_RampMetricsByOrderNumber
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The number of the existing order.
          in: path
          name: orderNumber
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    rampMetrics:
                      - description: ""
                        discountTcb: 0
                        discountTcv: 0
                        grossTcb: 240
                        grossTcv: 240
                        intervals:
                          - description: ""
                            discountTcb: 0
                            discountTcv: 0
                            endDate: 2020-12-31
                            grossTcb: 120
                            grossTcv: 120
                            intervalDeltaMetrics:
                              - chargeNumber: C-00000204
                                deltaDiscountTcb: 0
                                deltaDiscountTcv: 0
                                deltaGrossTcb: 120
                                deltaGrossTcv: 120
                                deltaMrr:
                                  - discount: 0
                                    endDate: 2020-12-31
                                    gross: 10
                                    net: 10
                                    startDate: 2020-01-01
                                deltaNetTcb: 120
                                deltaNetTcv: 120
                                deltaQuantity:
                                  - amount: 1
                                    endDate: 2020-12-31
                                    startDate: 2020-01-01
                                productRatePlanChargeId: 40289f7b7115832f0171158e6dd906cd
                                subscriptionNumber: A-S00000289
                            intervalMetrics:
                              - chargeNumber: C-00000204
                                discountTcb: 0
                                discountTcv: 0
                                endDate: 2020-12-31
                                grossTcb: 120
                                grossTcv: 120
                                mrr:
                                  - discount: 0
                                    endDate: 2020-12-31
                                    gross: 10
                                    net: 10
                                    startDate: 2020-01-01
                                netTcb: 120
                                netTcv: 120
                                productRatePlanChargeId: 40289f7b7115832f0171158e6dd906cd
                                quantity: 1
                                ratePlanChargeId: 40289f7b7322a15901732392a904000a
                                startDate: 2020-01-01
                                subscriptionNumber: A-S00000289
                            name: Year 1
                            netTcb: 120
                            netTcv: 120
                            startDate: 2020-01-01
                          - description: ""
                            discountTcb: 0
                            discountTcv: 0
                            endDate: 2021-12-31
                            grossTcb: 120
                            grossTcv: 120
                            intervalDeltaMetrics:
                              - chargeNumber: C-00000204
                                deltaDiscountTcb: 0
                                deltaDiscountTcv: 0
                                deltaGrossTcb: 120
                                deltaGrossTcv: 120
                                deltaMrr:
                                  - discount: 0
                                    endDate: 2021-12-31
                                    gross: 10
                                    net: 10
                                    startDate: 2021-01-01
                                deltaNetTcb: 120
                                deltaNetTcv: 120
                                deltaQuantity:
                                  - amount: 1
                                    endDate: 2021-12-31
                                    startDate: 2021-01-01
                                productRatePlanChargeId: 40289f7b7115832f0171158e6dd906cd
                                subscriptionNumber: A-S00000289
                            intervalMetrics:
                              - chargeNumber: C-00000204
                                discountTcb: 0
                                discountTcv: 0
                                endDate: 2021-12-31
                                grossTcb: 120
                                grossTcv: 120
                                mrr:
                                  - discount: 0
                                    endDate: 2021-12-31
                                    gross: 10
                                    net: 10
                                    startDate: 2021-01-01
                                netTcb: 120
                                netTcv: 120
                                productRatePlanChargeId: 40289f7b7115832f0171158e6dd906cd
                                quantity: 1
                                ratePlanChargeId: 40289f7b7322a15901732392a904000a
                                startDate: 2021-01-01
                                subscriptionNumber: A-S00000289
                            name: Year 2
                            netTcb: 120
                            netTcv: 120
                            startDate: 2021-01-01
                        name: Two Years Ramp
                        netTcb: 240
                        netTcv: 240
                        number: R-00000270
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRampMetricsByOrderNumberResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List ramp metrics by order number
      tags:
        - Ramps
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/orders/{orderNumber}/ramp-metrics"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/orders/{orderNumber}/ramp-metrics');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/orders/{orderNumber}/ramp-metrics")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/orders/{orderNumber}/ramp-metrics", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/orders/{orderNumber}/ramp-metrics")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/orders/{orderNumber}/ramp-metrics");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/orders/{orderNumber}/triggerDates":
    put:
      description: |
        **Note:** This operation is only available if you have the [Orders](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AA_Overview_of_Orders#Orders) feature enabled. Orders is now generally available as of Zuora Billing Release 284 (August 2020). If you are an existing Zuora Subscribe and Amend customer and want to adopt Orders, see [What is Orders Harmonization](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Orders_Harmonization/Orders_Harmonization#What_is_Orders_Harmonization.3F) and join the [Orders Harmonization community group](https://community.zuora.com/t5/Orders-Harmonization/gp-p/Orders-Harmonization) for more information. If you want to enable Orders, submit a request at [Zuora Global Support](https://support.zuora.com/).

        Updates the triggering dates for either of the following order actions:
         * CreateSubscription
         * AddProduct
         * UpdateProduct
         * RemoveProduct
         * RenewSubscription
         * TermsAndConditions
      operationId: PUT_OrderTriggerDates
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: Order number of a pending order in which you are to update an order action's triggering dates.
          in: path
          name: orderNumber
          required: true
          schema:
            format: string
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTOrderActionTriggerDatesRequestType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountNumber: A00000001
                    orderNumber: OM-00002
                    status: Pending
                    subscriptions:
                      - status: Pending Activation
                        subscriptionNumber: SM-00001
                      - status: Pending Acceptance
                        subscriptionNumber: SM-00002
                      - status: Active
                        subscriptionNumber: SM-00003
                      - status: Pending Acceptance
                        subscriptionNumber: SM-00004
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PUTOrderTriggerDatesResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Update order action trigger dates
      tags:
        - Orders
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "subscriptions": [
                    {
                        "orderActions": [
                            {
                                "charges": [
                                    {
                                        "chargeNumber": "C-0000001", 
                                        "specificTriggerDate": "2016-09-01"
                                    }
                                ], 
                                "sequence": 0, 
                                "triggerDates": [
                                    {
                                        "name": "CustomerAcceptance", 
                                        "triggerDate": "2016-09-01"
                                    }
                                ]
                            }
                        ], 
                        "subscriptionNumber": "A-S00000009"
                    }
                ]
            }' "https://rest.zuora.com/v1/orders/{orderNumber}/triggerDates"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/orders/{orderNumber}/triggerDates');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "subscriptions": [
                    {
                        "orderActions": [
                            {
                                "charges": [
                                    {
                                        "chargeNumber": "C-0000001", 
                                        "specificTriggerDate": "2016-09-01"
                                    }
                                ], 
                                "sequence": 0, 
                                "triggerDates": [
                                    {
                                        "name": "CustomerAcceptance", 
                                        "triggerDate": "2016-09-01"
                                    }
                                ]
                            }
                        ], 
                        "subscriptionNumber": "A-S00000009"
                    }
                ]
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"subscriptions\": [\n        {\n            \"orderActions\": [\n                {\n                    \"charges\": [\n                        {\n                            \"chargeNumber\": \"C-0000001\", \n                            \"specificTriggerDate\": \"2016-09-01\"\n                        }\n                    ], \n                    \"sequence\": 0, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2016-09-01\"\n                        }\n                    ]\n                }\n            ], \n            \"subscriptionNumber\": \"A-S00000009\"\n        }\n    ]\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/orders/{orderNumber}/triggerDates")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"subscriptions\": [\n        {\n            \"orderActions\": [\n                {\n                    \"charges\": [\n                        {\n                            \"chargeNumber\": \"C-0000001\", \n                            \"specificTriggerDate\": \"2016-09-01\"\n                        }\n                    ], \n                    \"sequence\": 0, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2016-09-01\"\n                        }\n                    ]\n                }\n            ], \n            \"subscriptionNumber\": \"A-S00000009\"\n        }\n    ]\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/orders/{orderNumber}/triggerDates", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/orders/{orderNumber}/triggerDates")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"subscriptions\": [\n        {\n            \"orderActions\": [\n                {\n                    \"charges\": [\n                        {\n                            \"chargeNumber\": \"C-0000001\", \n                            \"specificTriggerDate\": \"2016-09-01\"\n                        }\n                    ], \n                    \"sequence\": 0, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2016-09-01\"\n                        }\n                    ]\n                }\n            ], \n            \"subscriptionNumber\": \"A-S00000009\"\n        }\n    ]\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/orders/{orderNumber}/triggerDates");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"subscriptions\": [\n        {\n            \"orderActions\": [\n                {\n                    \"charges\": [\n                        {\n                            \"chargeNumber\": \"C-0000001\", \n                            \"specificTriggerDate\": \"2016-09-01\"\n                        }\n                    ], \n                    \"sequence\": 0, \n                    \"triggerDates\": [\n                        {\n                            \"name\": \"CustomerAcceptance\", \n                            \"triggerDate\": \"2016-09-01\"\n                        }\n                    ]\n                }\n            ], \n            \"subscriptionNumber\": \"A-S00000009\"\n        }\n    ]\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/payment-methods:
    post:
      description: |
        You can use this operation to create either a payment method associated with a specific customer account, or an orphan payment method that is not associated with any customer account. The orphan payment method must be associated with a customer account within 10 days. Otherwise, it will be deleted.

        This operation supports the payment methods listed below.

        ### PayPal Express Checkout
        The following request body fields are specific to this payment method:
        * `BAID` (required)
        * `email` (required)

        ### PayPal Native Express Checkout
        The following request body fields are specific to this payment method:
        * `BAID` (required)
        * `email` (optional)

        ### PayPal Adaptive
        The following request body fields are specific to this payment method:
        * `preapprovalKey` (required)
        * `email` (required)

        ### Credit Card
        The following request body fields are specific to this payment method:
        * `cardHolderInfo` (`cardHolderName` required)
        * `cardNumber` (required)
        * `cardType` (required)
        * `expirationMonth` (required)
        * `expirationYear` (required)
        * `mitConsentAgreementRef`
        * `mitConsentAgreementSrc`
        * `mitNetworkTransactionId`
        * `mitProfileAction`
        * `mitProfileType`
        * `mitProfileAgreedOn`
        * `securityCode`
        * `checkDuplicated`



        ### ACH
        The following request body fields are applicable to this payment method:
        * `bankABACode` (required)
        * `bankAccountName` (required)
        * `bankAccountNumber` (required)
        * `bankAccountType` (required)
        * `bankName` (required)
        * `addressLine1`
        * `addressLine2`
        * `phone`
        * `email`
        * `city`
        * `country`
        * `state`
        * `zipCode`

        ### SEPA
        The following request body fields are applicable to this payment method:
        * `IBAN` (required)
        * `accountHolderInfo` (required)
        * `businessIdentificationCode`


        ### Betalingsservice (Direct Debit DK)
        The following request body fields are applicable to this payment method:
        * `accountNumber` (required)
        * `identityNumber` (required)
        * `bankCode` (required)
        * `accountHolderInfo` (required)


        ### Autogiro (Direct Debit SE)
        The following request body fields are applicable to this payment method:        
        * `accountNumber` (required)
        * `identityNumber` (required)
        * `branchCode` (required)
        * `accountHolderInfo` (required) 


        ### Bacs (Direct Debit UK)
        The following request body fields are applicable to this payment method:        
        * `accountNumber` (required)
        * `bankCode` (required)
        * `accountHolderInfo` (required)


        ### Becs (Direct Entry AU)
        The following request body fields are applicable to this payment method:        
        * `accountNumber` (required)
        * `branchCode` (required)
        * `accountHolderInfo` (required)


        ### Becsnz (Direct Debit NZ)
        The following request body fields are applicable to this payment method:        
        * `accountNumber` (required)
        * `bankCode` (required)
        * `branchCode` (required)
        * `accountHolderInfo` (required)


        ### PAD (Pre-Authorized Debit)
        The following request body fields are applicable to this payment method:        
        * `accountNumber` (required)
        * `bankCode` (required)
        * `branchCode` (required)
        * `accountHolderInfo` (required)


        ### Custom payment methods
        Note: This feature is in the Early Adopter phase. If you want to use this feature, submit a request at [Zuora Global Support](http://support.zuora.com/) to enable the Universal Payment Connector and Open Payment Method services that support this feature.

        With the support of Universal Payment Connector (UPC) and Open Payment Method (OPM) services, you can create custom payment methods by using the fields defined in a definition file for this type of custom payment method. See [Set up custom payment gateways and payment methods](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/MB_Set_up_custom_payment_gateways_and_payment_methods) for details.
      operationId: POST_PaymentMethods
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTPaymentMethodRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    id: 2c92a09650a7a80a0150ab50a5b746bd
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTPaymentMethodResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Create a payment method
      tags:
        - Payment Methods
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "BAID": "I-1TJ3GAGG82Y9", 
                "accountKey": "2c92c0f95be68649015bf14e001f2760", 
                "email": "customer@example.com", 
                "type": "PayPalEC"
            }' "https://rest.zuora.com/v1/payment-methods"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/payment-methods');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "BAID": "I-1TJ3GAGG82Y9", 
                "accountKey": "2c92c0f95be68649015bf14e001f2760", 
                "email": "customer@example.com", 
                "type": "PayPalEC"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"BAID\": \"I-1TJ3GAGG82Y9\", \n    \"accountKey\": \"2c92c0f95be68649015bf14e001f2760\", \n    \"email\": \"customer@example.com\", \n    \"type\": \"PayPalEC\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/payment-methods")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"BAID\": \"I-1TJ3GAGG82Y9\", \n    \"accountKey\": \"2c92c0f95be68649015bf14e001f2760\", \n    \"email\": \"customer@example.com\", \n    \"type\": \"PayPalEC\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/payment-methods", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/payment-methods")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"BAID\": \"I-1TJ3GAGG82Y9\", \n    \"accountKey\": \"2c92c0f95be68649015bf14e001f2760\", \n    \"email\": \"customer@example.com\", \n    \"type\": \"PayPalEC\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/payment-methods");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"BAID\": \"I-1TJ3GAGG82Y9\", \n    \"accountKey\": \"2c92c0f95be68649015bf14e001f2760\", \n    \"email\": \"customer@example.com\", \n    \"type\": \"PayPalEC\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/payment-methods/credit-cards:
    post:
      description: |
        You can create a credit card payment method for a customer account or an orphan credit card payment method that is not associated with any customer account. The orphan payment method must be associated with a customer account within 10 days. Otherwise, it will be deleted.

        This API call is CORS Enabled. Use client-side JavaScript to invoke the call. 

        **Note**: If you use this operation to create credit card payment methods instead of using the [iFrame of Hosted Payment Pages](https://knowledgecenter.zuora.com/CB_Billing/LA_Hosted_Payment_Pages/C_Hosted_Payment_Pages/B_Implementing_Hosted_Payment_Pages_on_Your_Website/C_Embed_and_Submit_the_iFrame), you are subject to PCI-compliance audit requirements.
      operationId: POST_PaymentMethodsCreditCard
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTPaymentMethodType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    paymentMethodId: 2c92c8f83dcbd8b1013dcce1d6a60
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTPaymentMethodResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Create a credit card payment method
      tags:
        - Payment Methods
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "accountKey": "A00001115", 
                "cardHolderInfo": {
                    "addressLine1": "77 Fallon Glen", 
                    "addressLine2": "", 
                    "cardHolderName": "Leo", 
                    "city": "Fremont", 
                    "country": "USA", 
                    "email": "smith@example.com", 
                    "phone": "4155551234", 
                    "state": "California", 
                    "zipCode": "94020"
                }, 
                "creditCardNumber": "1111222233334444", 
                "creditCardType": "Discover", 
                "defaultPaymentMethod": false, 
                "expirationMonth": 10, 
                "expirationYear": 2021, 
                "gatewayOptions": {
                    "Comments": "Test comments", 
                    "IPAddress": "192.168.1.1"
                }, 
                "numConsecutiveFailures": 3, 
                "securityCode": "123"
            }' "https://rest.zuora.com/v1/payment-methods/credit-cards"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/payment-methods/credit-cards');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "accountKey": "A00001115", 
                "cardHolderInfo": {
                    "addressLine1": "77 Fallon Glen", 
                    "addressLine2": "", 
                    "cardHolderName": "Leo", 
                    "city": "Fremont", 
                    "country": "USA", 
                    "email": "smith@example.com", 
                    "phone": "4155551234", 
                    "state": "California", 
                    "zipCode": "94020"
                }, 
                "creditCardNumber": "1111222233334444", 
                "creditCardType": "Discover", 
                "defaultPaymentMethod": false, 
                "expirationMonth": 10, 
                "expirationYear": 2021, 
                "gatewayOptions": {
                    "Comments": "Test comments", 
                    "IPAddress": "192.168.1.1"
                }, 
                "numConsecutiveFailures": 3, 
                "securityCode": "123"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"accountKey\": \"A00001115\", \n    \"cardHolderInfo\": {\n        \"addressLine1\": \"77 Fallon Glen\", \n        \"addressLine2\": \"\", \n        \"cardHolderName\": \"Leo\", \n        \"city\": \"Fremont\", \n        \"country\": \"USA\", \n        \"email\": \"smith@example.com\", \n        \"phone\": \"4155551234\", \n        \"state\": \"California\", \n        \"zipCode\": \"94020\"\n    }, \n    \"creditCardNumber\": \"1111222233334444\", \n    \"creditCardType\": \"Discover\", \n    \"defaultPaymentMethod\": false, \n    \"expirationMonth\": 10, \n    \"expirationYear\": 2021, \n    \"gatewayOptions\": {\n        \"Comments\": \"Test comments\", \n        \"IPAddress\": \"192.168.1.1\"\n    }, \n    \"numConsecutiveFailures\": 3, \n    \"securityCode\": \"123\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/payment-methods/credit-cards")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"accountKey\": \"A00001115\", \n    \"cardHolderInfo\": {\n        \"addressLine1\": \"77 Fallon Glen\", \n        \"addressLine2\": \"\", \n        \"cardHolderName\": \"Leo\", \n        \"city\": \"Fremont\", \n        \"country\": \"USA\", \n        \"email\": \"smith@example.com\", \n        \"phone\": \"4155551234\", \n        \"state\": \"California\", \n        \"zipCode\": \"94020\"\n    }, \n    \"creditCardNumber\": \"1111222233334444\", \n    \"creditCardType\": \"Discover\", \n    \"defaultPaymentMethod\": false, \n    \"expirationMonth\": 10, \n    \"expirationYear\": 2021, \n    \"gatewayOptions\": {\n        \"Comments\": \"Test comments\", \n        \"IPAddress\": \"192.168.1.1\"\n    }, \n    \"numConsecutiveFailures\": 3, \n    \"securityCode\": \"123\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/payment-methods/credit-cards", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/payment-methods/credit-cards")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"accountKey\": \"A00001115\", \n    \"cardHolderInfo\": {\n        \"addressLine1\": \"77 Fallon Glen\", \n        \"addressLine2\": \"\", \n        \"cardHolderName\": \"Leo\", \n        \"city\": \"Fremont\", \n        \"country\": \"USA\", \n        \"email\": \"smith@example.com\", \n        \"phone\": \"4155551234\", \n        \"state\": \"California\", \n        \"zipCode\": \"94020\"\n    }, \n    \"creditCardNumber\": \"1111222233334444\", \n    \"creditCardType\": \"Discover\", \n    \"defaultPaymentMethod\": false, \n    \"expirationMonth\": 10, \n    \"expirationYear\": 2021, \n    \"gatewayOptions\": {\n        \"Comments\": \"Test comments\", \n        \"IPAddress\": \"192.168.1.1\"\n    }, \n    \"numConsecutiveFailures\": 3, \n    \"securityCode\": \"123\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/payment-methods/credit-cards");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"accountKey\": \"A00001115\", \n    \"cardHolderInfo\": {\n        \"addressLine1\": \"77 Fallon Glen\", \n        \"addressLine2\": \"\", \n        \"cardHolderName\": \"Leo\", \n        \"city\": \"Fremont\", \n        \"country\": \"USA\", \n        \"email\": \"smith@example.com\", \n        \"phone\": \"4155551234\", \n        \"state\": \"California\", \n        \"zipCode\": \"94020\"\n    }, \n    \"creditCardNumber\": \"1111222233334444\", \n    \"creditCardType\": \"Discover\", \n    \"defaultPaymentMethod\": false, \n    \"expirationMonth\": 10, \n    \"expirationYear\": 2021, \n    \"gatewayOptions\": {\n        \"Comments\": \"Test comments\", \n        \"IPAddress\": \"192.168.1.1\"\n    }, \n    \"numConsecutiveFailures\": 3, \n    \"securityCode\": \"123\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/payment-methods/credit-cards/accounts/{account-key}":
    get:
      description: |
        This REST API reference describes how to retrieve all credit card
        information for the specified customer account. 

        ## Notes
        The response includes details of credit or debit cards for the specified customer account. Card numbers are masked, e.g., "************1234". Cards are returned in reverse chronological order of last update.

        Though you can also send requests for bank transfer, ACH, or other supported payment methods, the response will not include effective details of these payment methods.
      operationId: GET_PaymentMethodsCreditCard
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - description: Account number or account ID.
          in: path
          name: account-key
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    creditCards:
                      - cardHolderInfo:
                          addressLine1: null
                          addressLine2: null
                          cardHolderName: Leo
                          city: null
                          country: null
                          email: smith@example.com
                          phone: "4082021111"
                          state: null
                          zipCode: null
                        cardNumber: "************1111"
                        cardType: Visa
                        defaultPaymentMethod: true
                        expirationMonth: 10
                        expirationYear: 2020
                        id: 2c92c8f83dabf9cf013daef12dd303b0
                      - cardHolderInfo:
                          addressLine1: 1400 Bridge Pkwy
                          addressLine2: null
                          cardHolderName: foo CC name
                          city: San Jose
                          country: United States
                          email: null
                          phone: null
                          state: California
                          zipCode: "95135"
                        cardNumber: "*****foo CC #"
                        cardType: Visa
                        defaultPaymentMethod: false
                        expirationMonth: 10
                        expirationYear: 2012
                        id: 2c92a0f9391832b10139183e279e0044
                    nextPage: https://rest.zuora.com/v1/payment-methods/credit-cards/accounts/A00001115?page=2&pageSize=2
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETPaymentMethodsType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List all credit card payment methods of an account
      tags:
        - Payment Methods
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/payment-methods/credit-cards/accounts/{account-key}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/payment-methods/credit-cards/accounts/{account-key}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/payment-methods/credit-cards/accounts/{account-key}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/payment-methods/credit-cards/accounts/{account-key}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/payment-methods/credit-cards/accounts/{account-key}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/payment-methods/credit-cards/accounts/{account-key}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/payment-methods/credit-cards/{payment-method-id}":
    put:
      description: |
        Updates an existing credit card payment method.
      operationId: PUT_PaymentMethodsCreditCard
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: Unique ID of the payment method to update.
          in: path
          name: payment-method-id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTPaymentMethodType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    paymentMethodId: 2c92c8f83dcbd8b1013dcce1d6a600ce
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PUTPaymentMethodResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Update a credit card payment method
      tags:
        - Payment Methods
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "cardHolderName": "Leo", 
                "expirationMonth": 8, 
                "expirationYear": 2015, 
                "gatewayOptions": {
                    "Comments": "Updated comments", 
                    "IPAddress": "172.112.1.1"
                }, 
                "numConsecutiveFailures": 5, 
                "securityCode": "111"
            }' "https://rest.zuora.com/v1/payment-methods/credit-cards/{payment-method-id}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/payment-methods/credit-cards/{payment-method-id}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "cardHolderName": "Leo", 
                "expirationMonth": 8, 
                "expirationYear": 2015, 
                "gatewayOptions": {
                    "Comments": "Updated comments", 
                    "IPAddress": "172.112.1.1"
                }, 
                "numConsecutiveFailures": 5, 
                "securityCode": "111"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"cardHolderName\": \"Leo\", \n    \"expirationMonth\": 8, \n    \"expirationYear\": 2015, \n    \"gatewayOptions\": {\n        \"Comments\": \"Updated comments\", \n        \"IPAddress\": \"172.112.1.1\"\n    }, \n    \"numConsecutiveFailures\": 5, \n    \"securityCode\": \"111\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/payment-methods/credit-cards/{payment-method-id}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"cardHolderName\": \"Leo\", \n    \"expirationMonth\": 8, \n    \"expirationYear\": 2015, \n    \"gatewayOptions\": {\n        \"Comments\": \"Updated comments\", \n        \"IPAddress\": \"172.112.1.1\"\n    }, \n    \"numConsecutiveFailures\": 5, \n    \"securityCode\": \"111\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/payment-methods/credit-cards/{payment-method-id}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/payment-methods/credit-cards/{payment-method-id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"cardHolderName\": \"Leo\", \n    \"expirationMonth\": 8, \n    \"expirationYear\": 2015, \n    \"gatewayOptions\": {\n        \"Comments\": \"Updated comments\", \n        \"IPAddress\": \"172.112.1.1\"\n    }, \n    \"numConsecutiveFailures\": 5, \n    \"securityCode\": \"111\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/payment-methods/credit-cards/{payment-method-id}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"cardHolderName\": \"Leo\", \n    \"expirationMonth\": 8, \n    \"expirationYear\": 2015, \n    \"gatewayOptions\": {\n        \"Comments\": \"Updated comments\", \n        \"IPAddress\": \"172.112.1.1\"\n    }, \n    \"numConsecutiveFailures\": 5, \n    \"securityCode\": \"111\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/payment-methods/decryption:
    post:
      description: |
        The decryption API endpoint can conditionally perform 3 tasks in one atomic call:
          * Decrypt Apple Pay Payment token
          * Create Credit Card Payment Method in Zuora with decrypted Apple Pay information
          * Process Payment on a specified Invoice (optional)
      operationId: POST_PaymentMethodsDecryption
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTPaymentMethodDecryption"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    paymentMethodId: 2c92c8f83dcbd8b1013dcce1d6a600ce
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTPaymentMethodResponseDecryption"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Create an Apple Pay payment method
      tags:
        - Payment Methods
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "accountID": "402891a25a02e11c015a02f3c6100003", 
                "integrationType": "ApplePay", 
                "invoiceId": "INV000000005", 
                "merchantID": "merchant.CN.com.zuora.services416", 
                "paymentGateway": "CyberSourceOPG", 
                "paymentToken": {
                    "data": "xGc......JDxuYz1gug0KZRrGXJQ=", 
                    "header": {
                        "ephemeralPublicKey": "MFkwEw......TMbLoojKBA==", 
                        "publicKeyHash": "HuLvfqvLon......9jEyX0w=", 
                        "transactionId": "abbadd18818baea1f37b40844c9e09afa9733b0eccb373905b811da43cf1753b"
                    }, 
                    "signature": "MIAGCSqGSIb......AEtrLSv7hE9gAAAAAAAA==", 
                    "version": "EC_v1"
                }, 
                "processPayment": true
            }' "https://rest.zuora.com/v1/payment-methods/decryption"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/payment-methods/decryption');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "accountID": "402891a25a02e11c015a02f3c6100003", 
                "integrationType": "ApplePay", 
                "invoiceId": "INV000000005", 
                "merchantID": "merchant.CN.com.zuora.services416", 
                "paymentGateway": "CyberSourceOPG", 
                "paymentToken": {
                    "data": "xGc......JDxuYz1gug0KZRrGXJQ=", 
                    "header": {
                        "ephemeralPublicKey": "MFkwEw......TMbLoojKBA==", 
                        "publicKeyHash": "HuLvfqvLon......9jEyX0w=", 
                        "transactionId": "abbadd18818baea1f37b40844c9e09afa9733b0eccb373905b811da43cf1753b"
                    }, 
                    "signature": "MIAGCSqGSIb......AEtrLSv7hE9gAAAAAAAA==", 
                    "version": "EC_v1"
                }, 
                "processPayment": true
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"accountID\": \"402891a25a02e11c015a02f3c6100003\", \n    \"integrationType\": \"ApplePay\", \n    \"invoiceId\": \"INV000000005\", \n    \"merchantID\": \"merchant.CN.com.zuora.services416\", \n    \"paymentGateway\": \"CyberSourceOPG\", \n    \"paymentToken\": {\n        \"data\": \"xGc......JDxuYz1gug0KZRrGXJQ=\", \n        \"header\": {\n            \"ephemeralPublicKey\": \"MFkwEw......TMbLoojKBA==\", \n            \"publicKeyHash\": \"HuLvfqvLon......9jEyX0w=\", \n            \"transactionId\": \"abbadd18818baea1f37b40844c9e09afa9733b0eccb373905b811da43cf1753b\"\n        }, \n        \"signature\": \"MIAGCSqGSIb......AEtrLSv7hE9gAAAAAAAA==\", \n        \"version\": \"EC_v1\"\n    }, \n    \"processPayment\": true\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/payment-methods/decryption")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"accountID\": \"402891a25a02e11c015a02f3c6100003\", \n    \"integrationType\": \"ApplePay\", \n    \"invoiceId\": \"INV000000005\", \n    \"merchantID\": \"merchant.CN.com.zuora.services416\", \n    \"paymentGateway\": \"CyberSourceOPG\", \n    \"paymentToken\": {\n        \"data\": \"xGc......JDxuYz1gug0KZRrGXJQ=\", \n        \"header\": {\n            \"ephemeralPublicKey\": \"MFkwEw......TMbLoojKBA==\", \n            \"publicKeyHash\": \"HuLvfqvLon......9jEyX0w=\", \n            \"transactionId\": \"abbadd18818baea1f37b40844c9e09afa9733b0eccb373905b811da43cf1753b\"\n        }, \n        \"signature\": \"MIAGCSqGSIb......AEtrLSv7hE9gAAAAAAAA==\", \n        \"version\": \"EC_v1\"\n    }, \n    \"processPayment\": true\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/payment-methods/decryption", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/payment-methods/decryption")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"accountID\": \"402891a25a02e11c015a02f3c6100003\", \n    \"integrationType\": \"ApplePay\", \n    \"invoiceId\": \"INV000000005\", \n    \"merchantID\": \"merchant.CN.com.zuora.services416\", \n    \"paymentGateway\": \"CyberSourceOPG\", \n    \"paymentToken\": {\n        \"data\": \"xGc......JDxuYz1gug0KZRrGXJQ=\", \n        \"header\": {\n            \"ephemeralPublicKey\": \"MFkwEw......TMbLoojKBA==\", \n            \"publicKeyHash\": \"HuLvfqvLon......9jEyX0w=\", \n            \"transactionId\": \"abbadd18818baea1f37b40844c9e09afa9733b0eccb373905b811da43cf1753b\"\n        }, \n        \"signature\": \"MIAGCSqGSIb......AEtrLSv7hE9gAAAAAAAA==\", \n        \"version\": \"EC_v1\"\n    }, \n    \"processPayment\": true\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/payment-methods/decryption");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"accountID\": \"402891a25a02e11c015a02f3c6100003\", \n    \"integrationType\": \"ApplePay\", \n    \"invoiceId\": \"INV000000005\", \n    \"merchantID\": \"merchant.CN.com.zuora.services416\", \n    \"paymentGateway\": \"CyberSourceOPG\", \n    \"paymentToken\": {\n        \"data\": \"xGc......JDxuYz1gug0KZRrGXJQ=\", \n        \"header\": {\n            \"ephemeralPublicKey\": \"MFkwEw......TMbLoojKBA==\", \n            \"publicKeyHash\": \"HuLvfqvLon......9jEyX0w=\", \n            \"transactionId\": \"abbadd18818baea1f37b40844c9e09afa9733b0eccb373905b811da43cf1753b\"\n        }, \n        \"signature\": \"MIAGCSqGSIb......AEtrLSv7hE9gAAAAAAAA==\", \n        \"version\": \"EC_v1\"\n    }, \n    \"processPayment\": true\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/payment-methods/{payment-method-id}":
    delete:
      description: |
        Deletes a credit card payment method.

        If the specified payment method is the account's default payment
        method, the request will fail.  In that case, you must first designate a
        different payment method for that customer to be the default.

        For a use case of this operation, see [Configure Payment Methods](https://www.zuora.com/developer/api-guides/#Configure-payment-methods).
      operationId: DELETE_PaymentMethods
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: Unique identifier of a payment method. (Since this ID is unique, and linked to a customer account in the system, no customer identifier is needed.)
          in: path
          name: payment-method-id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Delete a payment method
      tags:
        - Payment Methods
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/payment-methods/{payment-method-id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/payment-methods/{payment-method-id}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/payment-methods/{payment-method-id}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/v1/payment-methods/{payment-method-id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/payment-methods/{payment-method-id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/payment-methods/{payment-method-id}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      description: |
        This operation allows you to get the detailed information about a payment method.
      operationId: GET_PaymentMethod
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: Unique ID of the payment method to update.
          in: path
          name: payment-method-id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountHolderInfo:
                      accountHolderName: Sarah Smith
                      addressLine1: 312 2nd Avenue
                      addressLine2: ""
                      city: Seattle
                      country: United States
                      email: sarah@example.com
                      phone: ""
                      state: Washington
                      zipCode: "98119"
                    accountKey: 2c92c0f968e566ad0168ef36f27d057c
                    cardNumber: "***********7820"
                    expirationMonth: 7
                    expirationYear: 2024
                    id: 2c92c0f872c68b450172dad9c61e436b
                    isDefault: true
                    lastTransaction: Approved
                    mandateInfo:
                      mitConsentAgreementRef: id8k2jjix
                      mitConsentAgreementSrc: Zuora
                      mitProfileAction: Persist
                      mitProfileAgreedOn: 2020-01-01
                      mitProfileType: Recurring
                      mitTransactionId: "123456"
                    status: Active
                    success: true
                    type: CreditCard
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETPaymentMethodResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a payment method
      tags:
        - Payment Methods
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/payment-methods/{payment-method-id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/payment-methods/{payment-method-id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/payment-methods/{payment-method-id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/payment-methods/{payment-method-id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/payment-methods/{payment-method-id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/payment-methods/{payment-method-id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: |
        This operation allows you to update an existing payment method. 

        The following request body fields can be updated regardless of payment method types:
        * `authGateway`
        * `gatewayOptions`
        * `accountHolderInfo`
        * Custom fields

        The following request body fields can be updated only for the Credit Card payment method:
        * `expirationMonth` 
        * `expirationYear`
        * `securityCode`
      operationId: PUT_PaymentMethod
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: Unique ID of the payment method to update.
          in: path
          name: payment-method-id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTPaymentMethodRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    id: 2c92c0f86c99b4eb016cae1ee301728f
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PUTPaymentMethodResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Update a payment method
      tags:
        - Payment Methods
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "accountHolderInfo": {
                    "addressLine1": "address 1", 
                    "phone": "1333333333"
                }, 
                "expirationMonth": 8, 
                "expirationYear": 2024, 
                "securityCode": "123"
            }' "https://rest.zuora.com/v1/payment-methods/{payment-method-id}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/payment-methods/{payment-method-id}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "accountHolderInfo": {
                    "addressLine1": "address 1", 
                    "phone": "1333333333"
                }, 
                "expirationMonth": 8, 
                "expirationYear": 2024, 
                "securityCode": "123"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"accountHolderInfo\": {\n        \"addressLine1\": \"address 1\", \n        \"phone\": \"1333333333\"\n    }, \n    \"expirationMonth\": 8, \n    \"expirationYear\": 2024, \n    \"securityCode\": \"123\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/payment-methods/{payment-method-id}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"accountHolderInfo\": {\n        \"addressLine1\": \"address 1\", \n        \"phone\": \"1333333333\"\n    }, \n    \"expirationMonth\": 8, \n    \"expirationYear\": 2024, \n    \"securityCode\": \"123\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/payment-methods/{payment-method-id}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/payment-methods/{payment-method-id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"accountHolderInfo\": {\n        \"addressLine1\": \"address 1\", \n        \"phone\": \"1333333333\"\n    }, \n    \"expirationMonth\": 8, \n    \"expirationYear\": 2024, \n    \"securityCode\": \"123\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/payment-methods/{payment-method-id}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"accountHolderInfo\": {\n        \"addressLine1\": \"address 1\", \n        \"phone\": \"1333333333\"\n    }, \n    \"expirationMonth\": 8, \n    \"expirationYear\": 2024, \n    \"securityCode\": \"123\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/payment-methods/{payment-method-id}/authorize":
    post:
      description: |+
        **Note:** If you want to enable this feature, submit a request at [Zuora Global Support](http://support.zuora.com/).

        Enables you to authorize the availability of funds for a transaction but delay the capture of funds until a later time. Subsequently, use [CRUD: Create a payment](https://www.zuora.com/developer/api-reference/#operation/Object_POSTPayment) or [Create a payment](https://www.zuora.com/developer/api-reference/#operation/POST_CreatePayment) to capture the authorized funds, or use [Cancel authorization](https://www.zuora.com/developer/api-reference/#operation/POST_CancelAuthorization) to cancel the authorization. 

        The payment gateways that support this operation include:

        * Adyen integration v2.0 - This gateway does not support [Cancel authorization](https://www.zuora.com/developer/api-reference/#operation/POST_CancelAuthorization).
        * CyberSource 1.28
        * CyberSource 1.97
        * CyberSource 2.0 - This gateway does not support [Cancel authorization](https://www.zuora.com/developer/api-reference/#operation/POST_CancelAuthorization).
        * Chase Paymentech Orbital
        * Ingenico ePayments
        * Verifi - This gateway does not support [Cancel authorization](https://www.zuora.com/developer/api-reference/#operation/POST_CancelAuthorization).

        Note that CyberSource 2.0 supports the Delayed Capture feature for both Credit Cards and Credit Card Reference payment methods.

        If you have the Invoice Settlement feature enabled, use the [Create payment](https://www.zuora.com/developer/api-reference/#operation/POST_CreatePayment) operation to capture the funds instead of the [CRUD: Create payment](https://www.zuora.com/developer/api-reference/#operation/Object_POSTPayment) operation.
              
      operationId: POST_CreateAuthorization
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of the payment method where the authorization is created.
          in: path
          name: payment-method-id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTDelayAuthorizeCapture"
        required: true
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTAuthorizeResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Create authorization
      tags:
        - Payment Methods
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "accountId": "402881e861bd8a7e0161c6a453750026", 
                "accountNumber": "A00000004", 
                "amount": 1.99, 
                "gatewayOrderId": "A001", 
                "softDescriptor": "Service fee", 
                "softDescriptorPhone": "400-000-1234"
            }' "https://rest.zuora.com/v1/payment-methods/{payment-method-id}/authorize"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/payment-methods/{payment-method-id}/authorize');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "accountId": "402881e861bd8a7e0161c6a453750026", 
                "accountNumber": "A00000004", 
                "amount": 1.99, 
                "gatewayOrderId": "A001", 
                "softDescriptor": "Service fee", 
                "softDescriptorPhone": "400-000-1234"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"accountId\": \"402881e861bd8a7e0161c6a453750026\", \n    \"accountNumber\": \"A00000004\", \n    \"amount\": 1.99, \n    \"gatewayOrderId\": \"A001\", \n    \"softDescriptor\": \"Service fee\", \n    \"softDescriptorPhone\": \"400-000-1234\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/payment-methods/{payment-method-id}/authorize")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"accountId\": \"402881e861bd8a7e0161c6a453750026\", \n    \"accountNumber\": \"A00000004\", \n    \"amount\": 1.99, \n    \"gatewayOrderId\": \"A001\", \n    \"softDescriptor\": \"Service fee\", \n    \"softDescriptorPhone\": \"400-000-1234\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/payment-methods/{payment-method-id}/authorize", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/payment-methods/{payment-method-id}/authorize")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"accountId\": \"402881e861bd8a7e0161c6a453750026\", \n    \"accountNumber\": \"A00000004\", \n    \"amount\": 1.99, \n    \"gatewayOrderId\": \"A001\", \n    \"softDescriptor\": \"Service fee\", \n    \"softDescriptorPhone\": \"400-000-1234\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/payment-methods/{payment-method-id}/authorize");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"accountId\": \"402881e861bd8a7e0161c6a453750026\", \n    \"accountNumber\": \"A00000004\", \n    \"amount\": 1.99, \n    \"gatewayOrderId\": \"A001\", \n    \"softDescriptor\": \"Service fee\", \n    \"softDescriptorPhone\": \"400-000-1234\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/payment-methods/{payment-method-id}/profiles":
    get:
      description: |
        Retrieves the stored credential profiles within a payment method.

        **Note:** This feature is in the **Early Adopters** phase. We are actively soliciting feedback from a small set of early adopters before releasing as generally available.
      operationId: GET_StoredCredentialProfiles
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            ID of a payment method.
          in: path
          name: payment-method-id
          required: true
          schema:
            type: string
        - description: |
            Specifies whether to retrieve all the stored credential profiles within the payment method.

            By default, Zuora returns only the stored credential profiles with `Agreed` or `Active` status. If you set this parameter to `true`, Zuora returns all the stored credential profiles.
          in: query
          name: includeAll
          schema:
            default: false
            type: boolean
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    profiles:
                      - activatedOn: 2019-03-06 07:45:55
                        agreedOn: 2019-03-06 07:45:55
                        brand: Visa
                        cancelledOn: 2019-03-13 07:52:16
                        consentAgreementRef: ACCT1338AgreementV1.pdf
                        consentAgreementSrc: External
                        expiredOn: null
                        number: 1
                        paymentMethodId: 402881836953a3c7016953aec290000d
                        status: Cancelled
                        type: Recurring
                      - activatedOn: 2019-03-13 07:55:08
                        agreedOn: 2019-03-13 07:55:08
                        brand: Visa
                        cancelledOn: null
                        consentAgreementRef: ACCT1338AgreementV2.pdf
                        consentAgreementSrc: External
                        expiredOn: null
                        number: 2
                        paymentMethodId: 402881836953a3c7016953aec290000d
                        status: Active
                        type: Recurring
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GetStoredCredentialProfilesResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List stored credential profiles of a payment method
      tags:
        - Payment Methods
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/payment-methods/{payment-method-id}/profiles"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/payment-methods/{payment-method-id}/profiles');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/payment-methods/{payment-method-id}/profiles")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/payment-methods/{payment-method-id}/profiles", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/payment-methods/{payment-method-id}/profiles")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/payment-methods/{payment-method-id}/profiles");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    post:
      description: |
        Creates a stored credential profile within a payment method.

        The stored credential profile represents a consent agreement that you have established with a customer. When you use the payment method in a transaction, Zuora may include information from the stored credential profile to inform the payment processor that the transaction is related to your pre-existing consent agreement with the customer.

        **Note:** This feature is in the **Early Adopters** phase. We are actively soliciting feedback from a small set of early adopters before releasing as generally available.
      operationId: POST_CreateStoredCredentialProfile
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            ID of a payment method.
          in: path
          name: payment-method-id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/CreateStoredCredentialProfileRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    number: 3
                    paymentMethodId: 402881836953a3c7016953aec290000d
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ModifiedStoredCredentialProfileResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Create a stored credential profile
      tags:
        - Payment Methods
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "authGateway": "4028905f5702783601570291e14c0015", 
                "consentAgreementRef": "ACCT1338AgreementV1.pdf", 
                "consentAgreementSrc": "External", 
                "status": "Active", 
                "type": "Recurring"
            }' "https://rest.zuora.com/v1/payment-methods/{payment-method-id}/profiles"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/payment-methods/{payment-method-id}/profiles');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "authGateway": "4028905f5702783601570291e14c0015", 
                "consentAgreementRef": "ACCT1338AgreementV1.pdf", 
                "consentAgreementSrc": "External", 
                "status": "Active", 
                "type": "Recurring"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"authGateway\": \"4028905f5702783601570291e14c0015\", \n    \"consentAgreementRef\": \"ACCT1338AgreementV1.pdf\", \n    \"consentAgreementSrc\": \"External\", \n    \"status\": \"Active\", \n    \"type\": \"Recurring\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/payment-methods/{payment-method-id}/profiles")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"authGateway\": \"4028905f5702783601570291e14c0015\", \n    \"consentAgreementRef\": \"ACCT1338AgreementV1.pdf\", \n    \"consentAgreementSrc\": \"External\", \n    \"status\": \"Active\", \n    \"type\": \"Recurring\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/payment-methods/{payment-method-id}/profiles", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/payment-methods/{payment-method-id}/profiles")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"authGateway\": \"4028905f5702783601570291e14c0015\", \n    \"consentAgreementRef\": \"ACCT1338AgreementV1.pdf\", \n    \"consentAgreementSrc\": \"External\", \n    \"status\": \"Active\", \n    \"type\": \"Recurring\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/payment-methods/{payment-method-id}/profiles");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"authGateway\": \"4028905f5702783601570291e14c0015\", \n    \"consentAgreementRef\": \"ACCT1338AgreementV1.pdf\", \n    \"consentAgreementSrc\": \"External\", \n    \"status\": \"Active\", \n    \"type\": \"Recurring\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/payment-methods/{payment-method-id}/profiles/{profile-number}/cancel":
    post:
      description: |
        Cancels a stored credential profile within a payment method.

        Cancelling the stored credential profile indicates that the stored credentials are no longer valid, per a customer request. You cannot reactivate the stored credential profile after you have cancelled it.

        **Note:** This feature is in the **Early Adopters** phase. We are actively soliciting feedback from a small set of early adopters before releasing as generally available.
      operationId: POST_CancelStoredCredentialProfile
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            ID of a payment method.
          in: path
          name: payment-method-id
          required: true
          schema:
            type: string
        - description: |
            Number that identifies a stored credential profile within the payment method.
          in: path
          name: profile-number
          required: true
          schema:
            type: integer
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    number: 1
                    paymentMethodId: 402881836953a3c7016953aec290000d
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ModifiedStoredCredentialProfileResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Cancel a stored credential profile
      tags:
        - Payment Methods
      x-code-samples:
        - lang: Curl
          source: |
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" "https://rest.zuora.com/v1/payment-methods/{payment-method-id}/profiles/{profile-number}/cancel"
  "/v1/payment-methods/{payment-method-id}/profiles/{profile-number}/expire":
    post:
      description: |
        Expires a stored credential profile within a payment method.

        Expiring the stored credential profile indicates that the stored credentials are no longer valid, per an expiration policy in the stored credential transaction framework. You cannot reactivate the stored credential profile after you have expired it.

        **Note:** This feature is in the **Early Adopters** phase. We are actively soliciting feedback from a small set of early adopters before releasing as generally available.
      operationId: POST_ExpireStoredCredentialProfile
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            ID of a payment method.
          in: path
          name: payment-method-id
          required: true
          schema:
            type: string
        - description: |
            Number that identifies a stored credential profile within the payment method.
          in: path
          name: profile-number
          required: true
          schema:
            type: integer
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    number: 2
                    paymentMethodId: 402881836953a3c7016953aec290000d
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ModifiedStoredCredentialProfileResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Expire a stored credential profile
      tags:
        - Payment Methods
      x-code-samples:
        - lang: Curl
          source: |
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" "https://rest.zuora.com/v1/payment-methods/{payment-method-id}/profiles/{profile-number}/expire"
  "/v1/payment-methods/{payment-method-id}/scrub":
    put:
      description: |
        
        This operation enables you to replace all sensitive data in a payment method, related payment method snapshot table, and four related log tables with dummy values that will be stored in Zuora databases. 

        This operation will scrub the sensitive data and soft-delete the specified payment method at the same time. 

        If you want to delete or anonymize personal data in Zuora, you must scrub the payment method before anonymizing the associated account and contact. See [Delete or anonymize personal data](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Responding_to_individual_requests_for_access%2C_correction%2C_and_deletion_of_data_under_applicable_privacy_laws#Edit_and_correct_personal_data) for more information.

        **Note:** In order to use this operation, you must ensure that the **Scrub Sensitive Data of Specific Payment Method payments** permission is enabled in your user role. Contact your tenant administrator if you want to enable this permission. See [Scrub Payment Methods](https://knowledgecenter.zuora.com/CB_Billing/L_Payment_Methods/Scrub_Payment_Methods) for more information.
      operationId: PUT_ScrubPaymentMethods
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The ID of the payment method where you want to scrub the sensitive data.
          in: path
          name: payment-method-id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Scrub a payment method
      tags:
        - Payment Methods
      x-code-samples:
        - lang: Curl
          source: "curl -X PUT -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" -d '{}' \"https://rest.zuora.com/v1/payment-methods/{payment-method-id}/scrub\""
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/payment-methods/{payment-method-id}/scrub');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/payment-methods/{payment-method-id}/scrub")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/payment-methods/{payment-method-id}/scrub", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/payment-methods/{payment-method-id}/scrub")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/payment-methods/{payment-method-id}/scrub");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/payment-methods/{payment-method-id}/verify":
    put:
      description: |
        Sends an authorization request to the corresponding payment gateway to verify the payment method, even though no changes are made for the payment method. Supported payment methods are Credit Cards and Paypal.

        Zuora now supports performing a standalone zero dollar verification or one dollar authorization for credit cards. It also supports a billing agreement status check on PayPal payment methods.

        If a payment method is created by Hosted Payment Pages and is not assigned to any billing account, the payment method cannot be verified through this operation.
      operationId: PUT_VerifyPaymentMethods
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: |
            The ID of the payment method to be verified.
          in: path
          name: payment-method-id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTVerifyPaymentMethodType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    paymentMethodId: 402890765d9ce329015da18034ee0057
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PUTVerifyPaymentMethodResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Verify a payment method
      tags:
        - Payment Methods
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "gatewayOptions": {
                    "Comments": "test", 
                    "IPAddress": "192.168.1.1"
                }, 
                "paymentGatewayName": "Adyen", 
                "securityCode": "737"
            }' "https://rest.zuora.com/v1/payment-methods/{payment-method-id}/verify"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/payment-methods/{payment-method-id}/verify');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "gatewayOptions": {
                    "Comments": "test", 
                    "IPAddress": "192.168.1.1"
                }, 
                "paymentGatewayName": "Adyen", 
                "securityCode": "737"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"gatewayOptions\": {\n        \"Comments\": \"test\", \n        \"IPAddress\": \"192.168.1.1\"\n    }, \n    \"paymentGatewayName\": \"Adyen\", \n    \"securityCode\": \"737\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/payment-methods/{payment-method-id}/verify")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"gatewayOptions\": {\n        \"Comments\": \"test\", \n        \"IPAddress\": \"192.168.1.1\"\n    }, \n    \"paymentGatewayName\": \"Adyen\", \n    \"securityCode\": \"737\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/payment-methods/{payment-method-id}/verify", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/payment-methods/{payment-method-id}/verify")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"gatewayOptions\": {\n        \"Comments\": \"test\", \n        \"IPAddress\": \"192.168.1.1\"\n    }, \n    \"paymentGatewayName\": \"Adyen\", \n    \"securityCode\": \"737\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/payment-methods/{payment-method-id}/verify");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"gatewayOptions\": {\n        \"Comments\": \"test\", \n        \"IPAddress\": \"192.168.1.1\"\n    }, \n    \"paymentGatewayName\": \"Adyen\", \n    \"securityCode\": \"737\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/payment-methods/{payment-method-id}/voidAuthorize":
    post:
      description: |
        **Note:** If you wish to enable this feature, submit a request at [Zuora Global Support](http://support.zuora.com/). 

        Allows you to cancel an authorization. The payment gateways that support this operation include Verifi, CyberSource 1.28, CyberSource 1.97, Chase Paymentech Orbital, and Ingenico ePayments.
      operationId: POST_CancelAuthorization
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of the payment method where the authorization is cancelled.
          in: path
          name: payment-method-id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTVoidAuthorize"
        required: true
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTVoidAuthorizeResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Cancel authorization
      tags:
        - Payment Methods
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "accountId": "402881e861bd8a7e0161c6a453750026", 
                "accountNumber": "A00000004", 
                "gatewayOrderId": "A001", 
                "transactionId": "5205213224866613203009"
            }' "https://rest.zuora.com/v1/payment-methods/{payment-method-id}/voidAuthorize"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/payment-methods/{payment-method-id}/voidAuthorize');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "accountId": "402881e861bd8a7e0161c6a453750026", 
                "accountNumber": "A00000004", 
                "gatewayOrderId": "A001", 
                "transactionId": "5205213224866613203009"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"accountId\": \"402881e861bd8a7e0161c6a453750026\", \n    \"accountNumber\": \"A00000004\", \n    \"gatewayOrderId\": \"A001\", \n    \"transactionId\": \"5205213224866613203009\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/payment-methods/{payment-method-id}/voidAuthorize")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"accountId\": \"402881e861bd8a7e0161c6a453750026\", \n    \"accountNumber\": \"A00000004\", \n    \"gatewayOrderId\": \"A001\", \n    \"transactionId\": \"5205213224866613203009\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/payment-methods/{payment-method-id}/voidAuthorize", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/payment-methods/{payment-method-id}/voidAuthorize")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"accountId\": \"402881e861bd8a7e0161c6a453750026\", \n    \"accountNumber\": \"A00000004\", \n    \"gatewayOrderId\": \"A001\", \n    \"transactionId\": \"5205213224866613203009\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/payment-methods/{payment-method-id}/voidAuthorize");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"accountId\": \"402881e861bd8a7e0161c6a453750026\", \n    \"accountNumber\": \"A00000004\", \n    \"gatewayOrderId\": \"A001\", \n    \"transactionId\": \"5205213224866613203009\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/payment-runs:
    get:
      description: |
        Retrieves the information about all payment runs. You can define filterable fields to restrict the data returned in the response.

        ### Filtering

        You can use query parameters to restrict the data returned in the response. Each query parameter corresponds to one field in the response body.

        If the value of a filterable field is string, you can set the corresponding query parameter to `null` when filtering. Then, you can get the response data with this field value being `null`. 

        Examples:

        - /v1/payment-runs?status=Processed

        - /v1/payment-runs?targetDate=2017-10-10&status=Pending

        - /v1/payment-runs?status=Completed&sort=+updatedDate
      operationId: GET_PaymentRuns
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - description: |
            This parameter filters the response based on the `createdById` field.
          in: query
          name: createdById
          required: false
          schema:
            type: string
        - description: |
            This parameter filters the response based on the `createdDate` field.
          in: query
          name: createdDate
          required: false
          schema:
            format: date-time
            type: string
        - description: |
            This parameter filters the response based on the `status` field.
          in: query
          name: status
          required: false
          schema:
            enum:
              - Pending
              - Processing
              - Completed
              - Error
              - Canceled
            type: string
        - description: |
            This parameter filters the response based on the `targetDate` field.
          in: query
          name: targetDate
          required: false
          schema:
            format: date
            type: string
        - description: |
            This parameter filters the response based on the `updatedById` field.
          in: query
          name: updatedById
          required: false
          schema:
            type: string
        - description: |
            This parameter filters the response based on the `updatedDate` field.
          in: query
          name: updatedDate
          required: false
          schema:
            format: date-time
            type: string
        - description: |
            This parameter restricts the order of the data returned in the response. You can use this parameter to supply a dimension you want to sort on.

            A sortable field uses the following form: 

            *operator* *field_name*

            You can use at most two sortable fields in one URL path. Use a comma to separate sortable fields. For example:  *operator* *field_name*, *operator* *field_name*  

            *operator* is used to mark the order of sequencing. The operator is optional. If you only specify the sortable field without any operator, the response data is sorted in descending order by this field.

              - The `-` operator indicates an ascending order.
              - The `+` operator indicates a descending order.

            By default, the response data is displayed in descending order by payment run number.

            *field_name* indicates the name of a sortable field. The supported sortable fields of this operation are as below:

              - targetDate
              - status
              - createdDate
              - createdById
              - updatedDate
              - updatedById

            Examples:

            - /v1/payment-runs?sort=+createdDate

            - /v1/payment-runs?status=Processing&sort=-createdById,+targetDate
          in: query
          name: sort
          required: false
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    nextPage: /payment-runs?page=2
                    paymentRuns:
                      - applyCreditBalance: false
                        collectPayment: true
                        completedOn: 2017-12-28 13:00:00
                        consolidatedPayment: false
                        createdById: 2c92c0f956bc8fcb0156f8eee04b4d54
                        createdDate: 2017-12-27 13:00:00
                        executedOn: 2017-12-28 13:00:00
                        id: 2c92c0856078bbcb016096576ccb75ca
                        number: PR-00002121
                        processPaymentWithClosedPM: false
                        runDate: null
                        status: Completed
                        targetDate: 2017-12-28
                        updatedById: 2c92c0f956bc8fcb0156f8eee04b4d54
                        updatedDate: 2017-12-28 13:00:00
                    success: true
              schema:
                $ref: "#/components/schemas/GETPaymentRunCollectionType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List payment runs
      tags:
        - Payment Runs
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/payment-runs"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/payment-runs');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/payment-runs")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/payment-runs", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/payment-runs")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/payment-runs");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    post:
      description: |
        Creates a payment run. You can create a payment run to be executed immediately after it is created, or a scheduled payment run to be executed in future.

        To filter the payments to be collected for a payment run, you can use either of the following methods but not both:

          - Use the `accountId`, `batch`, `billCycleDay`, `currency`, `paymentGatewayId`, and `billingRunId` fields to define the billing documents to be collected.
          - Use the `data` field to specify the records of accounts and billing documents to be collected, in a more flexible manner.

        If no filter criteria are specified in the request body, the payment run collects payments for all accounts.
      operationId: POST_PaymentRun
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTPaymentRunRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    applyCreditBalance: false
                    collectPayment: true
                    completedOn: 2017-12-28 09:00:06
                    consolidatedPayment: false
                    createdById: 2c92c0f958fffd7d015914aeefc71a5d
                    createdDate: 2017-12-27 09:00:02
                    executedOn: 2017-12-28 09:00:06
                    id: 2c92c0856078bbcb0160957bbb8f0b32
                    number: PR-00002120
                    processPaymentWithClosedPM: false
                    runDate: null
                    status: Completed
                    success: true
                    targetDate: 2017-12-28
                    updatedById: 2c92c0f958fffd7d015914aeefc71a5d
                    updatedDate: 2017-12-28 09:00:06
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETPaymentRunType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Create a payment run
      tags:
        - Payment Runs
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "accountId": "402890245f097f39015f0e9fcdd60558", 
                "autoApplyCreditMemo": "true", 
                "autoApplyUnappliedPayment": "true", 
                "consolidatedPayment": "true", 
                "processPaymentWithClosedPM": "true", 
                "targetDate": "2017-10-10"
            }' "https://rest.zuora.com/v1/payment-runs"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/payment-runs');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "accountId": "402890245f097f39015f0e9fcdd60558", 
                "autoApplyCreditMemo": "true", 
                "autoApplyUnappliedPayment": "true", 
                "consolidatedPayment": "true", 
                "processPaymentWithClosedPM": "true", 
                "targetDate": "2017-10-10"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"accountId\": \"402890245f097f39015f0e9fcdd60558\", \n    \"autoApplyCreditMemo\": \"true\", \n    \"autoApplyUnappliedPayment\": \"true\", \n    \"consolidatedPayment\": \"true\", \n    \"processPaymentWithClosedPM\": \"true\", \n    \"targetDate\": \"2017-10-10\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/payment-runs")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"accountId\": \"402890245f097f39015f0e9fcdd60558\", \n    \"autoApplyCreditMemo\": \"true\", \n    \"autoApplyUnappliedPayment\": \"true\", \n    \"consolidatedPayment\": \"true\", \n    \"processPaymentWithClosedPM\": \"true\", \n    \"targetDate\": \"2017-10-10\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/payment-runs", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/payment-runs")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"accountId\": \"402890245f097f39015f0e9fcdd60558\", \n    \"autoApplyCreditMemo\": \"true\", \n    \"autoApplyUnappliedPayment\": \"true\", \n    \"consolidatedPayment\": \"true\", \n    \"processPaymentWithClosedPM\": \"true\", \n    \"targetDate\": \"2017-10-10\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/payment-runs");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"accountId\": \"402890245f097f39015f0e9fcdd60558\", \n    \"autoApplyCreditMemo\": \"true\", \n    \"autoApplyUnappliedPayment\": \"true\", \n    \"consolidatedPayment\": \"true\", \n    \"processPaymentWithClosedPM\": \"true\", \n    \"targetDate\": \"2017-10-10\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/payment-runs/{paymentRunId}":
    delete:
      description: |
        Deletes a payment run. Only payment runs with the Canceled or Error status can be deleted.
      operationId: DELETE_PaymentRun
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: |
            The unique ID of a payment run. For example, 402890245f097f39015f0f074a2e0566.
          in: path
          name: paymentRunId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Delete a payment run
      tags:
        - Payment Runs
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/payment-runs/{paymentRunId}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/payment-runs/{paymentRunId}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/payment-runs/{paymentRunId}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/v1/payment-runs/{paymentRunId}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/payment-runs/{paymentRunId}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/payment-runs/{paymentRunId}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      description: |
        Retrives the information about a specific payment run.
      operationId: GET_PaymentRun
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a payment run. For example, 402890245f097f39015f0f074a2e0566.
          in: path
          name: paymentRunId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    applyCreditBalance: false
                    collectPayment: true
                    completedOn: 2017-12-28 09:00:06
                    consolidatedPayment: false
                    createdById: 2c92c0f958fffd7d015914aeefc71a5d
                    createdDate: 2017-12-27 09:00:02
                    executedOn: 2017-12-28 09:00:06
                    id: 2c92c0856078bbcb0160957bbb8f0b32
                    number: PR-00002120
                    processPaymentWithClosedPM: false
                    runDate: null
                    status: Completed
                    success: true
                    targetDate: 2017-12-28
                    updatedById: 2c92c0f958fffd7d015914aeefc71a5d
                    updatedDate: 2017-12-28 09:00:06
              schema:
                $ref: "#/components/schemas/GETPaymentRunType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a payment run
      tags:
        - Payment Runs
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/payment-runs/{paymentRunId}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/payment-runs/{paymentRunId}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/payment-runs/{paymentRunId}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/payment-runs/{paymentRunId}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/payment-runs/{paymentRunId}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/payment-runs/{paymentRunId}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: |
        Updates the information about an unexecuted payment run. Only pending payment runs can be updated.

        If none of the **accountId**, **batch**, **billCycleDay**, **currency**, **paymentGatewayId**, and **billingRunId** fields is specified in the request body, the corresponding payment run collects payments for all accounts.
      operationId: PUT_PaymentRun
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a payment run. For example, 402890245f097f39015f0f074a2e0566.
          in: path
          name: paymentRunId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTPaymentRunRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 402890245f097f39015f0e9fcdd60558
                    autoApplyCreditMemo: true
                    autoApplyUnappliedPayment: true
                    collectPayment: true
                    completedOn: null
                    consolidatedPayment: true
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-09-22 12:37:22
                    executedOn: null
                    id: 402890245f097f39015f0f074a2e0566
                    number: PR-00000391
                    processPaymentWithClosedPM: true
                    rundate: null
                    status: Pending
                    success: true
                    targetDate: 2017-10-12
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-09-22 12:37:22
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETPaymentRunType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Update a payment run
      tags:
        - Payment Runs
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "autoApplyCreditMemo": "true", 
                "autoApplyUnappliedPayment": "true", 
                "consolidatedPayment": "true", 
                "processPaymentWithClosedPM": "true", 
                "targetDate": "2017-10-12"
            }' "https://rest.zuora.com/v1/payment-runs/{paymentRunId}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/payment-runs/{paymentRunId}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "autoApplyCreditMemo": "true", 
                "autoApplyUnappliedPayment": "true", 
                "consolidatedPayment": "true", 
                "processPaymentWithClosedPM": "true", 
                "targetDate": "2017-10-12"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"autoApplyCreditMemo\": \"true\", \n    \"autoApplyUnappliedPayment\": \"true\", \n    \"consolidatedPayment\": \"true\", \n    \"processPaymentWithClosedPM\": \"true\", \n    \"targetDate\": \"2017-10-12\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/payment-runs/{paymentRunId}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"autoApplyCreditMemo\": \"true\", \n    \"autoApplyUnappliedPayment\": \"true\", \n    \"consolidatedPayment\": \"true\", \n    \"processPaymentWithClosedPM\": \"true\", \n    \"targetDate\": \"2017-10-12\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/payment-runs/{paymentRunId}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/payment-runs/{paymentRunId}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"autoApplyCreditMemo\": \"true\", \n    \"autoApplyUnappliedPayment\": \"true\", \n    \"consolidatedPayment\": \"true\", \n    \"processPaymentWithClosedPM\": \"true\", \n    \"targetDate\": \"2017-10-12\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/payment-runs/{paymentRunId}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"autoApplyCreditMemo\": \"true\", \n    \"autoApplyUnappliedPayment\": \"true\", \n    \"consolidatedPayment\": \"true\", \n    \"processPaymentWithClosedPM\": \"true\", \n    \"targetDate\": \"2017-10-12\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/payment-runs/{paymentRunId}/data":
    get:
      description: |+
        Retrieves payment run data and the processing result with details, if the `data` field was specified in the Create payment run operation.
           
      operationId: GET_PaymentRunData
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: |
            The unique ID of a payment run. For example, 402890245f097f39015f0f074a2e0566.
          in: path
          name: paymentRunId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    data:
                      - accountId: 402881ed738ddf2001738def8db50058
                        amount: 80
                        amountCollected: 80
                        amountToCollect: 80
                        documentId: 402881ed738ddf2001738df388fd009e
                        documentType: Invoice
                        paymentGatewayId: 402881ed738ddf2001738def8b630050
                        paymentMethodId: 402881ed738ddf2001738def8e60005b
                        result: Processed
                        transactions:
                          - amount: 40
                            appliedAmount: 40
                            id: 402881ed738ddf2001738dfafad6012c
                            status: Processed
                            type: Payment
                          - appliedAmount: 10
                            id: 402881ed738ddf2001738df7572400e6
                            type: CreditMemo
                          - appliedAmount: 30
                            id: 402881ed738ddf2001738df715d800dd
                            type: UnappliedPayment
                      - accountId: 402881ed738ddf2001738def8db50058
                        amount: 70
                        amountCollected: 70
                        amountToCollect: 70
                        documentId: 402881ed738ddf2001738df5b90a00c0
                        documentType: DebitMemo
                        paymentGatewayId: 402881ed738ddf2001738def8b630050
                        paymentMethodId: 402881ed738ddf2001738df97dbe00fe
                        result: Processed
                        transactions:
                          - amount: 70
                            appliedAmount: 70
                            id: 402881ed738ddf2001738dfafcbd013b
                            status: Processed
                            type: Payment
                      - accountId: c49b85cd8ba742edb5ab4b3da90fc4c0
                        documentId: 7dab18d036dc4c94bbec853afb12affb
                        documentType: Invoice
                        errorCode: Invalid_Request_Data
                        errorMessage: Payment method is closed
                        paymentGatewayId: 768929c2f51947e79e73703bfc9bca7d
                        paymentMethodId: 1906df6f56f049c8b7457dc31f62d0ec
                        result: Error
                    success: true
              schema:
                $ref: "#/components/schemas/GETPaymentRunDataArrayResponse"
          description: ""
          headers:
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve payment run data
      tags:
        - Payment Runs
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/payment-runs/{paymentRunId}/data"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/payment-runs/{paymentRunId}/data');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/payment-runs/{paymentRunId}/data")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/payment-runs/{paymentRunId}/data", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/payment-runs/{paymentRunId}/data")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/payment-runs/{paymentRunId}/data");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/payment-runs/{paymentRunId}/summary":
    get:
      description: |
        Retrives the summary of a payment run.
      operationId: GET_PaymentRunSummary
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: |
            The unique ID of a payment run. For example, 402890245f097f39015f0f074a2e0566.
          in: path
          name: paymentRunId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    numberOfCreditBalanceAdjustments: 0
                    numberOfCreditMemos: 1
                    numberOfDebitMemos: 1
                    numberOfErrors: 0
                    numberOfInvoices: 0
                    numberOfPayments: 1
                    numberOfReceivables: 1
                    numberOfUnappliedPayments: 1
                    numberOfUnprocessedDebitMemos: 0
                    numberOfUnprocessedInvoices: 0
                    numberOfUnprocessedReceivables: 0
                    success: true
                    totalValues:
                      - totalValueOfCreditBalance: 0 USD
                        totalValueOfCreditMemos: 100 USD
                        totalValueOfDebitMemos: 256 USD
                        totalValueOfErrors: 0 USD
                        totalValueOfInvoices: 0 USD
                        totalValueOfPayments: 56 USD
                        totalValueOfReceivables: 256 USD
                        totalValueOfUnappliedPayments: 100 USD
                        totalValueOfUnprocessedDebitMemos: 0 USD
                        totalValueOfUnprocessedInvoices: 0 USD
                        totalValueOfUnprocessedReceivables: 0 USD
              schema:
                $ref: "#/components/schemas/GETPaymentRunSummaryResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a payment run summary
      tags:
        - Payment Runs
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/payment-runs/{paymentRunId}/summary"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/payment-runs/{paymentRunId}/summary');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/payment-runs/{paymentRunId}/summary")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/payment-runs/{paymentRunId}/summary", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/payment-runs/{paymentRunId}/summary")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/payment-runs/{paymentRunId}/summary");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  /v1/paymentgateways:
    get:
      description: |
        Retrieves the basic information about all the payment gateways.
      operationId: GET_Paymentgateways
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    paymentgateways:
                      - id: 4028905f5702783601570291e14c0015
                        isActive: true
                        isDefault: true
                        name: Test Gateway Adapter
                        type: Test Gateway
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETPaymentGatwaysResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List all payment gateways
      tags:
        - Payment Gateways
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/paymentgateways"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/paymentgateways');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/paymentgateways")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/paymentgateways", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/paymentgateways")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/paymentgateways");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  /v1/payments:
    get:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Retrieves the information about all payments from all your customer accounts.

        ### Filtering

        You can use query parameters to restrict the data returned in the response. Each query parameter corresponds to one field in the response body.

        If the value of a filterable field is string, you can set the corresponding query parameter to `null` when filtering. Then, you can get the response data with this field value being `null`.

        Examples:

        - /v1/payments?status=Processed

        - /v1/payments?currency=USD&status=Processed

        - /v1/payments?status=Processed&type=External&sort=+number
      operationId: GET_RetrieveAllPayments
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - description: |
            This parameter filters the response based on the `accountId` field.
          in: query
          name: accountId
          required: false
          schema:
            type: string
        - description: |
            This parameter filters the response based on the `amount` field.
          in: query
          name: amount
          required: false
          schema:
            format: double
            type: number
        - description: |
            This parameter filters the response based on the `appliedAmount` field.
          in: query
          name: appliedAmount
          required: false
          schema:
            format: double
            type: number
        - description: |
            This parameter filters the response based on the `createdById` field.
          in: query
          name: createdById
          required: false
          schema:
            type: string
        - description: |
            This parameter filters the response based on the `createdDate` field.
          in: query
          name: createdDate
          required: false
          schema:
            format: date-time
            type: string
        - description: |
            This parameter filters the response based on the `creditBalanceAmount` field.
          in: query
          name: creditBalanceAmount
          required: false
          schema:
            format: double
            type: number
        - description: |
            This parameter filters the response based on the `currency` field.
          in: query
          name: currency
          required: false
          schema:
            type: string
        - description: |
            This parameter filters the response based on the `effectiveDate` field.
          in: query
          name: effectiveDate
          required: false
          schema:
            format: date-time
            type: string
        - description: |
            This parameter filters the response based on the `number` field.
          in: query
          name: number
          required: false
          schema:
            type: string
        - description: |
            This parameter filters the response based on the `refundAmount` field.
          in: query
          name: refundAmount
          required: false
          schema:
            format: double
            type: number
        - description: |
            This parameter filters the response based on the `status` field.
          in: query
          name: status
          required: false
          schema:
            enum:
              - Draft
              - Processing
              - Processed
              - Error
              - Canceled
              - Posted
            type: string
        - description: |
            This parameter filters the response based on the `type` field.
          in: query
          name: type
          required: false
          schema:
            enum:
              - External
              - Electronic
            type: string
        - description: |
            This parameter filters the response based on the `unappliedAmount` field.
          in: query
          name: unappliedAmount
          required: false
          schema:
            format: double
            type: number
        - description: |
            This parameter filters the response based on the `updatedById` field.
          in: query
          name: updatedById
          required: false
          schema:
            type: string
        - description: |
            This parameter filters the response based on the `updatedDate` field.
          in: query
          name: updatedDate
          required: false
          schema:
            format: date-time
            type: string
        - description: |
            This parameter restricts the order of the data returned in the response. You can use this parameter to supply a dimension you want to sort on.

            A sortable field uses the following form: 

            *operator* *field_name*

            You can use at most two sortable fields in one URL path. Use a comma to separate sortable fields. For example:  *operator* *field_name*, *operator* *field_name*  

            *operator* is used to mark the order of sequencing. The operator is optional. If you only specify the sortable field without any operator, the response data is sorted in descending order by this field.

              - The `-` operator indicates an ascending order.
              - The `+` operator indicates a descending order.

            By default, the response data is displayed in descending order by payment number.

            *field_name* indicates the name of a sortable field. The supported sortable fields of this operation are as below:

              - number
              - accountId
              - amount
              - appliedAmount
              - unappliedAmount
              - refundAmount
              - creditBalanceAmount
              - effectiveDate
              - createdDate
              - createdById
              - updatedDate
              - updatedById
              
            Examples:

            - /v1/payments?sort=+number

            - /v1/payments?status=Processed&sort=-number,+amount
          in: query
          name: sort
          required: false
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    payments:
                      - accountId: 4028905f5a87c0ff015a87d25ae90025
                        amount: 44.1
                        appliedAmount: 44.1
                        authTransactionId: null
                        bankIdentificationNumber: null
                        cancelledOn: null
                        comment: normal payment
                        createdById: 402881e522cf4f9b0122cf5d82860002
                        createdDate: 2017-03-01 11:30:37
                        creditBalanceAmount: 0
                        currency: USD
                        effectiveDate: 2017-03-01
                        financeInformation:
                          bankAccountAccountingCode: null
                          bankAccountAccountingCodeType: null
                          transferredToAccounting: No
                          unappliedPaymentAccountingCode: null
                          unappliedPaymentAccountingCodeType: null
                        gatewayId: null
                        gatewayOrderId: null
                        gatewayReconciliationReason: null
                        gatewayReconciliationStatus: null
                        gatewayResponse: null
                        gatewayResponseCode: null
                        gatewayState: NotSubmitted
                        id: 4028905f5a87c0ff015a87eb6b75007f
                        markedForSubmissionOn: null
                        number: P-00000001
                        paymentMethodId: 402881e522cf4f9b0122cf5dc4020045
                        paymentMethodSnapshotId: null
                        payoutId: null
                        referenceId: null
                        refundAmount: 0
                        secondPaymentReferenceId: null
                        settledOn: null
                        softDescriptor: null
                        softDescriptorPhone: null
                        status: Processed
                        submittedOn: null
                        type: External
                        unappliedAmount: 0
                        updatedById: 402881e522cf4f9b0122cf5d82860002
                        updatedDate: 2017-03-01 11:30:37
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PaymentCollectionResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List payments
      tags:
        - Payments
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/payments"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/payments');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/payments")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/payments", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/payments")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/payments");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    post:
      description: |+
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Creates a payment in the following scenarios:

        - A full or partial payment on an invoice or a debit memo
        - A full or partial payment on several invoices and debit memos
        - An unapplied payment in the following situations:
          - You do not know which customer account the payment belongs to.
          - You know which customer account the payment belongs to, but you do not know which invoice the payment is applied to.
          - You receive a payment from your customer that exceeds the balance on the invoice.
          - You receive a payment from your customer before the invoice has been created.
          - You intend to create a payment without any invoices or debit memos.
        - A standalone payment. If you only need to create and process an electronic payment in Zuora through a Zuora gateway integration but settle the payment outside of Zuora, you can create a standalone payment. For a standalone payment, you can specify a currency different from the payment currency in the customer account settings. 

          The support for standalone payments is in the Early Adopter phase. If you want to use this feature, submit a request at [Zuora Global Support](http://support.zuora.com/) to enable it.

        If you do not know to which customer account the payment belongs, you can create a payment without specifying a customer account.

        When you create a payment, the total number of invoice items and debit memo items that the payment will apply to should be less than or equal to 10,000.

        For more information, see [Create Payments](https://knowledgecenter.zuora.com/CB_Billing/Invoice_Settlement/A_Unapplied_Payments/Management_of_Unapplied_Payments/AA_Create_Payments) and [Create Payments Without Specifying Customer Accounts](https://knowledgecenter.zuora.com/CB_Billing/Invoice_Settlement/A_Unapplied_Payments/Management_of_Unapplied_Payments/AA_Create_Payments_Without_Specifying_Customer_Accounts).
            
      operationId: POST_CreatePayment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/CreatePaymentType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 4028905f5a87c0ff015a87d25ae90025
                    amount: 44.1
                    appliedAmount: 44.1
                    authTransactionId: null
                    bankIdentificationNumber: null
                    cancelledOn: null
                    comment: normal payment
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-03-01 11:30:37
                    creditBalanceAmount: 0
                    currency: USD
                    effectiveDate: 2017-03-01
                    financeInformation:
                      bankAccountAccountingCode: null
                      bankAccountAccountingCodeType: null
                      transferredToAccounting: No
                      unappliedPaymentAccountingCode: null
                      unappliedPaymentAccountingCodeType: null
                    gatewayId: null
                    gatewayOrderId: null
                    gatewayReconciliationReason: null
                    gatewayReconciliationStatus: null
                    gatewayResponse: null
                    gatewayResponseCode: null
                    gatewayState: NotSubmitted
                    id: 4028905f5a87c0ff015a87eb6b75007f
                    markedForSubmissionOn: null
                    number: P-00000001
                    paymentMethodId: 402881e522cf4f9b0122cf5dc4020045
                    paymentMethodSnapshotId: null
                    payoutId: null
                    referenceId: null
                    refundAmount: 0
                    secondPaymentReferenceId: null
                    settledOn: null
                    softDescriptor: null
                    softDescriptorPhone: null
                    status: Processed
                    submittedOn: null
                    success: true
                    type: External
                    unappliedAmount: 0
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 11:30:37
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETARPaymentType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Create a payment
      tags:
        - Payments
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "accountId": "4028905f5a87c0ff015a87d25ae90025", 
                "amount": 44.1, 
                "comment": "normal payment", 
                "currency": "USD", 
                "debitMemos": [
                    {
                        "amount": 4.1, 
                        "debitMemoId": "4028905f5a87c0ff015a87e49e6b0062", 
                        "items": [
                            {
                                "amount": 4, 
                                "debitMemoItemId": "4028905f5a87c0ff015a87e49e7a0063"
                            }, 
                            {
                                "amount": 0.1, 
                                "taxItemId": "4028905f5a87c0ff015a87e49f5e0065"
                            }
                        ]
                    }
                ], 
                "effectiveDate": "2017-03-01", 
                "invoices": [
                    {
                        "amount": 40, 
                        "invoiceId": "4028905f5a87c0ff015a87d3f8f10043", 
                        "items": [
                            {
                                "amount": 39, 
                                "invoiceItemId": "4028905f5a87c0ff015a87d3f90c0045"
                            }, 
                            {
                                "amount": 1, 
                                "taxItemId": "4028905f5a87c0ff015a87d3f884003f"
                            }
                        ]
                    }
                ], 
                "paymentMethodId": "402881e522cf4f9b0122cf5dc4020045", 
                "type": "External"
            }' "https://rest.zuora.com/v1/payments"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/payments');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "accountId": "4028905f5a87c0ff015a87d25ae90025", 
                "amount": 44.1, 
                "comment": "normal payment", 
                "currency": "USD", 
                "debitMemos": [
                    {
                        "amount": 4.1, 
                        "debitMemoId": "4028905f5a87c0ff015a87e49e6b0062", 
                        "items": [
                            {
                                "amount": 4, 
                                "debitMemoItemId": "4028905f5a87c0ff015a87e49e7a0063"
                            }, 
                            {
                                "amount": 0.1, 
                                "taxItemId": "4028905f5a87c0ff015a87e49f5e0065"
                            }
                        ]
                    }
                ], 
                "effectiveDate": "2017-03-01", 
                "invoices": [
                    {
                        "amount": 40, 
                        "invoiceId": "4028905f5a87c0ff015a87d3f8f10043", 
                        "items": [
                            {
                                "amount": 39, 
                                "invoiceItemId": "4028905f5a87c0ff015a87d3f90c0045"
                            }, 
                            {
                                "amount": 1, 
                                "taxItemId": "4028905f5a87c0ff015a87d3f884003f"
                            }
                        ]
                    }
                ], 
                "paymentMethodId": "402881e522cf4f9b0122cf5dc4020045", 
                "type": "External"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"accountId\": \"4028905f5a87c0ff015a87d25ae90025\", \n    \"amount\": 44.1, \n    \"comment\": \"normal payment\", \n    \"currency\": \"USD\", \n    \"debitMemos\": [\n        {\n            \"amount\": 4.1, \n            \"debitMemoId\": \"4028905f5a87c0ff015a87e49e6b0062\", \n            \"items\": [\n                {\n                    \"amount\": 4, \n                    \"debitMemoItemId\": \"4028905f5a87c0ff015a87e49e7a0063\"\n                }, \n                {\n                    \"amount\": 0.1, \n                    \"taxItemId\": \"4028905f5a87c0ff015a87e49f5e0065\"\n                }\n            ]\n        }\n    ], \n    \"effectiveDate\": \"2017-03-01\", \n    \"invoices\": [\n        {\n            \"amount\": 40, \n            \"invoiceId\": \"4028905f5a87c0ff015a87d3f8f10043\", \n            \"items\": [\n                {\n                    \"amount\": 39, \n                    \"invoiceItemId\": \"4028905f5a87c0ff015a87d3f90c0045\"\n                }, \n                {\n                    \"amount\": 1, \n                    \"taxItemId\": \"4028905f5a87c0ff015a87d3f884003f\"\n                }\n            ]\n        }\n    ], \n    \"paymentMethodId\": \"402881e522cf4f9b0122cf5dc4020045\", \n    \"type\": \"External\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/payments")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"accountId\": \"4028905f5a87c0ff015a87d25ae90025\", \n    \"amount\": 44.1, \n    \"comment\": \"normal payment\", \n    \"currency\": \"USD\", \n    \"debitMemos\": [\n        {\n            \"amount\": 4.1, \n            \"debitMemoId\": \"4028905f5a87c0ff015a87e49e6b0062\", \n            \"items\": [\n                {\n                    \"amount\": 4, \n                    \"debitMemoItemId\": \"4028905f5a87c0ff015a87e49e7a0063\"\n                }, \n                {\n                    \"amount\": 0.1, \n                    \"taxItemId\": \"4028905f5a87c0ff015a87e49f5e0065\"\n                }\n            ]\n        }\n    ], \n    \"effectiveDate\": \"2017-03-01\", \n    \"invoices\": [\n        {\n            \"amount\": 40, \n            \"invoiceId\": \"4028905f5a87c0ff015a87d3f8f10043\", \n            \"items\": [\n                {\n                    \"amount\": 39, \n                    \"invoiceItemId\": \"4028905f5a87c0ff015a87d3f90c0045\"\n                }, \n                {\n                    \"amount\": 1, \n                    \"taxItemId\": \"4028905f5a87c0ff015a87d3f884003f\"\n                }\n            ]\n        }\n    ], \n    \"paymentMethodId\": \"402881e522cf4f9b0122cf5dc4020045\", \n    \"type\": \"External\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/payments", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/payments")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"accountId\": \"4028905f5a87c0ff015a87d25ae90025\", \n    \"amount\": 44.1, \n    \"comment\": \"normal payment\", \n    \"currency\": \"USD\", \n    \"debitMemos\": [\n        {\n            \"amount\": 4.1, \n            \"debitMemoId\": \"4028905f5a87c0ff015a87e49e6b0062\", \n            \"items\": [\n                {\n                    \"amount\": 4, \n                    \"debitMemoItemId\": \"4028905f5a87c0ff015a87e49e7a0063\"\n                }, \n                {\n                    \"amount\": 0.1, \n                    \"taxItemId\": \"4028905f5a87c0ff015a87e49f5e0065\"\n                }\n            ]\n        }\n    ], \n    \"effectiveDate\": \"2017-03-01\", \n    \"invoices\": [\n        {\n            \"amount\": 40, \n            \"invoiceId\": \"4028905f5a87c0ff015a87d3f8f10043\", \n            \"items\": [\n                {\n                    \"amount\": 39, \n                    \"invoiceItemId\": \"4028905f5a87c0ff015a87d3f90c0045\"\n                }, \n                {\n                    \"amount\": 1, \n                    \"taxItemId\": \"4028905f5a87c0ff015a87d3f884003f\"\n                }\n            ]\n        }\n    ], \n    \"paymentMethodId\": \"402881e522cf4f9b0122cf5dc4020045\", \n    \"type\": \"External\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/payments");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"accountId\": \"4028905f5a87c0ff015a87d25ae90025\", \n    \"amount\": 44.1, \n    \"comment\": \"normal payment\", \n    \"currency\": \"USD\", \n    \"debitMemos\": [\n        {\n            \"amount\": 4.1, \n            \"debitMemoId\": \"4028905f5a87c0ff015a87e49e6b0062\", \n            \"items\": [\n                {\n                    \"amount\": 4, \n                    \"debitMemoItemId\": \"4028905f5a87c0ff015a87e49e7a0063\"\n                }, \n                {\n                    \"amount\": 0.1, \n                    \"taxItemId\": \"4028905f5a87c0ff015a87e49f5e0065\"\n                }\n            ]\n        }\n    ], \n    \"effectiveDate\": \"2017-03-01\", \n    \"invoices\": [\n        {\n            \"amount\": 40, \n            \"invoiceId\": \"4028905f5a87c0ff015a87d3f8f10043\", \n            \"items\": [\n                {\n                    \"amount\": 39, \n                    \"invoiceItemId\": \"4028905f5a87c0ff015a87d3f90c0045\"\n                }, \n                {\n                    \"amount\": 1, \n                    \"taxItemId\": \"4028905f5a87c0ff015a87d3f884003f\"\n                }\n            ]\n        }\n    ], \n    \"paymentMethodId\": \"402881e522cf4f9b0122cf5dc4020045\", \n    \"type\": \"External\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/payments/{paymentId}":
    delete:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Deletes a payment. Only payments with the Cancelled status can be deleted. 

        If you have the Invoice Settlement feature enabled, overpayments applied to credit balance cannot be deleted.
      operationId: DELETE_Payment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of an unapplied payment. For example, 8a8082e65b27f6c3015b89e4344c16b1.
          in: path
          name: paymentId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Delete a payment
      tags:
        - Payments
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/payments/{paymentId}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/payments/{paymentId}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/payments/{paymentId}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/v1/payments/{paymentId}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/payments/{paymentId}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/payments/{paymentId}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Retrieves the information about one specific payment.
      operationId: GET_Payment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a payment. For example, 8a8082e65b27f6c3015b89e4344c16b1.
          in: path
          name: paymentId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 4028905f5a87c0ff015a87d25ae90025
                    amount: 44.1
                    appliedAmount: 44.1
                    authTransactionId: null
                    bankIdentificationNumber: null
                    cancelledOn: null
                    comment: normal payment
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-03-01 11:30:37
                    creditBalanceAmount: 0
                    currency: USD
                    effectiveDate: 2017-03-01
                    financeInformation:
                      bankAccountAccountingCode: null
                      bankAccountAccountingCodeType: null
                      transferredToAccounting: No
                      unappliedPaymentAccountingCode: null
                      unappliedPaymentAccountingCodeType: null
                    gatewayId: null
                    gatewayOrderId: null
                    gatewayReconciliationReason: null
                    gatewayReconciliationStatus: null
                    gatewayResponse: null
                    gatewayResponseCode: null
                    gatewayState: NotSubmitted
                    id: 4028905f5a87c0ff015a87eb6b75007f
                    markedForSubmissionOn: null
                    number: P-00000001
                    paymentMethodId: 402881e522cf4f9b0122cf5dc4020045
                    paymentMethodSnapshotId: null
                    payoutId: null
                    referenceId: null
                    refundAmount: 0
                    secondPaymentReferenceId: null
                    settledOn: null
                    softDescriptor: null
                    softDescriptorPhone: null
                    status: Processed
                    submittedOn: null
                    success: true
                    type: External
                    unappliedAmount: 0
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 11:30:37
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETARPaymentType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a payment
      tags:
        - Payments
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/payments/{paymentId}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/payments/{paymentId}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/payments/{paymentId}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/payments/{paymentId}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/payments/{paymentId}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/payments/{paymentId}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Updates a payment.
      operationId: PUT_UpdatePayment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of an unapplied payment. For example, 8a8082e65b27f6c3015b89e4344c16b1.
          in: path
          name: paymentId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/UpdatePaymentType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 4028905f5a87c0ff015a88889fe500a8
                    amount: 44.1
                    appliedAmount: 0
                    authTransactionId: null
                    bankIdentificationNumber: null
                    cancelledOn: null
                    comment: new comment
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-03-01 11:30:37
                    creditBalanceAmount: 0
                    currency: USD
                    effectiveDate: 2017-03-01
                    financeInformation:
                      bankAccountAccountingCode: null
                      bankAccountAccountingCodeType: null
                      transferredToAccounting: No
                      unappliedPaymentAccountingCode: null
                      unappliedPaymentAccountingCodeType: null
                    gatewayId: null
                    gatewayOrderId: null
                    gatewayReconciliationReason: null
                    gatewayReconciliationStatus: null
                    gatewayResponse: null
                    gatewayResponseCode: null
                    gatewayState: NotSubmitted
                    id: 4028905f5a87c0ff015a87eb6b75007f
                    markedForSubmissionOn: null
                    number: P-00000001
                    paymentMethodId: 402881e522cf4f9b0122cf5dc4020045
                    paymentMethodSnapshotId: null
                    payoutId: null
                    referenceId: null
                    refundAmount: 0
                    secondPaymentReferenceId: null
                    settledOn: null
                    softDescriptor: null
                    softDescriptorPhone: null
                    status: Processed
                    submittedOn: null
                    success: true
                    type: External
                    unappliedAmount: 44.1
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 14:25:34
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETARPaymentType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Update a payment
      tags:
        - Payments
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "comment": "new comment", 
                "financeInformation": {
                    "transferredToAccounting": "No"
                }
            }' "https://rest.zuora.com/v1/payments/{paymentId}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/payments/{paymentId}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "comment": "new comment", 
                "financeInformation": {
                    "transferredToAccounting": "No"
                }
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"comment\": \"new comment\", \n    \"financeInformation\": {\n        \"transferredToAccounting\": \"No\"\n    }\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/payments/{paymentId}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"comment\": \"new comment\", \n    \"financeInformation\": {\n        \"transferredToAccounting\": \"No\"\n    }\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/payments/{paymentId}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/payments/{paymentId}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"comment\": \"new comment\", \n    \"financeInformation\": {\n        \"transferredToAccounting\": \"No\"\n    }\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/payments/{paymentId}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"comment\": \"new comment\", \n    \"financeInformation\": {\n        \"transferredToAccounting\": \"No\"\n    }\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/payments/{paymentId}/apply":
    put:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Applies an unapplied payment to invoices and debit memos.

        When you apply a payment, the total number of invoice items and debit memo items that the payment will apply to must be less than or equal to 10,000.
                
        If the limit is hit, you can follow the instructions:
        - If you want to apply one payment to multiple invoices or debit memos, decrease the number of invoices or debit memos in the request.
        - If you want to apply one payment to a single invoice or debit memo with a large volume of items, you have to specify invoice items in the request. The maximum number of invoice items that you can specify in the request is 1,000.

        For more information, see [Apply Unapplied Payments to Invoices and Debit Memos](https://knowledgecenter.zuora.com/CB_Billing/Invoice_Settlement/A_Unapplied_Payments/Management_of_Unapplied_Payments/Apply_Unapplied_Payments_to_Invoices_and_Debit_Memos).
      operationId: PUT_ApplyPayment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of an unapplied payment. For example, 8a8082e65b27f6c3015b89e4344c16b1.
          in: path
          name: paymentId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/ApplyPaymentType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 4028905f5a87c0ff015a87d25ae90025
                    amount: 44.1
                    appliedAmount: 44.1
                    authTransactionId: null
                    bankIdentificationNumber: null
                    cancelledOn: null
                    comment: normal payment
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-03-01 11:30:37
                    creditBalanceAmount: 0
                    currency: USD
                    effectiveDate: 2017-03-01
                    financeInformation:
                      bankAccountAccountingCode: null
                      bankAccountAccountingCodeType: null
                      transferredToAccounting: No
                      unappliedPaymentAccountingCode: null
                      unappliedPaymentAccountingCodeType: null
                    gatewayId: null
                    gatewayOrderId: null
                    gatewayReconciliationReason: null
                    gatewayReconciliationStatus: null
                    gatewayResponse: null
                    gatewayResponseCode: null
                    gatewayState: NotSubmitted
                    id: 4028905f5a87c0ff015a87eb6b75007f
                    markedForSubmissionOn: null
                    number: P-00000001
                    paymentMethodId: 402881e522cf4f9b0122cf5dc4020045
                    paymentMethodSnapshotId: null
                    payoutId: null
                    referenceId: null
                    refundAmount: 0
                    secondPaymentReferenceId: null
                    settledOn: null
                    softDescriptor: null
                    softDescriptorPhone: null
                    status: Processed
                    submittedOn: null
                    success: true
                    type: External
                    unappliedAmount: 0
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 13:56:15
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETARPaymentType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Apply a payment
      tags:
        - Payments
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "debitMemos": [
                    {
                        "amount": 1.02, 
                        "debitMemoId": "4028905f5a87c0ff015a87e49e6b0062", 
                        "items": [
                            {
                                "amount": 1, 
                                "debitMemoItemId": "4028905f5a87c0ff015a87e49e7a0063"
                            }, 
                            {
                                "amount": 0.02, 
                                "taxItemId": "4028905f5a87c0ff015a87e49f5e0065"
                            }
                        ]
                    }
                ], 
                "effectiveDate": "2017-03-01", 
                "invoices": [
                    {
                        "amount": 10.1, 
                        "invoiceId": "4028905f5a87c0ff015a87d3f8f10043", 
                        "items": [
                            {
                                "amount": 10, 
                                "invoiceItemId": "4028905f5a87c0ff015a87d3f90c0045"
                            }, 
                            {
                                "amount": 0.1, 
                                "taxItemId": "4028905f5a87c0ff015a87d3f884003f"
                            }
                        ]
                    }
                ]
            }' "https://rest.zuora.com/v1/payments/{paymentId}/apply"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/payments/{paymentId}/apply');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "debitMemos": [
                    {
                        "amount": 1.02, 
                        "debitMemoId": "4028905f5a87c0ff015a87e49e6b0062", 
                        "items": [
                            {
                                "amount": 1, 
                                "debitMemoItemId": "4028905f5a87c0ff015a87e49e7a0063"
                            }, 
                            {
                                "amount": 0.02, 
                                "taxItemId": "4028905f5a87c0ff015a87e49f5e0065"
                            }
                        ]
                    }
                ], 
                "effectiveDate": "2017-03-01", 
                "invoices": [
                    {
                        "amount": 10.1, 
                        "invoiceId": "4028905f5a87c0ff015a87d3f8f10043", 
                        "items": [
                            {
                                "amount": 10, 
                                "invoiceItemId": "4028905f5a87c0ff015a87d3f90c0045"
                            }, 
                            {
                                "amount": 0.1, 
                                "taxItemId": "4028905f5a87c0ff015a87d3f884003f"
                            }
                        ]
                    }
                ]
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"debitMemos\": [\n        {\n            \"amount\": 1.02, \n            \"debitMemoId\": \"4028905f5a87c0ff015a87e49e6b0062\", \n            \"items\": [\n                {\n                    \"amount\": 1, \n                    \"debitMemoItemId\": \"4028905f5a87c0ff015a87e49e7a0063\"\n                }, \n                {\n                    \"amount\": 0.02, \n                    \"taxItemId\": \"4028905f5a87c0ff015a87e49f5e0065\"\n                }\n            ]\n        }\n    ], \n    \"effectiveDate\": \"2017-03-01\", \n    \"invoices\": [\n        {\n            \"amount\": 10.1, \n            \"invoiceId\": \"4028905f5a87c0ff015a87d3f8f10043\", \n            \"items\": [\n                {\n                    \"amount\": 10, \n                    \"invoiceItemId\": \"4028905f5a87c0ff015a87d3f90c0045\"\n                }, \n                {\n                    \"amount\": 0.1, \n                    \"taxItemId\": \"4028905f5a87c0ff015a87d3f884003f\"\n                }\n            ]\n        }\n    ]\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/payments/{paymentId}/apply")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"debitMemos\": [\n        {\n            \"amount\": 1.02, \n            \"debitMemoId\": \"4028905f5a87c0ff015a87e49e6b0062\", \n            \"items\": [\n                {\n                    \"amount\": 1, \n                    \"debitMemoItemId\": \"4028905f5a87c0ff015a87e49e7a0063\"\n                }, \n                {\n                    \"amount\": 0.02, \n                    \"taxItemId\": \"4028905f5a87c0ff015a87e49f5e0065\"\n                }\n            ]\n        }\n    ], \n    \"effectiveDate\": \"2017-03-01\", \n    \"invoices\": [\n        {\n            \"amount\": 10.1, \n            \"invoiceId\": \"4028905f5a87c0ff015a87d3f8f10043\", \n            \"items\": [\n                {\n                    \"amount\": 10, \n                    \"invoiceItemId\": \"4028905f5a87c0ff015a87d3f90c0045\"\n                }, \n                {\n                    \"amount\": 0.1, \n                    \"taxItemId\": \"4028905f5a87c0ff015a87d3f884003f\"\n                }\n            ]\n        }\n    ]\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/payments/{paymentId}/apply", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/payments/{paymentId}/apply")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"debitMemos\": [\n        {\n            \"amount\": 1.02, \n            \"debitMemoId\": \"4028905f5a87c0ff015a87e49e6b0062\", \n            \"items\": [\n                {\n                    \"amount\": 1, \n                    \"debitMemoItemId\": \"4028905f5a87c0ff015a87e49e7a0063\"\n                }, \n                {\n                    \"amount\": 0.02, \n                    \"taxItemId\": \"4028905f5a87c0ff015a87e49f5e0065\"\n                }\n            ]\n        }\n    ], \n    \"effectiveDate\": \"2017-03-01\", \n    \"invoices\": [\n        {\n            \"amount\": 10.1, \n            \"invoiceId\": \"4028905f5a87c0ff015a87d3f8f10043\", \n            \"items\": [\n                {\n                    \"amount\": 10, \n                    \"invoiceItemId\": \"4028905f5a87c0ff015a87d3f90c0045\"\n                }, \n                {\n                    \"amount\": 0.1, \n                    \"taxItemId\": \"4028905f5a87c0ff015a87d3f884003f\"\n                }\n            ]\n        }\n    ]\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/payments/{paymentId}/apply");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"debitMemos\": [\n        {\n            \"amount\": 1.02, \n            \"debitMemoId\": \"4028905f5a87c0ff015a87e49e6b0062\", \n            \"items\": [\n                {\n                    \"amount\": 1, \n                    \"debitMemoItemId\": \"4028905f5a87c0ff015a87e49e7a0063\"\n                }, \n                {\n                    \"amount\": 0.02, \n                    \"taxItemId\": \"4028905f5a87c0ff015a87e49f5e0065\"\n                }\n            ]\n        }\n    ], \n    \"effectiveDate\": \"2017-03-01\", \n    \"invoices\": [\n        {\n            \"amount\": 10.1, \n            \"invoiceId\": \"4028905f5a87c0ff015a87d3f8f10043\", \n            \"items\": [\n                {\n                    \"amount\": 10, \n                    \"invoiceItemId\": \"4028905f5a87c0ff015a87d3f90c0045\"\n                }, \n                {\n                    \"amount\": 0.1, \n                    \"taxItemId\": \"4028905f5a87c0ff015a87d3f884003f\"\n                }\n            ]\n        }\n    ]\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/payments/{paymentId}/cancel":
    put:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Cancels a payment. 

        If you have the Invoice Settlement feature enabled, overpayments applied to credit balance cannot be cancelled.
      operationId: PUT_CancelPayment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of an unapplied payment. For example, 8a8082e65b27f6c3015b89e4344c16b1.
          in: path
          name: paymentId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 4028905f5a87c0ff015a88889fe500a8
                    amount: 44.1
                    appliedAmount: 0
                    authTransactionId: null
                    bankIdentificationNumber: null
                    cancelledOn: null
                    comment: new comment
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-03-01 11:30:37
                    creditBalanceAmount: 0
                    currency: USD
                    effectiveDate: 2017-03-01
                    financeInformation:
                      bankAccountAccountingCode: null
                      bankAccountAccountingCodeType: null
                      transferredToAccounting: No
                      unappliedPaymentAccountingCode: null
                      unappliedPaymentAccountingCodeType: null
                    gatewayId: null
                    gatewayOrderId: null
                    gatewayReconciliationReason: null
                    gatewayReconciliationStatus: null
                    gatewayResponse: null
                    gatewayResponseCode: null
                    gatewayState: NotSubmitted
                    id: 4028905f5a87c0ff015a87eb6b75007f
                    markedForSubmissionOn: null
                    number: P-00000001
                    paymentMethodId: 402881e522cf4f9b0122cf5dc4020045
                    paymentMethodSnapshotId: null
                    payoutId: null
                    referenceId: null
                    refundAmount: 0
                    secondPaymentReferenceId: null
                    settledOn: null
                    softDescriptor: null
                    softDescriptorPhone: null
                    status: Canceled
                    submittedOn: null
                    success: true
                    type: External
                    unappliedAmount: 44.1
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 14:26:57
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETARPaymentType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Cancel a payment
      tags:
        - Payments
      x-code-samples:
        - lang: Curl
          source: "curl -X PUT -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" -d '{}' \"https://rest.zuora.com/v1/payments/{paymentId}/cancel\""
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/payments/{paymentId}/cancel');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/payments/{paymentId}/cancel")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/payments/{paymentId}/cancel", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/payments/{paymentId}/cancel")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/payments/{paymentId}/cancel");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/payments/{paymentId}/parts":
    get:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Retrieves the information about all parts of a payment. A payment can consist of an unapplied part, and several parts applied to invoices and debit memos. You can use this operation to get all the applied and unapplied portions of a payment.
      operationId: GET_PaymentParts
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - description: |
            The unique ID of a payment. For example, 8a8082e65b27f6c3015b89e4344c16b1.
          in: path
          name: paymentId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    parts:
                      - amount: 4.1
                        createdById: 402881e522cf4f9b0122cf5d82860002
                        createdDate: 2017-03-01 11:30:37
                        debitMemoId: 4028905f5a87c0ff015a87e49e6b0062
                        id: 4028905f5a87c0ff015a87eb6beb008d
                        invoiceId: null
                        updatedById: 402881e522cf4f9b0122cf5d82860002
                        updatedDate: 2017-03-01 11:30:37
                      - amount: 40
                        createdById: 402881e522cf4f9b0122cf5d82860002
                        createdDate: 2017-03-01 11:30:37
                        debitMemoId: null
                        id: 4028905f5a87c0ff015a87eb6beb008c
                        invoiceId: 4028905f5a87c0ff015a87d3f8f10043
                        updatedById: 402881e522cf4f9b0122cf5d82860002
                        updatedDate: 2017-03-01 11:30:37
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETPaymentPartsCollectionType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List all parts of a payment
      tags:
        - Payments
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/payments/{paymentId}/parts"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/payments/{paymentId}/parts');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/payments/{paymentId}/parts")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/payments/{paymentId}/parts", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/payments/{paymentId}/parts")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/payments/{paymentId}/parts");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/payments/{paymentId}/parts/{partid}":
    get:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Retrieves the information about a specific payment part. A payment can consist of an unapplied part, and several parts applied to invoices and debit memos.
      operationId: GET_PaymentPart
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a specific payment part. You can get the payment part ID from the response of [List all parts of a payment](https://www.zuora.com/developer/api-reference/#operation/GET_PaymentParts).
          in: path
          name: partid
          required: true
          schema:
            type: string
        - description: |
            The unique ID of a payment. For example, 8a8082e65b27f6c3015b89e4344c16b1.
          in: path
          name: paymentId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    amount: 4.1
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-03-01 11:30:37
                    debitMemoId: 4028905f5a87c0ff015a87e49e6b0062
                    id: 4028905f5a87c0ff015a87eb6beb008d
                    invoiceId: null
                    success: true
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 11:30:37
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETPaymentPartType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a payment part
      tags:
        - Payments
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/payments/{paymentId}/parts/{partid}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/payments/{paymentId}/parts/{partid}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/payments/{paymentId}/parts/{partid}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/payments/{paymentId}/parts/{partid}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/payments/{paymentId}/parts/{partid}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/payments/{paymentId}/parts/{partid}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/payments/{paymentId}/parts/{partid}/itemparts":
    get:
      description: |
        **Note:** This operation is only available if you have the [Invoice Item Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/C_Invoice_Item_Settlement) feature enabled. Invoice Item Settlement must be used together with other Invoice Settlement features (Unapplied Payments, and Credit and Debit memos).  If you wish to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Retrieves the information about all items of a payment part. A payment part item is a single line item in a payment part. A payment part can consist of several different types of items.
      operationId: GET_PaymentItemParts
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - description: |
            The unique ID of a specific payment part. You can get the payment part ID from the response of [List all parts of a payment](https://www.zuora.com/developer/api-reference/#operation/GET_PaymentParts).
          in: path
          name: partid
          required: true
          schema:
            type: string
        - description: |
            The unique ID of a payment. For example, 8a8082e65b27f6c3015b89e4344c16b1.
          in: path
          name: paymentId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    itemParts:
                      - amount: 4
                        createdById: 402881e522cf4f9b0122cf5d82860002
                        createdDate: 2017-03-01 11:30:37
                        debitMemoItemId: 4028905f5a87c0ff015a87e49e7a0063
                        id: 4028905f5a87c0ff015a87eb6bd8008a
                        invoiceItemId: null
                        taxItemId: null
                        updatedById: 402881e522cf4f9b0122cf5d82860002
                        updatedDate: 2017-03-01 11:30:37
                      - amount: 0.1
                        createdById: 402881e522cf4f9b0122cf5d82860002
                        createdDate: 2017-03-01 11:30:37
                        debitMemoItemId: null
                        id: 4028905f5a87c0ff015a87eb6bd8008b
                        invoiceItemId: null
                        taxItemId: 4028905f5a87c0ff015a87e49f5e0065
                        updatedById: 402881e522cf4f9b0122cf5d82860002
                        updatedDate: 2017-03-01 11:30:37
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETPaymentItemPartCollectionType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List all payment part items
      tags:
        - Payments
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/payments/{paymentId}/parts/{partid}/itemparts"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/payments/{paymentId}/parts/{partid}/itemparts');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/payments/{paymentId}/parts/{partid}/itemparts")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/payments/{paymentId}/parts/{partid}/itemparts", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/payments/{paymentId}/parts/{partid}/itemparts")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/payments/{paymentId}/parts/{partid}/itemparts");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/payments/{paymentId}/parts/{partid}/itemparts/{itempartid}":
    get:
      description: |
        **Note:** This operation is only available if you have the [Invoice Item Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/C_Invoice_Item_Settlement) feature enabled. Invoice Item Settlement must be used together with other Invoice Settlement features (Unapplied Payments, and Credit and Debit memos).  If you wish to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

        Retrieves the information about a specific payment part item. A payment part item is a single line item in a payment part. A payment part can consist of several different types of items.
      operationId: GET_PaymentItemPart
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a specific payment part. You can get the payment part ID from the response of [List all parts of a payment](https://www.zuora.com/developer/api-reference/#operation/GET_PaymentParts).
          in: path
          name: partid
          required: true
          schema:
            type: string
        - description: |
            The unique ID of a specific payment part item. You can get the payment part item ID from the response of [List all payment part items](https://www.zuora.com/developer/api-reference/#operation/GET_PaymentItemParts).
          in: path
          name: itempartid
          required: true
          schema:
            type: string
        - description: |
            The unique ID of a payment. For example, 8a8082e65b27f6c3015b89e4344c16b1.
          in: path
          name: paymentId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    amount: 4
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-03-01 11:30:37
                    debitMemoItemId: 4028905f5a87c0ff015a87e49e7a0063
                    id: 4028905f5a87c0ff015a87eb6bd8008a
                    invoiceItemId: null
                    success: true
                    taxItemId: null
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 11:30:37
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETPaymentItemPartType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a payment part item
      tags:
        - Payments
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/payments/{paymentId}/parts/{partid}/itemparts/{itempartid}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/payments/{paymentId}/parts/{partid}/itemparts/{itempartid}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/payments/{paymentId}/parts/{partid}/itemparts/{itempartid}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/payments/{paymentId}/parts/{partid}/itemparts/{itempartid}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/payments/{paymentId}/parts/{partid}/itemparts/{itempartid}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/payments/{paymentId}/parts/{partid}/itemparts/{itempartid}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/payments/{paymentId}/refunds":
    post:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Refunds a full or partial unapplied payment to your customers. To refund applied payments, you must unapply the applied payments from the invoices or debit memos, and then refund the unapplied payments to customers.

        For more information, see [Refund Payments](https://knowledgecenter.zuora.com/CB_Billing/Invoice_Settlement/A_Unapplied_Payments/Management_of_Unapplied_Payments/Z_Refund_Payments).

        For a use case of this operation, see [Refund processing](https://www.zuora.com/developer/api-guides/#Refund-processing).
      operationId: POST_RefundPayment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of an unapplied payment. For example, 8a8082e65b27f6c3015b89e4344c16b1.
          in: path
          name: paymentId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PostRefundType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 4028905f5a87c0ff015a87d25ae90025
                    amount: 4
                    cancelledOn: null
                    comment: Create a refund for unapplied payment.
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-03-01 14:46:03
                    creditMemoId: null
                    financeInformation:
                      bankAccountAccountingCode: null
                      bankAccountAccountingCodeType: null
                      transferredToAccounting: No
                      unappliedPaymentAccountingCode: null
                      unappliedPaymentAccountingCodeType: null
                    gatewayId: null
                    gatewayReconciliationReason: null
                    gatewayReconciliationStatus: null
                    gatewayResponse: null
                    gatewayResponseCode: null
                    gatewayState: NotSubmitted
                    id: 4028905f5a87c0ff015a889e590e00c9
                    markedForSubmissionOn: null
                    methodType: CreditCard
                    number: R-00000001
                    paymentId: 4028905f5a87c0ff015a889ddfb800c0
                    paymentMethodId: null
                    paymentMethodSnapshotId: null
                    payoutId: null
                    reasonCode: Standard Refund
                    referenceId: null
                    refundDate: 2017-03-01
                    refundTransactionTime: null
                    secondRefundReferenceId: null
                    settledOn: null
                    softDescriptor: null
                    softDescriptorPhone: null
                    status: Processed
                    submittedOn: null
                    success: true
                    type: External
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 14:46:03
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRefundPaymentType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Refund a payment
      tags:
        - Payments
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "comment": "Create a refund for unapplied payment.", 
                "gatewayOptions": {
                    "Comments": "test", 
                    "IPAddress": "192.168.1.1"
                }, 
                "methodType": "CreditCard", 
                "reasonCode": "Standard Refund", 
                "refundDate": "2017-03-01", 
                "totalAmount": 4, 
                "type": "External"
            }' "https://rest.zuora.com/v1/payments/{paymentId}/refunds"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/payments/{paymentId}/refunds');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "comment": "Create a refund for unapplied payment.", 
                "gatewayOptions": {
                    "Comments": "test", 
                    "IPAddress": "192.168.1.1"
                }, 
                "methodType": "CreditCard", 
                "reasonCode": "Standard Refund", 
                "refundDate": "2017-03-01", 
                "totalAmount": 4, 
                "type": "External"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"comment\": \"Create a refund for unapplied payment.\", \n    \"gatewayOptions\": {\n        \"Comments\": \"test\", \n        \"IPAddress\": \"192.168.1.1\"\n    }, \n    \"methodType\": \"CreditCard\", \n    \"reasonCode\": \"Standard Refund\", \n    \"refundDate\": \"2017-03-01\", \n    \"totalAmount\": 4, \n    \"type\": \"External\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/payments/{paymentId}/refunds")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"comment\": \"Create a refund for unapplied payment.\", \n    \"gatewayOptions\": {\n        \"Comments\": \"test\", \n        \"IPAddress\": \"192.168.1.1\"\n    }, \n    \"methodType\": \"CreditCard\", \n    \"reasonCode\": \"Standard Refund\", \n    \"refundDate\": \"2017-03-01\", \n    \"totalAmount\": 4, \n    \"type\": \"External\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/payments/{paymentId}/refunds", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/payments/{paymentId}/refunds")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"comment\": \"Create a refund for unapplied payment.\", \n    \"gatewayOptions\": {\n        \"Comments\": \"test\", \n        \"IPAddress\": \"192.168.1.1\"\n    }, \n    \"methodType\": \"CreditCard\", \n    \"reasonCode\": \"Standard Refund\", \n    \"refundDate\": \"2017-03-01\", \n    \"totalAmount\": 4, \n    \"type\": \"External\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/payments/{paymentId}/refunds");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"comment\": \"Create a refund for unapplied payment.\", \n    \"gatewayOptions\": {\n        \"Comments\": \"test\", \n        \"IPAddress\": \"192.168.1.1\"\n    }, \n    \"methodType\": \"CreditCard\", \n    \"reasonCode\": \"Standard Refund\", \n    \"refundDate\": \"2017-03-01\", \n    \"totalAmount\": 4, \n    \"type\": \"External\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/payments/{paymentId}/transfer":
    put:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Transfers an unapplied payment.

        For more information, see [Transfer Unapplied Payments](https://knowledgecenter.zuora.com/CB_Billing/Invoice_Settlement/A_Unapplied_Payments/Management_of_Unapplied_Payments/Transfer_Unapplied_Payments).
      operationId: PUT_TransferPayment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of an unapplied payment. For example, 8a8082e65b27f6c3015b89e4344c16b1.
          in: path
          name: paymentId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/TransferPaymentType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 4028905f5a87c0ff015a88889fe500a8
                    amount: 44.1
                    appliedAmount: 0
                    authTransactionId: null
                    bankIdentificationNumber: null
                    cancelledOn: null
                    comment: normal payment
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-03-01 11:30:37
                    creditBalanceAmount: 0
                    currency: USD
                    effectiveDate: 2017-03-01
                    financeInformation:
                      bankAccountAccountingCode: null
                      bankAccountAccountingCodeType: null
                      transferredToAccounting: No
                      unappliedPaymentAccountingCode: null
                      unappliedPaymentAccountingCodeType: null
                    gatewayId: null
                    gatewayOrderId: null
                    gatewayReconciliationReason: null
                    gatewayReconciliationStatus: null
                    gatewayResponse: null
                    gatewayResponseCode: null
                    gatewayState: NotSubmitted
                    id: 4028905f5a87c0ff015a87eb6b75007f
                    markedForSubmissionOn: null
                    number: P-00000001
                    paymentMethodId: 402881e522cf4f9b0122cf5dc4020045
                    paymentMethodSnapshotId: null
                    payoutId: null
                    referenceId: null
                    refundAmount: 0
                    secondPaymentReferenceId: null
                    settledOn: null
                    softDescriptor: null
                    softDescriptorPhone: null
                    status: Processed
                    submittedOn: null
                    success: true
                    type: External
                    unappliedAmount: 44.1
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 14:22:58
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETARPaymentType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Transfer a payment
      tags:
        - Payments
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "accountId": "4028905f5a87c0ff015a88889fe500a8"
            }' "https://rest.zuora.com/v1/payments/{paymentId}/transfer"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/payments/{paymentId}/transfer');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "accountId": "4028905f5a87c0ff015a88889fe500a8"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"accountId\": \"4028905f5a87c0ff015a88889fe500a8\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/payments/{paymentId}/transfer")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"accountId\": \"4028905f5a87c0ff015a88889fe500a8\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/payments/{paymentId}/transfer", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/payments/{paymentId}/transfer")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"accountId\": \"4028905f5a87c0ff015a88889fe500a8\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/payments/{paymentId}/transfer");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"accountId\": \"4028905f5a87c0ff015a88889fe500a8\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/payments/{paymentId}/unapply":
    put:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Unapplies an applied payment from invoices and debit memos.

        When you unapply a payment, the total number of invoice items and debit memo items that the payment will unapply from must be less than or equal to 10,000.

        If the limit is hit, you can follow the instructions:
        - If you want to unapply one payment without specifying invoices or debit memos, you have to specify the invoices or debit memos in the request.
        - If you want to unapply one payment from multiple specified invoices or debit memos, decrease the number of invoices or debit memos in the request.
        - If you want to unapply one payment from a single invoice or debit memo with a large volume of items, you have to specify invoice items in the request. The maximum number of invoice items that you can specify in the request is 1,000.

        For more information, see [Unapply Payments from Invoices and Debit Memos](https://knowledgecenter.zuora.com/CB_Billing/Invoice_Settlement/A_Unapplied_Payments/Management_of_Unapplied_Payments/Unapply_Payments_from_Invoices_and_Debit_Memos).
      operationId: PUT_UnapplyPayment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of an applied payment. For example, 8a8082e65b27f6c3015b89e4344c16b1.
          in: path
          name: paymentId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/UnapplyPaymentType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 4028905f5a87c0ff015a87d25ae90025
                    amount: 44.1
                    appliedAmount: 32.98
                    authTransactionId: null
                    bankIdentificationNumber: null
                    cancelledOn: null
                    comment: normal payment
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-03-01 11:30:37
                    creditBalanceAmount: 0
                    currency: USD
                    effectiveDate: 2017-03-01
                    financeInformation:
                      bankAccountAccountingCode: null
                      bankAccountAccountingCodeType: null
                      transferredToAccounting: No
                      unappliedPaymentAccountingCode: null
                      unappliedPaymentAccountingCodeType: null
                    gatewayId: null
                    gatewayOrderId: null
                    gatewayReconciliationReason: null
                    gatewayReconciliationStatus: null
                    gatewayResponse: null
                    gatewayResponseCode: null
                    gatewayState: NotSubmitted
                    id: 4028905f5a87c0ff015a87eb6b75007f
                    markedForSubmissionOn: null
                    number: P-00000001
                    paymentMethodId: 402881e522cf4f9b0122cf5dc4020045
                    paymentMethodSnapshotId: null
                    payoutId: null
                    referenceId: null
                    refundAmount: 0
                    secondPaymentReferenceId: null
                    settledOn: null
                    softDescriptor: null
                    softDescriptorPhone: null
                    status: Processed
                    submittedOn: null
                    success: true
                    type: External
                    unappliedAmount: 11.12
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 13:53:12
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETARPaymentType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Unapply a payment
      tags:
        - Payments
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "debitMemos": [
                    {
                        "amount": 1.02, 
                        "debitMemoId": "4028905f5a87c0ff015a87e49e6b0062", 
                        "items": [
                            {
                                "amount": 1, 
                                "debitMemoItemId": "4028905f5a87c0ff015a87e49e7a0063"
                            }, 
                            {
                                "amount": 0.02, 
                                "taxItemId": "4028905f5a87c0ff015a87e49f5e0065"
                            }
                        ]
                    }
                ], 
                "effectiveDate": "2017-03-01", 
                "invoices": [
                    {
                        "amount": 10.1, 
                        "invoiceId": "4028905f5a87c0ff015a87d3f8f10043", 
                        "items": [
                            {
                                "amount": 10, 
                                "invoiceItemId": "4028905f5a87c0ff015a87d3f90c0045"
                            }, 
                            {
                                "amount": 0.1, 
                                "taxItemId": "4028905f5a87c0ff015a87d3f884003f"
                            }
                        ]
                    }
                ]
            }' "https://rest.zuora.com/v1/payments/{paymentId}/unapply"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/payments/{paymentId}/unapply');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "debitMemos": [
                    {
                        "amount": 1.02, 
                        "debitMemoId": "4028905f5a87c0ff015a87e49e6b0062", 
                        "items": [
                            {
                                "amount": 1, 
                                "debitMemoItemId": "4028905f5a87c0ff015a87e49e7a0063"
                            }, 
                            {
                                "amount": 0.02, 
                                "taxItemId": "4028905f5a87c0ff015a87e49f5e0065"
                            }
                        ]
                    }
                ], 
                "effectiveDate": "2017-03-01", 
                "invoices": [
                    {
                        "amount": 10.1, 
                        "invoiceId": "4028905f5a87c0ff015a87d3f8f10043", 
                        "items": [
                            {
                                "amount": 10, 
                                "invoiceItemId": "4028905f5a87c0ff015a87d3f90c0045"
                            }, 
                            {
                                "amount": 0.1, 
                                "taxItemId": "4028905f5a87c0ff015a87d3f884003f"
                            }
                        ]
                    }
                ]
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"debitMemos\": [\n        {\n            \"amount\": 1.02, \n            \"debitMemoId\": \"4028905f5a87c0ff015a87e49e6b0062\", \n            \"items\": [\n                {\n                    \"amount\": 1, \n                    \"debitMemoItemId\": \"4028905f5a87c0ff015a87e49e7a0063\"\n                }, \n                {\n                    \"amount\": 0.02, \n                    \"taxItemId\": \"4028905f5a87c0ff015a87e49f5e0065\"\n                }\n            ]\n        }\n    ], \n    \"effectiveDate\": \"2017-03-01\", \n    \"invoices\": [\n        {\n            \"amount\": 10.1, \n            \"invoiceId\": \"4028905f5a87c0ff015a87d3f8f10043\", \n            \"items\": [\n                {\n                    \"amount\": 10, \n                    \"invoiceItemId\": \"4028905f5a87c0ff015a87d3f90c0045\"\n                }, \n                {\n                    \"amount\": 0.1, \n                    \"taxItemId\": \"4028905f5a87c0ff015a87d3f884003f\"\n                }\n            ]\n        }\n    ]\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/payments/{paymentId}/unapply")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"debitMemos\": [\n        {\n            \"amount\": 1.02, \n            \"debitMemoId\": \"4028905f5a87c0ff015a87e49e6b0062\", \n            \"items\": [\n                {\n                    \"amount\": 1, \n                    \"debitMemoItemId\": \"4028905f5a87c0ff015a87e49e7a0063\"\n                }, \n                {\n                    \"amount\": 0.02, \n                    \"taxItemId\": \"4028905f5a87c0ff015a87e49f5e0065\"\n                }\n            ]\n        }\n    ], \n    \"effectiveDate\": \"2017-03-01\", \n    \"invoices\": [\n        {\n            \"amount\": 10.1, \n            \"invoiceId\": \"4028905f5a87c0ff015a87d3f8f10043\", \n            \"items\": [\n                {\n                    \"amount\": 10, \n                    \"invoiceItemId\": \"4028905f5a87c0ff015a87d3f90c0045\"\n                }, \n                {\n                    \"amount\": 0.1, \n                    \"taxItemId\": \"4028905f5a87c0ff015a87d3f884003f\"\n                }\n            ]\n        }\n    ]\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/payments/{paymentId}/unapply", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/payments/{paymentId}/unapply")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"debitMemos\": [\n        {\n            \"amount\": 1.02, \n            \"debitMemoId\": \"4028905f5a87c0ff015a87e49e6b0062\", \n            \"items\": [\n                {\n                    \"amount\": 1, \n                    \"debitMemoItemId\": \"4028905f5a87c0ff015a87e49e7a0063\"\n                }, \n                {\n                    \"amount\": 0.02, \n                    \"taxItemId\": \"4028905f5a87c0ff015a87e49f5e0065\"\n                }\n            ]\n        }\n    ], \n    \"effectiveDate\": \"2017-03-01\", \n    \"invoices\": [\n        {\n            \"amount\": 10.1, \n            \"invoiceId\": \"4028905f5a87c0ff015a87d3f8f10043\", \n            \"items\": [\n                {\n                    \"amount\": 10, \n                    \"invoiceItemId\": \"4028905f5a87c0ff015a87d3f90c0045\"\n                }, \n                {\n                    \"amount\": 0.1, \n                    \"taxItemId\": \"4028905f5a87c0ff015a87d3f884003f\"\n                }\n            ]\n        }\n    ]\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/payments/{paymentId}/unapply");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"debitMemos\": [\n        {\n            \"amount\": 1.02, \n            \"debitMemoId\": \"4028905f5a87c0ff015a87e49e6b0062\", \n            \"items\": [\n                {\n                    \"amount\": 1, \n                    \"debitMemoItemId\": \"4028905f5a87c0ff015a87e49e7a0063\"\n                }, \n                {\n                    \"amount\": 0.02, \n                    \"taxItemId\": \"4028905f5a87c0ff015a87e49f5e0065\"\n                }\n            ]\n        }\n    ], \n    \"effectiveDate\": \"2017-03-01\", \n    \"invoices\": [\n        {\n            \"amount\": 10.1, \n            \"invoiceId\": \"4028905f5a87c0ff015a87d3f8f10043\", \n            \"items\": [\n                {\n                    \"amount\": 10, \n                    \"invoiceItemId\": \"4028905f5a87c0ff015a87d3f90c0045\"\n                }, \n                {\n                    \"amount\": 0.1, \n                    \"taxItemId\": \"4028905f5a87c0ff015a87d3f884003f\"\n                }\n            ]\n        }\n    ]\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/quotes/document:
    post:
      description: |
        The `document` call generates a quote document and returns the generated document URL. You can directly access the generated quote file through the returned URL.

        The `document` call should be only used from Zuora Quotes. 

        ## File Size Limitation 
        The maximum export file size is 2047MB. If you have large data requests that go over this limit, you will get the following 403 HTTP response code from Zuora:
        `security:max-object-size>2047MB</security:max-object-size>`

        Submit a request at [Zuora Global Support](http://support.zuora.com/) if you require additional assistance.

        We can work with you to determine if large file optimization is an option for you.
      operationId: POST_QuotesDocument
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTQuoteDocType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    file: https://rest.zuora.com/v1/file/2c92c09447f1ca410147f7bfed8c5a87
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTQuoteDocResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Generate a quote document
      tags:
        - Quotes Document
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "apiuser": "contact@example.com", 
                "documentType": "pdf", 
                "locale": "en_US", 
                "quoteId": "a0Bi000000A71rp", 
                "serverUrl": "https://c.na10.visual.force.com/services/Soap/u/10.0/00DF00000008VnX", 
                "sessionId": "we764buuM03bkE0fmmc5zGMYp", 
                "templateId": "4028925648fdb7830148fdc1246c0003", 
                "useSFDCLocale": "1", 
                "zquotesMajorVersion": "7", 
                "zquotesMinorVersion": "0"
            }' "https://rest.zuora.com/v1/quotes/document"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/quotes/document');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "apiuser": "contact@example.com", 
                "documentType": "pdf", 
                "locale": "en_US", 
                "quoteId": "a0Bi000000A71rp", 
                "serverUrl": "https://c.na10.visual.force.com/services/Soap/u/10.0/00DF00000008VnX", 
                "sessionId": "we764buuM03bkE0fmmc5zGMYp", 
                "templateId": "4028925648fdb7830148fdc1246c0003", 
                "useSFDCLocale": "1", 
                "zquotesMajorVersion": "7", 
                "zquotesMinorVersion": "0"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"apiuser\": \"contact@example.com\", \n    \"documentType\": \"pdf\", \n    \"locale\": \"en_US\", \n    \"quoteId\": \"a0Bi000000A71rp\", \n    \"serverUrl\": \"https://c.na10.visual.force.com/services/Soap/u/10.0/00DF00000008VnX\", \n    \"sessionId\": \"we764buuM03bkE0fmmc5zGMYp\", \n    \"templateId\": \"4028925648fdb7830148fdc1246c0003\", \n    \"useSFDCLocale\": \"1\", \n    \"zquotesMajorVersion\": \"7\", \n    \"zquotesMinorVersion\": \"0\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/quotes/document")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"apiuser\": \"contact@example.com\", \n    \"documentType\": \"pdf\", \n    \"locale\": \"en_US\", \n    \"quoteId\": \"a0Bi000000A71rp\", \n    \"serverUrl\": \"https://c.na10.visual.force.com/services/Soap/u/10.0/00DF00000008VnX\", \n    \"sessionId\": \"we764buuM03bkE0fmmc5zGMYp\", \n    \"templateId\": \"4028925648fdb7830148fdc1246c0003\", \n    \"useSFDCLocale\": \"1\", \n    \"zquotesMajorVersion\": \"7\", \n    \"zquotesMinorVersion\": \"0\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/quotes/document", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/quotes/document")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"apiuser\": \"contact@example.com\", \n    \"documentType\": \"pdf\", \n    \"locale\": \"en_US\", \n    \"quoteId\": \"a0Bi000000A71rp\", \n    \"serverUrl\": \"https://c.na10.visual.force.com/services/Soap/u/10.0/00DF00000008VnX\", \n    \"sessionId\": \"we764buuM03bkE0fmmc5zGMYp\", \n    \"templateId\": \"4028925648fdb7830148fdc1246c0003\", \n    \"useSFDCLocale\": \"1\", \n    \"zquotesMajorVersion\": \"7\", \n    \"zquotesMinorVersion\": \"0\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/quotes/document");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"apiuser\": \"contact@example.com\", \n    \"documentType\": \"pdf\", \n    \"locale\": \"en_US\", \n    \"quoteId\": \"a0Bi000000A71rp\", \n    \"serverUrl\": \"https://c.na10.visual.force.com/services/Soap/u/10.0/00DF00000008VnX\", \n    \"sessionId\": \"we764buuM03bkE0fmmc5zGMYp\", \n    \"templateId\": \"4028925648fdb7830148fdc1246c0003\", \n    \"useSFDCLocale\": \"1\", \n    \"zquotesMajorVersion\": \"7\", \n    \"zquotesMinorVersion\": \"0\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/ramps/{rampNumber}":
    get:
      description: |
        **Note**: This operation is only available if you have the Ramps feature enabled. The [Orders](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/AA_Overview_of_Orders) feature must be enabled before you can access the [Ramps](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Ramps_and_Ramp_Metrics/A_Overview_of_Ramps_and_Ramp_Metrics) feature. The Ramps feature is available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information coming October 2020.

        Retrieves the latest definition of a specified ramp.
      operationId: GET_RampByRampNumber
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The automatically generated number of a ramp. For example, R-00000268.
          in: path
          name: rampNumber
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    ramp:
                      charges:
                        - chargeNumber: C-00000202
                      description: ""
                      id: 40289f7b7321f5ce0173229d798300cf
                      intervals:
                        - description: ""
                          endDate: 2020-12-31
                          name: Year 1
                          startDate: 2020-01-01
                        - description: ""
                          endDate: 2021-12-31
                          name: Year 2
                          startDate: 2021-01-01
                      name: Two Years Ramp
                      number: R-00000268
                      subscriptionNumber: A-S00000287
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRampByRampNumberResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a ramp
      tags:
        - Ramps
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/ramps/{rampNumber}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/ramps/{rampNumber}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/ramps/{rampNumber}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/ramps/{rampNumber}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/ramps/{rampNumber}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/ramps/{rampNumber}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/ramps/{rampNumber}/ramp-metrics":
    get:
      description: |
        **Note**: This operation is only available if you have the Ramps feature enabled. The [Orders](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/AA_Overview_of_Orders) feature must be enabled before you can access the [Ramps](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Ramps_and_Ramp_Metrics/A_Overview_of_Ramps_and_Ramp_Metrics) feature. The Ramps feature is available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information coming October 2020.

        Retrieves key metrics about a specified ramp, including the following metrics:

        * TCB, TCV in the Ramp level
        * TCB, TCV in the Interval level
        * TCB, TCV, Quantity, and MRR in Interval Metrics
        * Delta TCB, Delta TCV, Delta Quantity, and Delta MRR in Interval Delta Metrics

        See [Key metrics for Ramps](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Ramps_and_Ramp_Metrics/F_Key_metrics_for_Ramps) for more information.
      operationId: GET_RampMetricsByRampNumber
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The automatically generated number of a ramp. For example, R-00000268.
          in: path
          name: rampNumber
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    rampMetrics:
                      description: ""
                      discountTcb: 0
                      discountTcv: 0
                      grossTcb: 240
                      grossTcv: 240
                      intervals:
                        - description: ""
                          discountTcb: 0
                          discountTcv: 0
                          endDate: 2020-12-31
                          grossTcb: 120
                          grossTcv: 120
                          intervalMetrics:
                            - chargeNumber: C-00000202
                              discountTcb: 0
                              discountTcv: 0
                              endDate: 2020-12-31
                              grossTcb: 120
                              grossTcv: 120
                              mrr:
                                - discount: 0
                                  endDate: 2020-12-31
                                  gross: 10
                                  net: 10
                                  startDate: 2020-01-01
                              netTcb: 120
                              netTcv: 120
                              productRatePlanChargeId: 40289f7b7115832f0171158e6dd906cd
                              quantity: 1
                              ratePlanChargeId: 40289f7b7321f5ce0173229d792c00c8
                              startDate: 2020-01-01
                              subscriptionNumber: A-S00000287
                          name: Year 1
                          netTcb: 120
                          netTcv: 120
                          startDate: 2020-01-01
                        - description: ""
                          discountTcb: 0
                          discountTcv: 0
                          endDate: 2021-12-31
                          grossTcb: 120
                          grossTcv: 120
                          intervalMetrics:
                            - chargeNumber: C-00000202
                              discountTcb: 0
                              discountTcv: 0
                              endDate: 2021-12-31
                              grossTcb: 120
                              grossTcv: 120
                              mrr:
                                - discount: 0
                                  endDate: 2021-12-31
                                  gross: 10
                                  net: 10
                                  startDate: 2021-01-01
                              netTcb: 120
                              netTcv: 120
                              productRatePlanChargeId: 40289f7b7115832f0171158e6dd906cd
                              quantity: 1
                              ratePlanChargeId: 40289f7b7321f5ce0173229d792c00c8
                              startDate: 2021-01-01
                              subscriptionNumber: A-S00000287
                          name: Year 2
                          netTcb: 120
                          netTcv: 120
                          startDate: 2021-01-01
                      name: Two Years Ramp
                      netTcb: 240
                      netTcv: 240
                      number: R-00000268
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRampMetricsByRampNumberResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List all ramp metrics of a ramp
      tags:
        - Ramps
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/ramps/{rampNumber}/ramp-metrics"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/ramps/{rampNumber}/ramp-metrics');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/ramps/{rampNumber}/ramp-metrics")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/ramps/{rampNumber}/ramp-metrics", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/ramps/{rampNumber}/ramp-metrics")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/ramps/{rampNumber}/ramp-metrics");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/rateplan/{product_id}/productRatePlan":
    get:
      description: |
        Retrieves information about all product rate plans of a specific product.

        For a use case of this operation, see [Retrieve the product catalog](https://www.zuora.com/developer/api-guides/#Retrieve-the-product-catalog).
      operationId: GET_ProductRatePlans
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_page"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - description: |
            The unique ID of a product. For example, 2c92c0f96487e16a016487f663c71a61.
          in: path
          name: product_id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    productRatePlans:
                      - description: ""
                        effectiveEndDate: 2020-07-31
                        effectiveStartDate: 2016-07-01
                        id: 40289f466464127601646473d6f7000f
                        name: New Rate Plan
                        productRatePlanCharges:
                          - applyDiscountTo: null
                            billingDay: DefaultFromCustomer
                            billingPeriod: Month
                            billingPeriodAlignment: AlignToCharge
                            billingTiming: IN_ADVANCE
                            defaultQuantity: null
                            description: ""
                            discountClass: null
                            discountLevel: null
                            endDateCondition: Subscription_End
                            financeInformation:
                              deferredRevenueAccountingCode: ""
                              deferredRevenueAccountingCodeType: null
                              recognizedRevenueAccountingCode: ""
                              recognizedRevenueAccountingCodeType: null
                            id: 40289f4664641276016464740dd0001c
                            listPriceBase: Per_Billing_Period
                            model: FlatFee
                            name: New Component
                            numberOfPeriods: null
                            overageCalculationOption: null
                            overageUnusedUnitsCreditOption: null
                            priceChangeOption: null
                            priceIncreasePercentage: null
                            pricing:
                              - currency: USD
                                discountAmount: null
                                discountPercentage: null
                                includedUnits: null
                                overagePrice: null
                                price: 100
                                tiers: null
                            pricingSummary:
                              - USD100
                            productDiscountApplyDetails: []
                            revRecCode: ""
                            revRecTriggerCondition: ContractEffectiveDate
                            revenueRecognitionRuleName: Recognize upon invoicing
                            smoothingModel: null
                            specificBillingPeriod: null
                            taxCode: ""
                            taxMode: null
                            taxable: false
                            triggerEvent: ContractEffective
                            type: Recurring
                            unusedIncludedUnitPrice: null
                            uom: null
                            upToPeriods: null
                            upToPeriodsType: null
                            usageRecordRatingOption: null
                            useDiscountSpecificAccountingCode: null
                            useTenantDefaultForPriceChange: null
                        status: Active
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETProductRatePlansResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List all product rate plans of a product
      tags:
        - Product Rate Plans
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/rateplan/{product_id}/productRatePlan"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/rateplan/{product_id}/productRatePlan');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/rateplan/{product_id}/productRatePlan")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/rateplan/{product_id}/productRatePlan", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/rateplan/{product_id}/productRatePlan")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/rateplan/{product_id}/productRatePlan");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  /v1/refunds:
    get:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Retrieves the information about all refunds. Two types of refunds are available, electronic refunds and external refunds.

        ### Filtering

        You can use query parameters to restrict the data returned in the response. Each query parameter corresponds to one field in the response body.

        If the value of a filterable field is string, you can set the corresponding query parameter to `null` when filtering. Then, you can get the response data with this field value being `null`.

        Examples:

        - /v1/refunds?status=Processed

        - /v1/refunds?amount=4&status=Processed

        - /v1/refunds?status=Processed&type=External&sort=+number
      operationId: GET_Refunds
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - description: |
            This parameter filters the response based on the `accountId` field.
          in: query
          name: accountId
          required: false
          schema:
            type: string
        - description: |
            This parameter filters the response based on the `amount` field.
          in: query
          name: amount
          required: false
          schema:
            format: double
            type: number
        - description: |
            This parameter filters the response based on the `createdById` field.
          in: query
          name: createdById
          required: false
          schema:
            type: string
        - description: |
            This parameter filters the response based on the `createdDate` field.
          in: query
          name: createdDate
          required: false
          schema:
            format: date-time
            type: string
        - description: |
            This parameter filters the response based on the `methodType` field.
          in: query
          name: methodType
          required: false
          schema:
            enum:
              - ACH
              - Cash
              - Check
              - CreditCard
              - PayPal
              - WireTransfer
              - DebitCard
              - CreditCardReferenceTransaction
              - BankTransfer
              - Other
            type: string
        - description: |
            This parameter filters the response based on the `number` field.
          in: query
          name: number
          required: false
          schema:
            type: string
        - description: |
            This parameter filters the response based on the `paymentId` field.
          in: query
          name: paymentId
          required: false
          schema:
            type: string
        - description: |
            This parameter filters the response based on the `refundDate` field.
          in: query
          name: refundDate
          required: false
          schema:
            format: date
            type: string
        - description: |
            This parameter filters the response based on the `status` field.
          in: query
          name: status
          required: false
          schema:
            enum:
              - Processed
              - Canceled
              - Error
              - Processing
            type: string
        - description: |
            This parameter filters the response based on the `type` field.
          in: query
          name: type
          required: false
          schema:
            enum:
              - External
              - Electronic
            type: string
        - description: |
            This parameter filters the response based on the `updatedById` field.
          in: query
          name: updatedById
          required: false
          schema:
            type: string
        - description: |
            This parameter filters the response based on the `updatedDate` field.
          in: query
          name: updatedDate
          required: false
          schema:
            format: date-time
            type: string
        - description: |
            This parameter restricts the order of the data returned in the response. You can use this parameter to supply a dimension you want to sort on.

            A sortable field uses the following form: 

            *operator* *field_name*

            You can use at most two sortable fields in one URL path. Use a comma to separate sortable fields. For example:  *operator* *field_name*, *operator* *field_name*  

            *operator* is used to mark the order of sequencing. The operator is optional. If you only specify the sortable field without any operator, the response data is sorted in descending order by this field.

              - The `-` operator indicates an ascending order.
              - The `+` operator indicates a descending order.

            By default, the response data is displayed in descending order by refund number.

            *field_name* indicates the name of a sortable field. The supported sortable fields of this operation are as below:

              - number
              - accountId
              - amount
              - refundDate
              - paymentId
              - createdDate
              - createdById
              - updatedDate
              - updatedById
              
            Examples:

            - /v1/refunds?sort=+number

            - /v1/refunds?status=Processed&sort=-number,+amount
          in: query
          name: sort
          required: false
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    refunds:
                      - accountId: 4028905f5a87c0ff015a87d25ae90025
                        amount: 4
                        cancelledOn: null
                        comment: update comment
                        createdById: 402881e522cf4f9b0122cf5d82860002
                        createdDate: 2017-03-01 14:46:03
                        creditMemoId: null
                        financeInformation:
                          bankAccountAccountingCode: null
                          bankAccountAccountingCodeType: null
                          transferredToAccounting: No
                          unappliedPaymentAccountingCode: null
                          unappliedPaymentAccountingCodeType: null
                        gatewayId: null
                        gatewayReconciliationReason: null
                        gatewayReconciliationStatus: null
                        gatewayResponse: null
                        gatewayResponseCode: null
                        gatewayState: NotSubmitted
                        id: 4028905f5a87c0ff015a889e590e00c9
                        markedForSubmissionOn: null
                        methodType: CreditCard
                        number: R-00000001
                        paymentId: 4028905f5a87c0ff015a889ddfb800c0
                        paymentMethodId: null
                        paymentMethodSnapshotId: null
                        payoutId: null
                        reasonCode: Standard Refund
                        referenceId: null
                        refundDate: 2017-03-01
                        refundTransactionTime: null
                        secondRefundReferenceId: null
                        settledOn: null
                        softDescriptor: null
                        softDescriptorPhone: null
                        status: Processed
                        submittedOn: null
                        type: External
                        updatedById: 402881e522cf4f9b0122cf5d82860002
                        updatedDate: 2017-03-01 16:56:41
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRefundCollectionType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List refunds
      tags:
        - Refunds
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/refunds"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/refunds');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/refunds")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/refunds", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/refunds")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/refunds");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/refunds/{refund-id}/reconcile":
    post:
      description: |
        Reconciles a refund when receiving the gateway reconciliation request or event.
      operationId: POST_ReconcileRefund
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: Unique ID of the refund.
          in: path
          name: refund-id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTReconcileRefundRequest"
        required: true
      responses:
        "200":
          content:
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTReconcileRefundResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Reconcile a refund
      tags:
        - Payment Gateway Reconciliation
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "action": "settle", 
                "actionDate": "2020-10-25 11:11:11", 
                "gatewayReconciliationReason": "refund_paid", 
                "gatewayReconciliationStatus": "paid", 
                "payoutId": "PAYOUT123"
            }' "https://rest.zuora.com/v1/refunds/{refund-id}/reconcile"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/refunds/{refund-id}/reconcile');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "action": "settle", 
                "actionDate": "2020-10-25 11:11:11", 
                "gatewayReconciliationReason": "refund_paid", 
                "gatewayReconciliationStatus": "paid", 
                "payoutId": "PAYOUT123"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"action\": \"settle\", \n    \"actionDate\": \"2020-10-25 11:11:11\", \n    \"gatewayReconciliationReason\": \"refund_paid\", \n    \"gatewayReconciliationStatus\": \"paid\", \n    \"payoutId\": \"PAYOUT123\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/refunds/{refund-id}/reconcile")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"action\": \"settle\", \n    \"actionDate\": \"2020-10-25 11:11:11\", \n    \"gatewayReconciliationReason\": \"refund_paid\", \n    \"gatewayReconciliationStatus\": \"paid\", \n    \"payoutId\": \"PAYOUT123\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/refunds/{refund-id}/reconcile", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/refunds/{refund-id}/reconcile")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"action\": \"settle\", \n    \"actionDate\": \"2020-10-25 11:11:11\", \n    \"gatewayReconciliationReason\": \"refund_paid\", \n    \"gatewayReconciliationStatus\": \"paid\", \n    \"payoutId\": \"PAYOUT123\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/refunds/{refund-id}/reconcile");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"action\": \"settle\", \n    \"actionDate\": \"2020-10-25 11:11:11\", \n    \"gatewayReconciliationReason\": \"refund_paid\", \n    \"gatewayReconciliationStatus\": \"paid\", \n    \"payoutId\": \"PAYOUT123\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/refunds/{refundId}":
    delete:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Deletes a refund. You can delete a refund with the Canceled or Error status. 

        If you have the Invoice Settlement feature enabled, refunds applied to credit balance cannot be deleted.
      operationId: DELETE_Refund
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a refund. For example, 4028905f5a87c0ff015a889e590e00c9.
          in: path
          name: refundId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Delete a refund
      tags:
        - Refunds
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/refunds/{refundId}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/refunds/{refundId}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/refunds/{refundId}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/v1/refunds/{refundId}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/refunds/{refundId}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/refunds/{refundId}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Retrieves the information about a specific refund.
      operationId: GET_Refund
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a refund. For example, 4028905f5a87c0ff015a889e590e00c9.
          in: path
          name: refundId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 4028905f5a87c0ff015a87d25ae90025
                    amount: 4
                    cancelledOn: null
                    comment: Create a refund for unapplied payment.
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-03-01 14:46:03
                    creditMemoId: null
                    financeInformation:
                      bankAccountAccountingCode: null
                      bankAccountAccountingCodeType: null
                      transferredToAccounting: No
                      unappliedPaymentAccountingCode: null
                      unappliedPaymentAccountingCodeType: null
                    gatewayId: null
                    gatewayReconciliationReason: null
                    gatewayReconciliationStatus: null
                    gatewayResponse: null
                    gatewayResponseCode: null
                    gatewayState: NotSubmitted
                    id: 4028905f5a87c0ff015a889e590e00c9
                    markedForSubmissionOn: null
                    methodType: CreditCard
                    number: R-00000001
                    paymentId: 4028905f5a87c0ff015a889ddfb800c0
                    paymentMethodId: null
                    paymentMethodSnapshotId: null
                    payoutId: null
                    reasonCode: Standard Refund
                    referenceId: null
                    refundDate: 2017-03-01
                    refundTransactionTime: null
                    secondRefundReferenceId: null
                    settledOn: null
                    softDescriptor: null
                    softDescriptorPhone: null
                    status: Processed
                    submittedOn: null
                    success: true
                    type: External
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 14:46:03
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRefundType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a refund
      tags:
        - Refunds
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/refunds/{refundId}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/refunds/{refundId}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/refunds/{refundId}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/refunds/{refundId}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/refunds/{refundId}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/refunds/{refundId}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Updates the basic and finance information about a refund.
      operationId: PUT_UpdateRefund
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a refund. For example, 4028905f5a87c0ff015a889e590e00c9.
          in: path
          name: refundId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTRefundType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 4028905f5a87c0ff015a87d25ae90025
                    amount: 4
                    cancelledOn: null
                    comment: update comment
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-03-01 14:46:03
                    creditMemoId: null
                    financeInformation:
                      bankAccountAccountingCode: null
                      bankAccountAccountingCodeType: null
                      transferredToAccounting: No
                      unappliedPaymentAccountingCode: null
                      unappliedPaymentAccountingCodeType: null
                    gatewayId: null
                    gatewayReconciliationReason: null
                    gatewayReconciliationStatus: null
                    gatewayResponse: null
                    gatewayResponseCode: null
                    gatewayState: NotSubmitted
                    id: 4028905f5a87c0ff015a889e590e00c9
                    markedForSubmissionOn: null
                    methodType: CreditCard
                    number: R-00000001
                    paymentId: 4028905f5a87c0ff015a889ddfb800c0
                    paymentMethodId: null
                    paymentMethodSnapshotId: null
                    payoutId: null
                    reasonCode: Standard Refund
                    referenceId: null
                    refundDate: 2017-03-01
                    refundTransactionTime: null
                    secondRefundReferenceId: null
                    settledOn: null
                    softDescriptor: null
                    softDescriptorPhone: null
                    status: Processed
                    submittedOn: null
                    success: true
                    type: External
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 16:56:41
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRefundType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Update a refund
      tags:
        - Refunds
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "comment": "update comment", 
                "financeInformation": {
                    "transferredToAccounting": "No"
                }
            }' "https://rest.zuora.com/v1/refunds/{refundId}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/refunds/{refundId}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "comment": "update comment", 
                "financeInformation": {
                    "transferredToAccounting": "No"
                }
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"comment\": \"update comment\", \n    \"financeInformation\": {\n        \"transferredToAccounting\": \"No\"\n    }\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/refunds/{refundId}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"comment\": \"update comment\", \n    \"financeInformation\": {\n        \"transferredToAccounting\": \"No\"\n    }\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/refunds/{refundId}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/refunds/{refundId}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"comment\": \"update comment\", \n    \"financeInformation\": {\n        \"transferredToAccounting\": \"No\"\n    }\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/refunds/{refundId}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"comment\": \"update comment\", \n    \"financeInformation\": {\n        \"transferredToAccounting\": \"No\"\n    }\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/refunds/{refundId}/cancel":
    put:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Cancels a refund.

        If you have the Invoice Settlement feature enabled, refunds applied to credit balance cannot be cancelled.
      operationId: PUT_CancelRefund
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a refund. For example, 4028905f5a87c0ff015a889e590e00c9.      
          in: path
          name: refundId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 4028905f5a87c0ff015a87d25ae90025
                    amount: 4
                    cancelledOn: 2017-03-01 17:03:07
                    comment: update comment
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-03-01 14:46:03
                    creditMemoId: null
                    financeInformation:
                      bankAccountAccountingCode: null
                      bankAccountAccountingCodeType: null
                      transferredToAccounting: No
                      unappliedPaymentAccountingCode: null
                      unappliedPaymentAccountingCodeType: null
                    gatewayId: null
                    gatewayReconciliationReason: null
                    gatewayReconciliationStatus: null
                    gatewayResponse: null
                    gatewayResponseCode: null
                    gatewayState: NotSubmitted
                    id: 4028905f5a87c0ff015a889e590e00c9
                    markedForSubmissionOn: null
                    methodType: CreditCard
                    number: R-00000001
                    paymentId: 4028905f5a87c0ff015a889ddfb800c0
                    paymentMethodId: null
                    paymentMethodSnapshotId: null
                    payoutId: null
                    reasonCode: Standard Refund
                    referenceId: null
                    refundDate: 2017-03-01
                    refundTransactionTime: null
                    secondRefundReferenceId: null
                    settledOn: null
                    softDescriptor: null
                    softDescriptorPhone: null
                    status: Canceled
                    submittedOn: null
                    success: true
                    type: External
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 17:03:07
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRefundType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Cancel a refund
      tags:
        - Refunds
      x-code-samples:
        - lang: Curl
          source: "curl -X PUT -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" -d '{}' \"https://rest.zuora.com/v1/refunds/{refundId}/cancel\""
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/refunds/{refundId}/cancel');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/refunds/{refundId}/cancel")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/refunds/{refundId}/cancel", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/refunds/{refundId}/cancel")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/refunds/{refundId}/cancel");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/refunds/{refundId}/parts":
    get:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Retrieves the information about all parts of a refund.
      operationId: GET_RefundParts
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a refund. For example, 4028905f5a87c0ff015a889e590e00c9.
          in: path
          name: refundId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    parts:
                      - amount: 4
                        createdById: 402881e522cf4f9b0122cf5d82860002
                        createdDate: 2017-03-01 14:46:03
                        creditMemoId: null
                        id: 4028905f5a87c0ff015a889e592b00cf
                        paymentId: 4028905f5a87c0ff015a889ddfb800c0
                        updatedById: 402881e522cf4f9b0122cf5d82860002
                        updatedDate: 2017-03-01 14:46:03
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRefundPartCollectionType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List all parts of a refund
      tags:
        - Refunds
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/refunds/{refundId}/parts"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/refunds/{refundId}/parts');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/refunds/{refundId}/parts")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/refunds/{refundId}/parts", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/refunds/{refundId}/parts")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/refunds/{refundId}/parts");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/refunds/{refundId}/parts/{refundpartid}":
    get:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Retrieves the information about a specific refund part.
      operationId: GET_RefundPart
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a specific refund part. You can get the refund part ID from the response of [List all parts of a refund](https://www.zuora.com/developer/api-reference/#operation/GET_RefundParts).
          in: path
          name: refundpartid
          required: true
          schema:
            type: string
        - description: |
            The unique ID of a refund. For example, 4028905f5a87c0ff015a889e590e00c9.
          in: path
          name: refundId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    amount: 4
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-03-01 14:46:03
                    creditMemoId: null
                    id: 4028905f5a87c0ff015a889e592b00cf
                    paymentId: 4028905f5a87c0ff015a889ddfb800c0
                    success: true
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 14:46:03
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/RefundPartResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a refund part
      tags:
        - Refunds
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/refunds/{refundId}/parts/{refundpartid}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/refunds/{refundId}/parts/{refundpartid}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/refunds/{refundId}/parts/{refundpartid}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/refunds/{refundId}/parts/{refundpartid}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/refunds/{refundId}/parts/{refundpartid}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/refunds/{refundId}/parts/{refundpartid}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/refunds/{refundId}/parts/{refundpartid}/itemparts":
    get:
      description: |
        **Note:** This operation is only available if you have the [Invoice Item Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/C_Invoice_Item_Settlement) feature enabled. Invoice Item Settlement must be used together with other Invoice Settlement features (Unapplied Payments, and Credit and Debit memos).  If you wish to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

        Retrieves the information about all items of a refund part. A refund part item is a single line item in a refund part. A refund part can consist of several different types of items.
      operationId: GET_RefundItemParts
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - description: |
            The unique ID of a specific refund part. You can get the refund part ID from the response of [List all parts of a refund](https://www.zuora.com/developer/api-reference/#operation/GET_RefundParts).
          in: path
          name: refundpartid
          required: true
          schema:
            type: string
        - description: |
            The unique ID of a refund. For example, 4028905f5a87c0ff015a889e590e00c9.
          in: path
          name: refundId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    itemParts:
                      - amount: 4
                        createdById: 402881e522cf4f9b0122cf5d82860002
                        createdDate: 2017-03-01 14:46:03
                        creditMemoItemId: null
                        creditTaxItemId: null
                        id: 4028905f5a87c0ff015a889e592a00ce
                        updatedById: 402881e522cf4f9b0122cf5d82860002
                        updatedDate: 2017-03-01 14:46:03
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRefundItemPartCollectionType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List all refund part items
      tags:
        - Refunds
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/refunds/{refundId}/parts/{refundpartid}/itemparts"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/refunds/{refundId}/parts/{refundpartid}/itemparts');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/refunds/{refundId}/parts/{refundpartid}/itemparts")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/refunds/{refundId}/parts/{refundpartid}/itemparts", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/refunds/{refundId}/parts/{refundpartid}/itemparts")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/refunds/{refundId}/parts/{refundpartid}/itemparts");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/refunds/{refundId}/parts/{refundpartid}/itemparts/{itempartid}":
    get:
      description: |
        **Note:** This operation is only available if you have the [Invoice Item Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/C_Invoice_Item_Settlement) feature enabled. Invoice Item Settlement must be used together with other Invoice Settlement features (Unapplied Payments, and Credit and Debit memos).  If you wish to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.  

        Retrieves the information about a specific refund part item. A refund part item is a single line item in a refund part. A refund part can consist of several different types of items.
      operationId: GET_RefundItemPart
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a specific refund part item. You can get the refund part item ID from the response of [Get refund part items](https://www.zuora.com/developer/api-reference/#operation/GET_RefundItemParts).
          in: path
          name: itempartid
          required: true
          schema:
            type: string
        - description: |
            The unique ID of a specific refund part. You can get the refund part ID from the response of [List all parts of a refund](https://www.zuora.com/developer/api-reference/#operation/GET_RefundParts).
          in: path
          name: refundpartid
          required: true
          schema:
            type: string
        - description: |
            The unique ID of a refund. For example, 4028905f5a87c0ff015a889e590e00c9.
          in: path
          name: refundId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    amount: 4
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-03-01 14:46:03
                    creditMemoItemId: null
                    creditTaxItemId: null
                    id: 4028905f5a87c0ff015a889e592a00ce
                    success: true
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-03-01 14:46:03
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRefundItemPartType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a refund part item
      tags:
        - Refunds
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/refunds/{refundId}/parts/{refundpartid}/itemparts/{itempartid}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/refunds/{refundId}/parts/{refundpartid}/itemparts/{itempartid}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/refunds/{refundId}/parts/{refundpartid}/itemparts/{itempartid}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/refunds/{refundId}/parts/{refundpartid}/itemparts/{itempartid}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/refunds/{refundId}/parts/{refundpartid}/itemparts/{itempartid}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/refunds/{refundId}/parts/{refundpartid}/itemparts/{itempartid}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/revenue-events/revenue-schedules/{rs-number}":
    get:
      description: |
        
        This REST API reference describes how to get all revenue events in a revenue schedule by specifying the revenue schedule number. Request and response field descriptions and sample code are provided.
      operationId: GET_RevenueEventForRevenueSchedule
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize_finance_revenue"
        - description: Revenue schedule number. The revenue schedule number is always prefixed with "RS", for example, "RS-00000001".
          in: path
          name: rs-number
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    revenueEventDetails:
                      - accountId: 2c92c0f8439770960143b2111f5a584e
                        createdOn: 2014-01-21 11:35:42
                        currency: USD
                        eventType: Revenue Distributed
                        notes: Phase 1 Test
                        number: RE-00000001
                        recognitionEnd: null
                        recognitionStart: null
                        revenueItems:
                          - accountingPeriodEndDate: 2013-10-31
                            accountingPeriodName: Oct'2013
                            accountingPeriodStartDate: 2013-10-01
                            amount: 10
                            currency: USD
                            isAccountingPeriodClosed: false
                          - accountingPeriodEndDate: null
                            accountingPeriodName: Open-Ended
                            accountingPeriodStartDate: 2013-11-12
                            amount: -10
                            currency: USD
                            isAccountingPeriodClosed: false
                        subscriptionChargeId: 2c92c0f943977b4f0143b22287ed432e
                        subscriptionId: 2c92c0f943977b4f0143b23487999327
                      - accountId: 2c92c0f8439770960143b2111f5a584e
                        createdOn: 2014-01-20 16:36:45
                        currency: USD
                        eventType: Invoice Posted
                        notes: null
                        number: RE-00000002
                        recognitionEnd: 2013-10-10
                        recognitionStart: 2013-10-10
                        revenueItems:
                          - accountingPeriodEndDate: 2013-10-31
                            accountingPeriodName: Oct'2013
                            accountingPeriodStartDate: 2013-10-01
                            amount: 50
                            currency: USD
                            isAccountingPeriodClosed: false
                        subscriptionChargeId: 2c92c0f943977b4f0143b99987ed432e
                        subscriptionId: 2c92c0f943977b4f0143b22287994327
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRevenueEventDetailsType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List all revenue events of a revenue schedule
      tags:
        - Revenue Events
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/revenue-events/revenue-schedules/{rs-number}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/revenue-events/revenue-schedules/{rs-number}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/revenue-events/revenue-schedules/{rs-number}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/revenue-events/revenue-schedules/{rs-number}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/revenue-events/revenue-schedules/{rs-number}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/revenue-events/revenue-schedules/{rs-number}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/revenue-events/{event-number}":
    get:
      description: |
        This REST API reference describes how to get revenue event details by specifying the revenue event number. Request and response field descriptions and sample code are provided.
      operationId: GET_RevenueEventDetails
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: The number associated with the revenue event.
          in: path
          name: event-number
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 2c92c0f8439770960143b2141f5a584e
                    createdOn: 2014-01-20 16:36:45
                    currency: USD
                    eventType: Invoice Posted
                    notes: null
                    number: RE-00000001
                    recognitionEnd: 2013-10-10
                    recognitionStart: 2013-10-10
                    revenueItems:
                      - accountingPeriodEndDate: 2013-10-31
                        accountingPeriodName: Oct'2013
                        accountingPeriodStartDate: 2013-10-01
                        amount: 50
                        currency: USD
                        isAccountingPeriodClosed: false
                    subscriptionChargeId: 2c92c0f943977b4f0143b23487ed432e
                    subscriptionId: 2c92c0f943977b4f0143b23487994327
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRevenueEventDetailType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a revenue event
      tags:
        - Revenue Events
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/revenue-events/{event-number}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/revenue-events/{event-number}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/revenue-events/{event-number}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/revenue-events/{event-number}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/revenue-events/{event-number}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/revenue-events/{event-number}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/revenue-items/charge-revenue-summaries/{crs-number}":
    get:
      description: |
        This REST API reference describes how to get the details for each revenue item in a charge revenue summary by specifying the charge revenue summary number. Request and response field descriptions and sample code are provided.
      operationId: GET_RevenueItemsByChargeRevenueSummaryNumber
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize_finance_accounting"
        - description: The charge revenue summary number.
          in: path
          name: crs-number
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    revenueItems:
                      - accountingPeriodEndDate: 2013-09-30
                        accountingPeriodName: Sep'2013
                        accountingPeriodStartDate: 2013-09-01
                        amount: 35
                        currency: USD
                        isAccountingPeriodClosed: false
                      - accountingPeriodEndDate: 2013-10-31
                        accountingPeriodName: Oct'2013
                        accountingPeriodStartDate: 2013-10-01
                        amount: 50
                        currency: USD
                        isAccountingPeriodClosed: false
                      - accountingPeriodEndDate: null
                        accountingPeriodName: Open-Ended
                        accountingPeriodStartDate: 2013-12-11
                        amount: 150
                        currency: USD
                        isAccountingPeriodClosed: false
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRevenueItemsType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List revenue items by charge revenue summary number
      tags:
        - Revenue Items
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/revenue-items/charge-revenue-summaries/{crs-number}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/revenue-items/charge-revenue-summaries/{crs-number}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/revenue-items/charge-revenue-summaries/{crs-number}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/revenue-items/charge-revenue-summaries/{crs-number}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/revenue-items/charge-revenue-summaries/{crs-number}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/revenue-items/charge-revenue-summaries/{crs-number}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/revenue-items/revenue-events/{event-number}":
    get:
      description: |
        This REST API reference describes how to get the details of each revenue item in a revenue event by specifying the revenue event number. Request and response field descriptions and sample code are provided.
      operationId: GET_RevenueItemsByChargeRevenueEventNumber
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize_finance_accounting"
        - description: The number associated with the revenue event.
          in: path
          name: event-number
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    revenueItems:
                      - accountingPeriodEndDate: 2013-10-31
                        accountingPeriodName: Oct'2013
                        accountingPeriodStartDate: 2013-10-01
                        amount: 50
                        currency: USD
                        isAccountingPeriodClosed: false
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRevenueItemsType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List revenue items by revenue event number
      tags:
        - Revenue Items
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/revenue-items/revenue-events/{event-number}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/revenue-items/revenue-events/{event-number}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/revenue-items/revenue-events/{event-number}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/revenue-items/revenue-events/{event-number}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/revenue-items/revenue-events/{event-number}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/revenue-items/revenue-events/{event-number}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: |
        This REST API reference describes how to update custom fields on revenue items by specifying the revenue event number. Request and response field descriptions and sample code are provided.
      operationId: PUT_CustomFieldsonRevenueItemsByRevenueEvent
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: The number associated with the revenue event.
          in: path
          name: event-number
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTEventRIDetailType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Update custom fields on revenue items by revenue event number
      tags:
        - Revenue Items
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "revenueItems": [
                    {
                        "accountingPeriodName": "Oct'\''2014"
                    }, 
                    {
                        "accountingPeriodName": "Nov'\''2014"
                    }
                ]
            }' "https://rest.zuora.com/v1/revenue-items/revenue-events/{event-number}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/revenue-items/revenue-events/{event-number}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "revenueItems": [
                    {
                        "accountingPeriodName": "Oct\'2014"
                    }, 
                    {
                        "accountingPeriodName": "Nov\'2014"
                    }
                ]
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"revenueItems\": [\n        {\n            \"accountingPeriodName\": \"Oct'2014\"\n        }, \n        {\n            \"accountingPeriodName\": \"Nov'2014\"\n        }\n    ]\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/revenue-items/revenue-events/{event-number}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"revenueItems\": [\n        {\n            \"accountingPeriodName\": \"Oct'2014\"\n        }, \n        {\n            \"accountingPeriodName\": \"Nov'2014\"\n        }\n    ]\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/revenue-items/revenue-events/{event-number}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/revenue-items/revenue-events/{event-number}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"revenueItems\": [\n        {\n            \"accountingPeriodName\": \"Oct'2014\"\n        }, \n        {\n            \"accountingPeriodName\": \"Nov'2014\"\n        }\n    ]\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/revenue-items/revenue-events/{event-number}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"revenueItems\": [\n        {\n            \"accountingPeriodName\": \"Oct'2014\"\n        }, \n        {\n            \"accountingPeriodName\": \"Nov'2014\"\n        }\n    ]\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/revenue-items/revenue-schedules/{rs-number}":
    get:
      description: |
        This REST API reference describes how to get the details for each revenue items in a revenue schedule by specifying the revenue schedule number. Request and response field descriptions and sample code are provided.
      operationId: GET_RevenueItemsByRevenueSchedule
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize_finance_accounting"
        - description: Revenue schedule number. The revenue schedule number is always prefixed with "RS", for example, "RS-00000001".
          in: path
          name: rs-number
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    revenueItems:
                      - accountingPeriodEndDate: 2013-10-31
                        accountingPeriodName: Oct'2013
                        accountingPeriodStartDate: 2013-10-01
                        amount: 50
                        currency: USD
                        deferredRevenueAccountingCode: null
                        deferredRevenueAccountingCodeType: null
                        isAccountingPeriodClosed: false
                        recognizedRevenueAccountingCode: null
                        recognizedRevenueAccountingCodeType: null
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRsRevenueItemsType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List all revenue items of a revenue schedule
      tags:
        - Revenue Items
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/revenue-items/revenue-schedules/{rs-number}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/revenue-items/revenue-schedules/{rs-number}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/revenue-items/revenue-schedules/{rs-number}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/revenue-items/revenue-schedules/{rs-number}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/revenue-items/revenue-schedules/{rs-number}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/revenue-items/revenue-schedules/{rs-number}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: |
        This REST API reference describes how to update custom fields on revenue Items by specifying the revenue schedule number. Request and response field descriptions and sample code are provided.
      operationId: PUT_CustomFieldsonRevenueItemsByRevenueSchedule
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: Revenue schedule number. The revenue schedule number is always prefixed with "RS", for example, "RS-00000001".
          in: path
          name: rs-number
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTScheduleRIDetailType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Update custom fields on revenue items by revenue schedule number
      tags:
        - Revenue Items
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "revenueItems": [
                    {
                        "accountingPeriodName": "Oct'\''2014"
                    }, 
                    {
                        "accountingPeriodName": "Nov'\''2014"
                    }
                ]
            }' "https://rest.zuora.com/v1/revenue-items/revenue-schedules/{rs-number}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/revenue-items/revenue-schedules/{rs-number}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "revenueItems": [
                    {
                        "accountingPeriodName": "Oct\'2014"
                    }, 
                    {
                        "accountingPeriodName": "Nov\'2014"
                    }
                ]
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"revenueItems\": [\n        {\n            \"accountingPeriodName\": \"Oct'2014\"\n        }, \n        {\n            \"accountingPeriodName\": \"Nov'2014\"\n        }\n    ]\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/revenue-items/revenue-schedules/{rs-number}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"revenueItems\": [\n        {\n            \"accountingPeriodName\": \"Oct'2014\"\n        }, \n        {\n            \"accountingPeriodName\": \"Nov'2014\"\n        }\n    ]\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/revenue-items/revenue-schedules/{rs-number}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/revenue-items/revenue-schedules/{rs-number}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"revenueItems\": [\n        {\n            \"accountingPeriodName\": \"Oct'2014\"\n        }, \n        {\n            \"accountingPeriodName\": \"Nov'2014\"\n        }\n    ]\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/revenue-items/revenue-schedules/{rs-number}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"revenueItems\": [\n        {\n            \"accountingPeriodName\": \"Oct'2014\"\n        }, \n        {\n            \"accountingPeriodName\": \"Nov'2014\"\n        }\n    ]\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/revenue-recognition-rules/product-charges/{charge-key}":
    get:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 

        Retrieves the revenue recognition rule associated with a production rate plan charge by specifying the charge ID.
      operationId: GET_RevenueRecRulebyProductRatePlanCharge
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a product rate plan charge. For example, 8a8082e65ba86084015bb323d3c61d82.
          in: path
          name: charge-key
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    revenueRecognitionRuleName: Custom - Unlimited recognition
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRevenueRecognitionRuleAssociationType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a revenue recognition rule by product rate plan charge ID
      tags:
        - Revenue Rules
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/revenue-recognition-rules/product-charges/{charge-key}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/revenue-recognition-rules/product-charges/{charge-key}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/revenue-recognition-rules/product-charges/{charge-key}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/revenue-recognition-rules/product-charges/{charge-key}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/revenue-recognition-rules/product-charges/{charge-key}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/revenue-recognition-rules/product-charges/{charge-key}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/revenue-recognition-rules/subscription-charges/{charge-key}":
    get:
      description: |
        Retrieves the revenue recognition rule associated with a subscription charge by specifying the charge ID. Request and response field descriptions and sample code are provided.
      operationId: GET_RevenueRecRules
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of the subscription rate plan charge. For example, 402892793e173340013e173b81000012.
          in: path
          name: charge-key
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    revenueRecognitionRuleName: Recognize upon invoicing
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRevenueRecognitionRuleAssociationType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a revenue recognition rule by subscription charge ID
      tags:
        - Revenue Rules
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/revenue-recognition-rules/subscription-charges/{charge-key}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/revenue-recognition-rules/subscription-charges/{charge-key}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/revenue-recognition-rules/subscription-charges/{charge-key}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/revenue-recognition-rules/subscription-charges/{charge-key}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/revenue-recognition-rules/subscription-charges/{charge-key}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/revenue-recognition-rules/subscription-charges/{charge-key}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/revenue-schedules/credit-memo-items/{cmi-id}":
    get:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

        Retrieves the details about a revenue schedule by specifying a valid credit memo item ID.
      operationId: GET_RSbyCreditMemoItem
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a credit memo item. You can get the credit memo item ID from the response of [Get credit memo items](https://www.zuora.com/developer/api-reference/#operation/GET_CreditMemoItems).
          in: path
          name: cmi-id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 2c90838f42cf16030142cf215ecb0014
                    amount: -100
                    createdOn: 2017-03-03 08:52:59
                    currency: USD
                    linkedTransactionId: 4028903b5a7eb9bc015a91a7bb380171
                    linkedTransactionNumber: CM00000001
                    linkedTransactionType: CreditMemoItem
                    notes: null
                    number: RS-00000116
                    productChargeId: 4028903b5a7eb9bc015a91a744a90165
                    recognitionRuleName: Recognize upon invoicing
                    recognizedRevenue: 0
                    referenceId: null
                    revenueItems:
                      - accountingPeriodEndDate: 2017-03-31
                        accountingPeriodName: Mar-2017
                        accountingPeriodStartDate: 2017-03-01
                        amount: -100
                        currency: USD
                        deferredRevenueAccountingCode: Deferred Revenue
                        deferredRevenueAccountingCodeType: Deferred Revenue
                        isAccountingPeriodClosed: false
                        recognizedRevenueAccountingCode: Subscription Revenue
                        recognizedRevenueAccountingCodeType: Sales Revenue
                    revenueScheduleDate: 2017-03-03
                    subscriptionChargeId: 4028903b5a7eb9bc015a91a744a90222
                    subscriptionId: 4028903b5a7eb9bc015a91a744a90111
                    success: true
                    undistributedUnrecognizedRevenue: 0
                    unrecognizedRevenue: -100
                    updatedOn: 2017-03-03 08:53:00
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRSDetailType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: |
        Retrieve a revenue schedule by credit memo item ID
      tags:
        - Revenue Schedules
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/revenue-schedules/credit-memo-items/{cmi-id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/revenue-schedules/credit-memo-items/{cmi-id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/revenue-schedules/credit-memo-items/{cmi-id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/revenue-schedules/credit-memo-items/{cmi-id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/revenue-schedules/credit-memo-items/{cmi-id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/revenue-schedules/credit-memo-items/{cmi-id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    post:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

        Creates a revenue schedule for a credit memo item, and manually distribute the revenue.
      operationId: POST_RSforCreditMemoItem_ManualDistribution
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a credit memo item. You can get the credit memo item ID from the response of [Get credit memo items](https://www.zuora.com/developer/api-reference/#operation/GET_CreditMemoItems).
          in: path
          name: cmi-id
          required: true
          schema:
            type: string
      requestBody:
        $ref: "#/components/requestBodies/POSTRevenueScheduleByTransactionType"
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    revenueScheduleNumber: RS-00000119
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTRevenueScheduleByTransactionResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: |
        Create a revenue schedule for a credit memo item (manual distribution)
      tags:
        - Revenue Schedules
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "revenueDistributions": [
                    {
                        "accountingPeriodName": "Jan '\''16", 
                        "newAmount": "20"
                    }, 
                    {
                        "accountingPeriodName": "Open-Ended", 
                        "newAmount": "30"
                    }
                ], 
                "revenueEvent": {
                    "eventType": "Revenue Distributed", 
                    "eventTypeSystemId": "RevenueDistributed__z", 
                    "notes": "My notes"
                }
            }' "https://rest.zuora.com/v1/revenue-schedules/credit-memo-items/{cmi-id}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/revenue-schedules/credit-memo-items/{cmi-id}');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "revenueDistributions": [
                    {
                        "accountingPeriodName": "Jan \'16", 
                        "newAmount": "20"
                    }, 
                    {
                        "accountingPeriodName": "Open-Ended", 
                        "newAmount": "30"
                    }
                ], 
                "revenueEvent": {
                    "eventType": "Revenue Distributed", 
                    "eventTypeSystemId": "RevenueDistributed__z", 
                    "notes": "My notes"
                }
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"revenueDistributions\": [\n        {\n            \"accountingPeriodName\": \"Jan '16\", \n            \"newAmount\": \"20\"\n        }, \n        {\n            \"accountingPeriodName\": \"Open-Ended\", \n            \"newAmount\": \"30\"\n        }\n    ], \n    \"revenueEvent\": {\n        \"eventType\": \"Revenue Distributed\", \n        \"eventTypeSystemId\": \"RevenueDistributed__z\", \n        \"notes\": \"My notes\"\n    }\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/revenue-schedules/credit-memo-items/{cmi-id}")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"revenueDistributions\": [\n        {\n            \"accountingPeriodName\": \"Jan '16\", \n            \"newAmount\": \"20\"\n        }, \n        {\n            \"accountingPeriodName\": \"Open-Ended\", \n            \"newAmount\": \"30\"\n        }\n    ], \n    \"revenueEvent\": {\n        \"eventType\": \"Revenue Distributed\", \n        \"eventTypeSystemId\": \"RevenueDistributed__z\", \n        \"notes\": \"My notes\"\n    }\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/revenue-schedules/credit-memo-items/{cmi-id}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/revenue-schedules/credit-memo-items/{cmi-id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"revenueDistributions\": [\n        {\n            \"accountingPeriodName\": \"Jan '16\", \n            \"newAmount\": \"20\"\n        }, \n        {\n            \"accountingPeriodName\": \"Open-Ended\", \n            \"newAmount\": \"30\"\n        }\n    ], \n    \"revenueEvent\": {\n        \"eventType\": \"Revenue Distributed\", \n        \"eventTypeSystemId\": \"RevenueDistributed__z\", \n        \"notes\": \"My notes\"\n    }\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/revenue-schedules/credit-memo-items/{cmi-id}");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"revenueDistributions\": [\n        {\n            \"accountingPeriodName\": \"Jan '16\", \n            \"newAmount\": \"20\"\n        }, \n        {\n            \"accountingPeriodName\": \"Open-Ended\", \n            \"newAmount\": \"30\"\n        }\n    ], \n    \"revenueEvent\": {\n        \"eventType\": \"Revenue Distributed\", \n        \"eventTypeSystemId\": \"RevenueDistributed__z\", \n        \"notes\": \"My notes\"\n    }\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/revenue-schedules/credit-memo-items/{cmi-id}/distribute-revenue-with-date-range":
    post:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

        Creates a revenue schedule for a credit memo item, and automatically distribute the revenue by specifying the recognition start and end dates.
      operationId: POST_RSforCreditMemoItem_DistributeByDateRange
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a credit memo item. You can get the credit memo item ID from the response of [Get credit memo items](https://www.zuora.com/developer/api-reference/#operation/GET_CreditMemoItems).
          in: path
          name: cmi-id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTRevenueScheduleByTransactionRatablyCMType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    revenueScheduleNumber: RS-00000119
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTRevenueScheduleByTransactionResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: |
        Create a revenue schedule for a credit memo item (distribute by date range)
      tags:
        - Revenue Schedules
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "distributionType": "daily distribution", 
                "notes": "notes", 
                "recognitionEnd": "2016-12-31", 
                "recognitionStart": "2016-01-01", 
                "revenueEvent": {
                    "eventType": "Credit Memo Posted", 
                    "eventTypeSystemId": "CreditMemoPosted__z", 
                    "notes": "some notes"
                }
            }' "https://rest.zuora.com/v1/revenue-schedules/credit-memo-items/{cmi-id}/distribute-revenue-with-date-range"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/revenue-schedules/credit-memo-items/{cmi-id}/distribute-revenue-with-date-range');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "distributionType": "daily distribution", 
                "notes": "notes", 
                "recognitionEnd": "2016-12-31", 
                "recognitionStart": "2016-01-01", 
                "revenueEvent": {
                    "eventType": "Credit Memo Posted", 
                    "eventTypeSystemId": "CreditMemoPosted__z", 
                    "notes": "some notes"
                }
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"distributionType\": \"daily distribution\", \n    \"notes\": \"notes\", \n    \"recognitionEnd\": \"2016-12-31\", \n    \"recognitionStart\": \"2016-01-01\", \n    \"revenueEvent\": {\n        \"eventType\": \"Credit Memo Posted\", \n        \"eventTypeSystemId\": \"CreditMemoPosted__z\", \n        \"notes\": \"some notes\"\n    }\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/revenue-schedules/credit-memo-items/{cmi-id}/distribute-revenue-with-date-range")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"distributionType\": \"daily distribution\", \n    \"notes\": \"notes\", \n    \"recognitionEnd\": \"2016-12-31\", \n    \"recognitionStart\": \"2016-01-01\", \n    \"revenueEvent\": {\n        \"eventType\": \"Credit Memo Posted\", \n        \"eventTypeSystemId\": \"CreditMemoPosted__z\", \n        \"notes\": \"some notes\"\n    }\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/revenue-schedules/credit-memo-items/{cmi-id}/distribute-revenue-with-date-range", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/revenue-schedules/credit-memo-items/{cmi-id}/distribute-revenue-with-date-range")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"distributionType\": \"daily distribution\", \n    \"notes\": \"notes\", \n    \"recognitionEnd\": \"2016-12-31\", \n    \"recognitionStart\": \"2016-01-01\", \n    \"revenueEvent\": {\n        \"eventType\": \"Credit Memo Posted\", \n        \"eventTypeSystemId\": \"CreditMemoPosted__z\", \n        \"notes\": \"some notes\"\n    }\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/revenue-schedules/credit-memo-items/{cmi-id}/distribute-revenue-with-date-range");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"distributionType\": \"daily distribution\", \n    \"notes\": \"notes\", \n    \"recognitionEnd\": \"2016-12-31\", \n    \"recognitionStart\": \"2016-01-01\", \n    \"revenueEvent\": {\n        \"eventType\": \"Credit Memo Posted\", \n        \"eventTypeSystemId\": \"CreditMemoPosted__z\", \n        \"notes\": \"some notes\"\n    }\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/revenue-schedules/debit-memo-items/{dmi-id}":
    get:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

        Retrieves the details about a revenue schedule by specifying a valid debit memo item ID.
      operationId: GET_RSbyDebitMemoItem
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a debit memo item. You can get the debit memo item ID from the response of [Get debit memo items](https://www.zuora.com/developer/api-reference/#operation/GET_DebitMemoItems).
          in: path
          name: dmi-id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 2c90838f42cf16030142cf215ecb0014
                    amount: -100
                    createdOn: 2017-03-03 08:52:59
                    currency: USD
                    linkedTransactionId: 4028903b5a7eb9bc015a33a7bb380171
                    linkedTransactionNumber: DM00000001
                    linkedTransactionType: DebitMemoItem
                    notes: null
                    number: RS-00000117
                    productChargeId: 4028903b5a7eb9bc015a91a734a90165
                    recognitionRuleName: Recognize upon invoicing
                    recognizedRevenue: 0
                    referenceId: null
                    revenueItems:
                      - accountingPeriodEndDate: 2017-03-31
                        accountingPeriodName: Mar-2017
                        accountingPeriodStartDate: 2017-03-01
                        amount: -100
                        currency: USD
                        deferredRevenueAccountingCode: Deferred Revenue
                        deferredRevenueAccountingCodeType: Deferred Revenue
                        isAccountingPeriodClosed: false
                        recognizedRevenueAccountingCode: Subscription Revenue
                        recognizedRevenueAccountingCodeType: Sales Revenue
                    revenueScheduleDate: 2017-03-03
                    subscriptionChargeId: 4028903b5a7eb9bc015a91a344a90222
                    subscriptionId: 4028903b5a7eb9bc015a91a744a30111
                    success: true
                    undistributedUnrecognizedRevenue: 0
                    unrecognizedRevenue: -100
                    updatedOn: 2017-03-03 08:53:00
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRSDetailType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: |
        Retrieve a revenue schedule by debit memo item ID
      tags:
        - Revenue Schedules
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/revenue-schedules/debit-memo-items/{dmi-id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/revenue-schedules/debit-memo-items/{dmi-id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/revenue-schedules/debit-memo-items/{dmi-id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/revenue-schedules/debit-memo-items/{dmi-id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/revenue-schedules/debit-memo-items/{dmi-id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/revenue-schedules/debit-memo-items/{dmi-id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    post:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

        Creates a revenue schedule for a debit memo item, and manually distribute the revenue.
      operationId: POST_RSforDebitMemoItem_ManualDistribution
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a debit memo item. You can get the debit memo item ID from the response of [Get debit memo items](https://www.zuora.com/developer/api-reference/#operation/GET_DebitMemoItems).
          in: path
          name: dmi-id
          required: true
          schema:
            type: string
      requestBody:
        $ref: "#/components/requestBodies/POSTRevenueScheduleByTransactionType"
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    revenueScheduleNumber: RS-00000119
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTRevenueScheduleByTransactionResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: |
        Create a revenue schedule for a debit memo item (distribute by date range)
      tags:
        - Revenue Schedules
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "revenueDistributions": [
                    {
                        "accountingPeriodName": "Jan '\''16", 
                        "newAmount": "20"
                    }, 
                    {
                        "accountingPeriodName": "Open-Ended", 
                        "newAmount": "30"
                    }
                ], 
                "revenueEvent": {
                    "eventType": "Revenue Distributed", 
                    "eventTypeSystemId": "RevenueDistributed__z", 
                    "notes": "My notes"
                }
            }' "https://rest.zuora.com/v1/revenue-schedules/debit-memo-items/{dmi-id}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/revenue-schedules/debit-memo-items/{dmi-id}');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "revenueDistributions": [
                    {
                        "accountingPeriodName": "Jan \'16", 
                        "newAmount": "20"
                    }, 
                    {
                        "accountingPeriodName": "Open-Ended", 
                        "newAmount": "30"
                    }
                ], 
                "revenueEvent": {
                    "eventType": "Revenue Distributed", 
                    "eventTypeSystemId": "RevenueDistributed__z", 
                    "notes": "My notes"
                }
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"revenueDistributions\": [\n        {\n            \"accountingPeriodName\": \"Jan '16\", \n            \"newAmount\": \"20\"\n        }, \n        {\n            \"accountingPeriodName\": \"Open-Ended\", \n            \"newAmount\": \"30\"\n        }\n    ], \n    \"revenueEvent\": {\n        \"eventType\": \"Revenue Distributed\", \n        \"eventTypeSystemId\": \"RevenueDistributed__z\", \n        \"notes\": \"My notes\"\n    }\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/revenue-schedules/debit-memo-items/{dmi-id}")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"revenueDistributions\": [\n        {\n            \"accountingPeriodName\": \"Jan '16\", \n            \"newAmount\": \"20\"\n        }, \n        {\n            \"accountingPeriodName\": \"Open-Ended\", \n            \"newAmount\": \"30\"\n        }\n    ], \n    \"revenueEvent\": {\n        \"eventType\": \"Revenue Distributed\", \n        \"eventTypeSystemId\": \"RevenueDistributed__z\", \n        \"notes\": \"My notes\"\n    }\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/revenue-schedules/debit-memo-items/{dmi-id}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/revenue-schedules/debit-memo-items/{dmi-id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"revenueDistributions\": [\n        {\n            \"accountingPeriodName\": \"Jan '16\", \n            \"newAmount\": \"20\"\n        }, \n        {\n            \"accountingPeriodName\": \"Open-Ended\", \n            \"newAmount\": \"30\"\n        }\n    ], \n    \"revenueEvent\": {\n        \"eventType\": \"Revenue Distributed\", \n        \"eventTypeSystemId\": \"RevenueDistributed__z\", \n        \"notes\": \"My notes\"\n    }\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/revenue-schedules/debit-memo-items/{dmi-id}");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"revenueDistributions\": [\n        {\n            \"accountingPeriodName\": \"Jan '16\", \n            \"newAmount\": \"20\"\n        }, \n        {\n            \"accountingPeriodName\": \"Open-Ended\", \n            \"newAmount\": \"30\"\n        }\n    ], \n    \"revenueEvent\": {\n        \"eventType\": \"Revenue Distributed\", \n        \"eventTypeSystemId\": \"RevenueDistributed__z\", \n        \"notes\": \"My notes\"\n    }\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/revenue-schedules/debit-memo-items/{dmi-id}/distribute-revenue-with-date-range":
    post:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

        Creates a revenue schedule for a debit memo item, and automatically distribute the revenue by specifying the recognition start and end dates.
      operationId: POST_RSforDebitMemoItem_DistributeByDateRange
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a debit memo item. You can get the debit memo item ID from the response of [Get debit memo items](https://www.zuora.com/developer/api-reference/#operation/GET_DebitMemoItems).
          in: path
          name: dmi-id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTRevenueScheduleByTransactionRatablyDMType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    revenueScheduleNumber: RS-00000119
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTRevenueScheduleByTransactionResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: |
        Create a revenue schedule for a debit memo item (distribute by date range)
      tags:
        - Revenue Schedules
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "distributionType": "daily distribution", 
                "notes": "notes", 
                "recognitionEnd": "2016-12-31", 
                "recognitionStart": "2016-01-01", 
                "revenueEvent": {
                    "eventType": "Debit Memo Posted", 
                    "eventTypeSystemId": "DebitMemoPosted__z", 
                    "notes": "some notes"
                }
            }' "https://rest.zuora.com/v1/revenue-schedules/debit-memo-items/{dmi-id}/distribute-revenue-with-date-range"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/revenue-schedules/debit-memo-items/{dmi-id}/distribute-revenue-with-date-range');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "distributionType": "daily distribution", 
                "notes": "notes", 
                "recognitionEnd": "2016-12-31", 
                "recognitionStart": "2016-01-01", 
                "revenueEvent": {
                    "eventType": "Debit Memo Posted", 
                    "eventTypeSystemId": "DebitMemoPosted__z", 
                    "notes": "some notes"
                }
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"distributionType\": \"daily distribution\", \n    \"notes\": \"notes\", \n    \"recognitionEnd\": \"2016-12-31\", \n    \"recognitionStart\": \"2016-01-01\", \n    \"revenueEvent\": {\n        \"eventType\": \"Debit Memo Posted\", \n        \"eventTypeSystemId\": \"DebitMemoPosted__z\", \n        \"notes\": \"some notes\"\n    }\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/revenue-schedules/debit-memo-items/{dmi-id}/distribute-revenue-with-date-range")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"distributionType\": \"daily distribution\", \n    \"notes\": \"notes\", \n    \"recognitionEnd\": \"2016-12-31\", \n    \"recognitionStart\": \"2016-01-01\", \n    \"revenueEvent\": {\n        \"eventType\": \"Debit Memo Posted\", \n        \"eventTypeSystemId\": \"DebitMemoPosted__z\", \n        \"notes\": \"some notes\"\n    }\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/revenue-schedules/debit-memo-items/{dmi-id}/distribute-revenue-with-date-range", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/revenue-schedules/debit-memo-items/{dmi-id}/distribute-revenue-with-date-range")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"distributionType\": \"daily distribution\", \n    \"notes\": \"notes\", \n    \"recognitionEnd\": \"2016-12-31\", \n    \"recognitionStart\": \"2016-01-01\", \n    \"revenueEvent\": {\n        \"eventType\": \"Debit Memo Posted\", \n        \"eventTypeSystemId\": \"DebitMemoPosted__z\", \n        \"notes\": \"some notes\"\n    }\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/revenue-schedules/debit-memo-items/{dmi-id}/distribute-revenue-with-date-range");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"distributionType\": \"daily distribution\", \n    \"notes\": \"notes\", \n    \"recognitionEnd\": \"2016-12-31\", \n    \"recognitionStart\": \"2016-01-01\", \n    \"revenueEvent\": {\n        \"eventType\": \"Debit Memo Posted\", \n        \"eventTypeSystemId\": \"DebitMemoPosted__z\", \n        \"notes\": \"some notes\"\n    }\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/revenue-schedules/invoice-item-adjustments/{invoice-item-adj-key}":
    get:
      description: |
        Retrieves the details of a revenue schedule by specifying a valid invoice item adjustment identifier. Request and response field descriptions and sample code are provided.
      operationId: GET_RSbyInvoiceItemAdjustment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: ID of the Invoice Item Adjustment, for example, e20b07fd416dcfcf0141c81164fd0a72.
          in: path
          name: invoice-item-adj-key
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 2c92c0f8439770960143b2141f5a584e
                    amount: -25
                    createdOn: 2014-01-21 13:52:38
                    currency: USD
                    linkedTransactionId: 2c92c0f8439770a40143b6ca76df205a
                    linkedTransactionNumber: IIA-00000070
                    linkedTransactionType: InvoiceItemAdjustment
                    notes: null
                    number: RS-00000273
                    recognitionRuleName: Recognize upon invoicing
                    recognizedRevenue: 0
                    referenceId: null
                    revenueItems:
                      - accountingPeriodEndDate: null
                        accountingPeriodName: Open-Ended
                        accountingPeriodStartDate: 2013-12-11
                        amount: -25
                        currency: USD
                        deferredRevenueAccountingCode: null
                        deferredRevenueAccountingCodeType: null
                        isAccountingPeriodClosed: false
                        recognizedRevenueAccountingCode: null
                        recognizedRevenueAccountingCodeType: null
                    revenueScheduleDate: 2014-01-21
                    subscriptionChargeId: 2c92c0f943977b4f0143b23487ed432e
                    subscriptionId: 2c92c0f943977b4f0143b23487994327
                    success: true
                    undistributedUnrecognizedRevenue: -25
                    unrecognizedRevenue: -25
                    updatedOn: 2014-01-21 13:52:38
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRSDetailType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a revenue schedule by invoice item adjustment key
      tags:
        - Revenue Schedules
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/revenue-schedules/invoice-item-adjustments/{invoice-item-adj-key}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/revenue-schedules/invoice-item-adjustments/{invoice-item-adj-key}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/revenue-schedules/invoice-item-adjustments/{invoice-item-adj-key}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/revenue-schedules/invoice-item-adjustments/{invoice-item-adj-key}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/revenue-schedules/invoice-item-adjustments/{invoice-item-adj-key}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/revenue-schedules/invoice-item-adjustments/{invoice-item-adj-key}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    post:
      description: |
        Creates a revenue schedule for an Invoice Item Adjustment and manually distribute the revenue.
      operationId: POST_RSforInvoiceItemAdjustment_ManualDistribution
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            ID or number of the Invoice Item Adjustment, for example, e20b07fd416dcfcf0141c81164fd0a72.
            If the specified Invoice Item Adjustment is already associated with a revenue schedule, the call will fail.
          in: path
          name: invoice-item-adj-key
          required: true
          schema:
            type: string
      requestBody:
        $ref: "#/components/requestBodies/POSTRevenueScheduleByTransactionType"
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    revenueScheduleNumber: rs-00000002
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTRevenueScheduleByTransactionResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Create a revenue schedule for an invoice item adjustment (manual distribution)
      tags:
        - Revenue Schedules
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "revenueDistributions": [
                    {
                        "accountingPeriodName": "Jan '\''16", 
                        "newAmount": "20"
                    }, 
                    {
                        "accountingPeriodName": "Open-Ended", 
                        "newAmount": "30"
                    }
                ], 
                "revenueEvent": {
                    "eventType": "Revenue Distributed", 
                    "eventTypeSystemId": "RevenueDistributed__z", 
                    "notes": "My notes"
                }
            }' "https://rest.zuora.com/v1/revenue-schedules/invoice-item-adjustments/{invoice-item-adj-key}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/revenue-schedules/invoice-item-adjustments/{invoice-item-adj-key}');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "revenueDistributions": [
                    {
                        "accountingPeriodName": "Jan \'16", 
                        "newAmount": "20"
                    }, 
                    {
                        "accountingPeriodName": "Open-Ended", 
                        "newAmount": "30"
                    }
                ], 
                "revenueEvent": {
                    "eventType": "Revenue Distributed", 
                    "eventTypeSystemId": "RevenueDistributed__z", 
                    "notes": "My notes"
                }
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"revenueDistributions\": [\n        {\n            \"accountingPeriodName\": \"Jan '16\", \n            \"newAmount\": \"20\"\n        }, \n        {\n            \"accountingPeriodName\": \"Open-Ended\", \n            \"newAmount\": \"30\"\n        }\n    ], \n    \"revenueEvent\": {\n        \"eventType\": \"Revenue Distributed\", \n        \"eventTypeSystemId\": \"RevenueDistributed__z\", \n        \"notes\": \"My notes\"\n    }\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/revenue-schedules/invoice-item-adjustments/{invoice-item-adj-key}")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"revenueDistributions\": [\n        {\n            \"accountingPeriodName\": \"Jan '16\", \n            \"newAmount\": \"20\"\n        }, \n        {\n            \"accountingPeriodName\": \"Open-Ended\", \n            \"newAmount\": \"30\"\n        }\n    ], \n    \"revenueEvent\": {\n        \"eventType\": \"Revenue Distributed\", \n        \"eventTypeSystemId\": \"RevenueDistributed__z\", \n        \"notes\": \"My notes\"\n    }\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/revenue-schedules/invoice-item-adjustments/{invoice-item-adj-key}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/revenue-schedules/invoice-item-adjustments/{invoice-item-adj-key}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"revenueDistributions\": [\n        {\n            \"accountingPeriodName\": \"Jan '16\", \n            \"newAmount\": \"20\"\n        }, \n        {\n            \"accountingPeriodName\": \"Open-Ended\", \n            \"newAmount\": \"30\"\n        }\n    ], \n    \"revenueEvent\": {\n        \"eventType\": \"Revenue Distributed\", \n        \"eventTypeSystemId\": \"RevenueDistributed__z\", \n        \"notes\": \"My notes\"\n    }\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/revenue-schedules/invoice-item-adjustments/{invoice-item-adj-key}");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"revenueDistributions\": [\n        {\n            \"accountingPeriodName\": \"Jan '16\", \n            \"newAmount\": \"20\"\n        }, \n        {\n            \"accountingPeriodName\": \"Open-Ended\", \n            \"newAmount\": \"30\"\n        }\n    ], \n    \"revenueEvent\": {\n        \"eventType\": \"Revenue Distributed\", \n        \"eventTypeSystemId\": \"RevenueDistributed__z\", \n        \"notes\": \"My notes\"\n    }\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/revenue-schedules/invoice-item-adjustments/{invoice-item-adj-key}/distribute-revenue-with-date-range":
    post:
      description: |
        Creates a revenue schedule for an Invoice Item Adjustment and distribute the revenue by specifying the recognition start and end dates.
      operationId: POST_RSforInvoiceItemAdjustment_DistributeByDateRange
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            ID or number of the Invoice Item Adjustment, for example, e20b07fd416dcfcf0141c81164fd0a72.
            If the specified Invoice Item Adjustment is already associated with a revenue schedule, the call will fail.
          in: path
          name: invoice-item-adj-key
          required: true
          schema:
            type: string
      requestBody:
        $ref: "#/components/requestBodies/POSTRevenueScheduleByDateRangeType"
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    revenueScheduleNumber: RS-00000003
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTRevenueScheduleByTransactionResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Create a revenue schedule for an invoice item adjustment (distribute by date range)
      tags:
        - Revenue Schedules
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "distributionType": "Daily distribution", 
                "notes": "Manually distribute revenue by usage", 
                "recognitionEnd": "2016-12-31", 
                "recognitionStart": "2016-12-1", 
                "revenueEvent": {
                    "eventType": "Revenue Distributed", 
                    "eventTypeSystemId": "RevenueDistributed__z", 
                    "notes": ""
                }
            }' "https://rest.zuora.com/v1/revenue-schedules/invoice-item-adjustments/{invoice-item-adj-key}/distribute-revenue-with-date-range"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/revenue-schedules/invoice-item-adjustments/{invoice-item-adj-key}/distribute-revenue-with-date-range');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "distributionType": "Daily distribution", 
                "notes": "Manually distribute revenue by usage", 
                "recognitionEnd": "2016-12-31", 
                "recognitionStart": "2016-12-1", 
                "revenueEvent": {
                    "eventType": "Revenue Distributed", 
                    "eventTypeSystemId": "RevenueDistributed__z", 
                    "notes": ""
                }
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"distributionType\": \"Daily distribution\", \n    \"notes\": \"Manually distribute revenue by usage\", \n    \"recognitionEnd\": \"2016-12-31\", \n    \"recognitionStart\": \"2016-12-1\", \n    \"revenueEvent\": {\n        \"eventType\": \"Revenue Distributed\", \n        \"eventTypeSystemId\": \"RevenueDistributed__z\", \n        \"notes\": \"\"\n    }\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/revenue-schedules/invoice-item-adjustments/{invoice-item-adj-key}/distribute-revenue-with-date-range")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"distributionType\": \"Daily distribution\", \n    \"notes\": \"Manually distribute revenue by usage\", \n    \"recognitionEnd\": \"2016-12-31\", \n    \"recognitionStart\": \"2016-12-1\", \n    \"revenueEvent\": {\n        \"eventType\": \"Revenue Distributed\", \n        \"eventTypeSystemId\": \"RevenueDistributed__z\", \n        \"notes\": \"\"\n    }\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/revenue-schedules/invoice-item-adjustments/{invoice-item-adj-key}/distribute-revenue-with-date-range", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/revenue-schedules/invoice-item-adjustments/{invoice-item-adj-key}/distribute-revenue-with-date-range")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"distributionType\": \"Daily distribution\", \n    \"notes\": \"Manually distribute revenue by usage\", \n    \"recognitionEnd\": \"2016-12-31\", \n    \"recognitionStart\": \"2016-12-1\", \n    \"revenueEvent\": {\n        \"eventType\": \"Revenue Distributed\", \n        \"eventTypeSystemId\": \"RevenueDistributed__z\", \n        \"notes\": \"\"\n    }\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/revenue-schedules/invoice-item-adjustments/{invoice-item-adj-key}/distribute-revenue-with-date-range");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"distributionType\": \"Daily distribution\", \n    \"notes\": \"Manually distribute revenue by usage\", \n    \"recognitionEnd\": \"2016-12-31\", \n    \"recognitionStart\": \"2016-12-1\", \n    \"revenueEvent\": {\n        \"eventType\": \"Revenue Distributed\", \n        \"eventTypeSystemId\": \"RevenueDistributed__z\", \n        \"notes\": \"\"\n    }\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/revenue-schedules/invoice-items/{invoice-item-id}":
    get:
      description: |
        Retrieves the details of a revenue schedule by specifying the invoice item ID.
      operationId: GET_RSbyInvoiceItem
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: A valid Invoice Item ID.
          in: path
          name: invoice-item-id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 2c92c0f8439770960143b2141f5a584e
                    amount: 50
                    createdOn: 2014-01-21 13:59:25
                    currency: USD
                    linkedTransactionId: 2c92c094439782460143b62c2ee60f59
                    linkedTransactionType: InvoiceItem
                    notes: null
                    number: RS-00000290
                    recognitionRuleName: Recognize upon invoicing
                    recognizedRevenue: 0
                    referenceId: null
                    revenueItems:
                      - accountingPeriodEndDate: null
                        accountingPeriodName: Open-Ended
                        accountingPeriodStartDate: 2013-12-11
                        amount: 50
                        currency: USD
                        deferredRevenueAccountingCode: null
                        deferredRevenueAccountingCodeType: null
                        isAccountingPeriodClosed: false
                        recognizedRevenueAccountingCode: Recurring Monthly Revenue
                        recognizedRevenueAccountingCodeType: "Revenue: Sales"
                    revenueScheduleDate: 2014-01-21
                    subscriptionChargeId: 2c92c0f943977b4f0143b23487ed432e
                    subscriptionId: 2c92c0f943977b4f0143b23487994327
                    success: true
                    undistributedUnrecognizedRevenue: 50
                    unrecognizedRevenue: 50
                    updatedOn: 2014-01-21 13:59:25
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRSDetailType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a revenue schedule by invoice item ID
      tags:
        - Revenue Schedules
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/revenue-schedules/invoice-items/{invoice-item-id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/revenue-schedules/invoice-items/{invoice-item-id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/revenue-schedules/invoice-items/{invoice-item-id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/revenue-schedules/invoice-items/{invoice-item-id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/revenue-schedules/invoice-items/{invoice-item-id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/revenue-schedules/invoice-items/{invoice-item-id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    post:
      description: |
        Creates a revenue schedule for an Invoice Item and manually distribute the revenue.
      operationId: POST_RSforInvoiceItem_ManualDistribution
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            ID of the Invoice Item, for example, e20b07fd416dcfcf0141c81164fd0a75.
            If the specified Invoice Item is already associated with a revenue schedule, the call will fail.
          in: path
          name: invoice-item-id
          required: true
          schema:
            type: string
      requestBody:
        $ref: "#/components/requestBodies/POSTRevenueScheduleByTransactionType"
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    revenueScheduleNumber: RS-00000002
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTRevenueScheduleByTransactionResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Create a revenue schedule for an invoice item (manual distribution)
      tags:
        - Revenue Schedules
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "revenueDistributions": [
                    {
                        "accountingPeriodName": "Jan '\''16", 
                        "newAmount": "20"
                    }, 
                    {
                        "accountingPeriodName": "Open-Ended", 
                        "newAmount": "30"
                    }
                ], 
                "revenueEvent": {
                    "eventType": "Revenue Distributed", 
                    "eventTypeSystemId": "RevenueDistributed__z", 
                    "notes": "My notes"
                }
            }' "https://rest.zuora.com/v1/revenue-schedules/invoice-items/{invoice-item-id}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/revenue-schedules/invoice-items/{invoice-item-id}');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "revenueDistributions": [
                    {
                        "accountingPeriodName": "Jan \'16", 
                        "newAmount": "20"
                    }, 
                    {
                        "accountingPeriodName": "Open-Ended", 
                        "newAmount": "30"
                    }
                ], 
                "revenueEvent": {
                    "eventType": "Revenue Distributed", 
                    "eventTypeSystemId": "RevenueDistributed__z", 
                    "notes": "My notes"
                }
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"revenueDistributions\": [\n        {\n            \"accountingPeriodName\": \"Jan '16\", \n            \"newAmount\": \"20\"\n        }, \n        {\n            \"accountingPeriodName\": \"Open-Ended\", \n            \"newAmount\": \"30\"\n        }\n    ], \n    \"revenueEvent\": {\n        \"eventType\": \"Revenue Distributed\", \n        \"eventTypeSystemId\": \"RevenueDistributed__z\", \n        \"notes\": \"My notes\"\n    }\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/revenue-schedules/invoice-items/{invoice-item-id}")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"revenueDistributions\": [\n        {\n            \"accountingPeriodName\": \"Jan '16\", \n            \"newAmount\": \"20\"\n        }, \n        {\n            \"accountingPeriodName\": \"Open-Ended\", \n            \"newAmount\": \"30\"\n        }\n    ], \n    \"revenueEvent\": {\n        \"eventType\": \"Revenue Distributed\", \n        \"eventTypeSystemId\": \"RevenueDistributed__z\", \n        \"notes\": \"My notes\"\n    }\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/revenue-schedules/invoice-items/{invoice-item-id}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/revenue-schedules/invoice-items/{invoice-item-id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"revenueDistributions\": [\n        {\n            \"accountingPeriodName\": \"Jan '16\", \n            \"newAmount\": \"20\"\n        }, \n        {\n            \"accountingPeriodName\": \"Open-Ended\", \n            \"newAmount\": \"30\"\n        }\n    ], \n    \"revenueEvent\": {\n        \"eventType\": \"Revenue Distributed\", \n        \"eventTypeSystemId\": \"RevenueDistributed__z\", \n        \"notes\": \"My notes\"\n    }\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/revenue-schedules/invoice-items/{invoice-item-id}");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"revenueDistributions\": [\n        {\n            \"accountingPeriodName\": \"Jan '16\", \n            \"newAmount\": \"20\"\n        }, \n        {\n            \"accountingPeriodName\": \"Open-Ended\", \n            \"newAmount\": \"30\"\n        }\n    ], \n    \"revenueEvent\": {\n        \"eventType\": \"Revenue Distributed\", \n        \"eventTypeSystemId\": \"RevenueDistributed__z\", \n        \"notes\": \"My notes\"\n    }\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/revenue-schedules/invoice-items/{invoice-item-id}/distribute-revenue-with-date-range":
    post:
      description: |
        Creates a revenue schedule for an Invoice Item and distribute the revenue by specifying the recognition start and end dates.
      operationId: POST_RSforInvoiceItem_DistributeByDateRange
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            ID of the Invoice Item, for example, e20b07fd416dcfcf0141c81164fd0a75.
            If the specified Invoice Item is already associated with a revenue schedule, the call will fail.
          in: path
          name: invoice-item-id
          required: true
          schema:
            type: string
      requestBody:
        $ref: "#/components/requestBodies/POSTRevenueScheduleByDateRangeType"
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    revenueScheduleNumber: RS-00000003
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTRevenueScheduleByTransactionResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Create a revenue schedule for an invoice item (distribute by date range)
      tags:
        - Revenue Schedules
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "distributionType": "Daily distribution", 
                "notes": "Manually distribute revenue by usage", 
                "recognitionEnd": "2016-12-31", 
                "recognitionStart": "2016-12-1", 
                "revenueEvent": {
                    "eventType": "Revenue Distributed", 
                    "eventTypeSystemId": "RevenueDistributed__z", 
                    "notes": ""
                }
            }' "https://rest.zuora.com/v1/revenue-schedules/invoice-items/{invoice-item-id}/distribute-revenue-with-date-range"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/revenue-schedules/invoice-items/{invoice-item-id}/distribute-revenue-with-date-range');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "distributionType": "Daily distribution", 
                "notes": "Manually distribute revenue by usage", 
                "recognitionEnd": "2016-12-31", 
                "recognitionStart": "2016-12-1", 
                "revenueEvent": {
                    "eventType": "Revenue Distributed", 
                    "eventTypeSystemId": "RevenueDistributed__z", 
                    "notes": ""
                }
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"distributionType\": \"Daily distribution\", \n    \"notes\": \"Manually distribute revenue by usage\", \n    \"recognitionEnd\": \"2016-12-31\", \n    \"recognitionStart\": \"2016-12-1\", \n    \"revenueEvent\": {\n        \"eventType\": \"Revenue Distributed\", \n        \"eventTypeSystemId\": \"RevenueDistributed__z\", \n        \"notes\": \"\"\n    }\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/revenue-schedules/invoice-items/{invoice-item-id}/distribute-revenue-with-date-range")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"distributionType\": \"Daily distribution\", \n    \"notes\": \"Manually distribute revenue by usage\", \n    \"recognitionEnd\": \"2016-12-31\", \n    \"recognitionStart\": \"2016-12-1\", \n    \"revenueEvent\": {\n        \"eventType\": \"Revenue Distributed\", \n        \"eventTypeSystemId\": \"RevenueDistributed__z\", \n        \"notes\": \"\"\n    }\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/revenue-schedules/invoice-items/{invoice-item-id}/distribute-revenue-with-date-range", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/revenue-schedules/invoice-items/{invoice-item-id}/distribute-revenue-with-date-range")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"distributionType\": \"Daily distribution\", \n    \"notes\": \"Manually distribute revenue by usage\", \n    \"recognitionEnd\": \"2016-12-31\", \n    \"recognitionStart\": \"2016-12-1\", \n    \"revenueEvent\": {\n        \"eventType\": \"Revenue Distributed\", \n        \"eventTypeSystemId\": \"RevenueDistributed__z\", \n        \"notes\": \"\"\n    }\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/revenue-schedules/invoice-items/{invoice-item-id}/distribute-revenue-with-date-range");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"distributionType\": \"Daily distribution\", \n    \"notes\": \"Manually distribute revenue by usage\", \n    \"recognitionEnd\": \"2016-12-31\", \n    \"recognitionStart\": \"2016-12-1\", \n    \"revenueEvent\": {\n        \"eventType\": \"Revenue Distributed\", \n        \"eventTypeSystemId\": \"RevenueDistributed__z\", \n        \"notes\": \"\"\n    }\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/revenue-schedules/product-charges/{charge-key}/{account-key}":
    get:
      description: |
        **Note:** This operation is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

        Retrieves the details about all revenue schedules of a product rate plan charge by specifying the charge ID and billing account ID.
      operationId: GET_RSbyProductChargeAndBillingAccount
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize_finance_revenue"
        - description: |
            The account number or account ID.
          in: path
          name: account-key
          required: true
          schema:
            type: string
        - description: |
            The unique ID of a product rate plan charge. For example, 8a8082e65ba86084015bb323d3c61d82.
          in: path
          name: charge-key
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    revenueSchedules:
                      - accountId: 2c90838f42cf16030142cf215ecb0014
                        amount: 100
                        createdOn: 2017-03-03 09:55:53
                        currency: USD
                        linkedTransactionId: 4028903b5a7eb9bc015a91df45ea024e
                        linkedTransactionNumber: DM00000003
                        linkedTransactionType: DebitMemoItem
                        notes: some notes
                        number: RS-00000123
                        productChargeId: 4028903b5a7eb9bc015a91a77404016a
                        recognitionRuleName: Custom - Unlimited recognition
                        recognizedRevenue: 0
                        referenceId: null
                        revenueItems:
                          - accountingPeriodEndDate: 2017-03-31
                            accountingPeriodName: Mar-2017
                            accountingPeriodStartDate: 2017-03-01
                            amount: 50
                            currency: USD
                            deferredRevenueAccountingCode: null
                            deferredRevenueAccountingCodeType: null
                            isAccountingPeriodClosed: false
                            recognizedRevenueAccountingCode: null
                            recognizedRevenueAccountingCodeType: null
                          - accountingPeriodEndDate: 2017-04-30
                            accountingPeriodName: Apr-2017
                            accountingPeriodStartDate: 2017-04-01
                            amount: 50
                            currency: USD
                            deferredRevenueAccountingCode: null
                            deferredRevenueAccountingCodeType: null
                            isAccountingPeriodClosed: false
                            recognizedRevenueAccountingCode: null
                            recognizedRevenueAccountingCodeType: null
                        revenueScheduleDate: 2017-03-03
                        undistributedUnrecognizedRevenue: 0
                        unrecognizedRevenue: 100
                        updatedOn: 2017-03-03 09:55:53
                      - accountId: 2c90838f42cf16030142cf215ecb0014
                        amount: 98.9
                        createdOn: 2017-03-03 09:36:57
                        currency: USD
                        linkedTransactionId: 4028903b5a7eb9bc015a91cc368101d1
                        linkedTransactionNumber: DM00000002
                        linkedTransactionType: DebitMemoItem
                        notes: notes
                        number: RS-00000120
                        productChargeId: 4028903b5a7eb9bc015a91a77404016a
                        recognitionRuleName: Custom - Unlimited recognition
                        recognizedRevenue: 0
                        referenceId: null
                        revenueItems:
                          - accountingPeriodEndDate: 2016-01-31
                            accountingPeriodName: Jan-2016
                            accountingPeriodStartDate: 2016-01-01
                            amount: 98.9
                            currency: USD
                            deferredRevenueAccountingCode: null
                            deferredRevenueAccountingCodeType: null
                            isAccountingPeriodClosed: false
                            recognizedRevenueAccountingCode: null
                            recognizedRevenueAccountingCodeType: null
                        revenueScheduleDate: 2017-03-03
                        undistributedUnrecognizedRevenue: 0
                        unrecognizedRevenue: 100
                        updatedOn: 2017-03-03 09:36:57
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRSDetailsByProductChargeType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: |
        List revenue schedules of a product charge by charge ID and account key
      tags:
        - Revenue Schedules
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/revenue-schedules/product-charges/{charge-key}/{account-key}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/revenue-schedules/product-charges/{charge-key}/{account-key}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/revenue-schedules/product-charges/{charge-key}/{account-key}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/revenue-schedules/product-charges/{charge-key}/{account-key}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/revenue-schedules/product-charges/{charge-key}/{account-key}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/revenue-schedules/product-charges/{charge-key}/{account-key}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/revenue-schedules/subscription-charges/{charge-key}":
    get:
      description: |
        Retrieves the revenue schedule details by specifying subscription charge ID. Request and response field descriptions and sample code are provided
      operationId: GET_RSforSubscCharge
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize_finance_revenue"
        - description: ID of the subscription rate plan charge; for example, 402892793e173340013e173b81000012.
          in: path
          name: charge-key
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    nextPage: https://rest.zuora.com/v1/revenue-schedules/subscription-charges/2c92c0f943977b4f0143b23487ed432e?page=2&pageSize=8
                    revenueSchedules:
                      - accountId: 2c92c0f8439770960143b2141f5a584e
                        amount: 50
                        createdOn: 2014-01-21 13:59:25
                        currency: USD
                        linkedTransactionId: 2c92c094439782460143b62c2ee90f5a
                        linkedTransactionType: InvoiceItem
                        notes: null
                        number: RS-00000291
                        recognitionRuleName: Recognize upon invoicing
                        recognizedRevenue: 0
                        referenceId: null
                        revenueItems:
                          - accountingPeriodEndDate: null
                            accountingPeriodName: Open-Ended
                            accountingPeriodStartDate: 2013-12-11
                            amount: 50
                            currency: USD
                            deferredRevenueAccountingCode: null
                            deferredRevenueAccountingCodeType: null
                            isAccountingPeriodClosed: false
                            recognizedRevenueAccountingCode: null
                            recognizedRevenueAccountingCodeType: null
                        revenueScheduleDate: 2014-01-21
                        subscriptionChargeId: 2c92c0f943977b4f0143b23487ed432e
                        subscriptionId: 2c92c0f943977b4f0143b23487994327
                        undistributedUnrecognizedRevenue: 50
                        unrecognizedRevenue: 50
                        updatedOn: 2014-01-21 13:59:25
                      - accountId: 2c92c0f8439770960143b2141f5a584e
                        amount: 50
                        createdOn: 2014-01-21 13:59:25
                        currency: USD
                        linkedTransactionId: 2c92c094439782460143b62c2ee60f59
                        linkedTransactionNumber: INV00000838
                        linkedTransactionType: InvoiceItem
                        notes: null
                        number: RS-00000290
                        recognitionRuleName: Recognize upon invoicing
                        recognizedRevenue: 0
                        referenceId: null
                        revenueItems:
                          - accountingPeriodEndDate: null
                            accountingPeriodName: Open-Ended
                            accountingPeriodStartDate: 2013-12-11
                            amount: 50
                            currency: USD
                            deferredRevenueAccountingCode: null
                            deferredRevenueAccountingCodeType: null
                            isAccountingPeriodClosed: false
                            recognizedRevenueAccountingCode: null
                            recognizedRevenueAccountingCodeType: null
                        revenueScheduleDate: 2014-01-21
                        subscriptionChargeId: 2c92c0f943977b4f0143b23487ed432e
                        subscriptionId: 2c92c0f943977b4f0143b23487994327
                        undistributedUnrecognizedRevenue: 50
                        unrecognizedRevenue: 50
                        updatedOn: 2014-01-21 13:59:25
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRSDetailsByChargeType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List revenue schedules by subscription charge key
      tags:
        - Revenue Schedules
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/revenue-schedules/subscription-charges/{charge-key}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/revenue-schedules/subscription-charges/{charge-key}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/revenue-schedules/subscription-charges/{charge-key}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/revenue-schedules/subscription-charges/{charge-key}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/revenue-schedules/subscription-charges/{charge-key}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/revenue-schedules/subscription-charges/{charge-key}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    post:
      description: |
        Creates a revenue schedule by specifying the subscription charge. This method is for custom unlimited revenue recognition only.

        **Note**: You can create a maximum of 3,000 revenue schedules for a subscription charge.
      operationId: POST_RSforSubscCharge
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: ID of the subscription rate plan charge; for example, 402892793e173340013e173b81000012.
          in: path
          name: charge-key
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTRevenueScheduleByChargeType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    revenueScheduleNumber: rs-00000001
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTRevenueScheduleByChargeResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Create a revenue schedule by subscription charge key
      tags:
        - Revenue Schedules
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "amount": "300", 
                "deferredRevenueAccountingCode": "Deferred Revenue", 
                "deferredRevenueAccountingCodeType": "Deferred Revenue", 
                "overrideChargeAccountingCodes": "true", 
                "recognizedRevenueAccountingCode": "Subscription Revenue", 
                "recognizedRevenueAccountingCodeType": "Sales Revenue", 
                "referenceId": "rs transaction ref", 
                "revenueDistributions": [
                    {
                        "accountingPeriodName": "Jan'\''2013", 
                        "newAmount": "100"
                    }, 
                    {
                        "accountingPeriodName": "Feb'\''2013", 
                        "newAmount": "200"
                    }
                ], 
                "revenueEvent": {
                    "eventType": "Revenue Distributed", 
                    "eventTypeSystemId": "1111111", 
                    "notes": "Manually distribute revenue by usage"
                }, 
                "revenueScheduleDate": "2013-01-01"
            }' "https://rest.zuora.com/v1/revenue-schedules/subscription-charges/{charge-key}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/revenue-schedules/subscription-charges/{charge-key}');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "amount": "300", 
                "deferredRevenueAccountingCode": "Deferred Revenue", 
                "deferredRevenueAccountingCodeType": "Deferred Revenue", 
                "overrideChargeAccountingCodes": "true", 
                "recognizedRevenueAccountingCode": "Subscription Revenue", 
                "recognizedRevenueAccountingCodeType": "Sales Revenue", 
                "referenceId": "rs transaction ref", 
                "revenueDistributions": [
                    {
                        "accountingPeriodName": "Jan\'2013", 
                        "newAmount": "100"
                    }, 
                    {
                        "accountingPeriodName": "Feb\'2013", 
                        "newAmount": "200"
                    }
                ], 
                "revenueEvent": {
                    "eventType": "Revenue Distributed", 
                    "eventTypeSystemId": "1111111", 
                    "notes": "Manually distribute revenue by usage"
                }, 
                "revenueScheduleDate": "2013-01-01"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"amount\": \"300\", \n    \"deferredRevenueAccountingCode\": \"Deferred Revenue\", \n    \"deferredRevenueAccountingCodeType\": \"Deferred Revenue\", \n    \"overrideChargeAccountingCodes\": \"true\", \n    \"recognizedRevenueAccountingCode\": \"Subscription Revenue\", \n    \"recognizedRevenueAccountingCodeType\": \"Sales Revenue\", \n    \"referenceId\": \"rs transaction ref\", \n    \"revenueDistributions\": [\n        {\n            \"accountingPeriodName\": \"Jan'2013\", \n            \"newAmount\": \"100\"\n        }, \n        {\n            \"accountingPeriodName\": \"Feb'2013\", \n            \"newAmount\": \"200\"\n        }\n    ], \n    \"revenueEvent\": {\n        \"eventType\": \"Revenue Distributed\", \n        \"eventTypeSystemId\": \"1111111\", \n        \"notes\": \"Manually distribute revenue by usage\"\n    }, \n    \"revenueScheduleDate\": \"2013-01-01\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/revenue-schedules/subscription-charges/{charge-key}")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"amount\": \"300\", \n    \"deferredRevenueAccountingCode\": \"Deferred Revenue\", \n    \"deferredRevenueAccountingCodeType\": \"Deferred Revenue\", \n    \"overrideChargeAccountingCodes\": \"true\", \n    \"recognizedRevenueAccountingCode\": \"Subscription Revenue\", \n    \"recognizedRevenueAccountingCodeType\": \"Sales Revenue\", \n    \"referenceId\": \"rs transaction ref\", \n    \"revenueDistributions\": [\n        {\n            \"accountingPeriodName\": \"Jan'2013\", \n            \"newAmount\": \"100\"\n        }, \n        {\n            \"accountingPeriodName\": \"Feb'2013\", \n            \"newAmount\": \"200\"\n        }\n    ], \n    \"revenueEvent\": {\n        \"eventType\": \"Revenue Distributed\", \n        \"eventTypeSystemId\": \"1111111\", \n        \"notes\": \"Manually distribute revenue by usage\"\n    }, \n    \"revenueScheduleDate\": \"2013-01-01\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/revenue-schedules/subscription-charges/{charge-key}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/revenue-schedules/subscription-charges/{charge-key}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"amount\": \"300\", \n    \"deferredRevenueAccountingCode\": \"Deferred Revenue\", \n    \"deferredRevenueAccountingCodeType\": \"Deferred Revenue\", \n    \"overrideChargeAccountingCodes\": \"true\", \n    \"recognizedRevenueAccountingCode\": \"Subscription Revenue\", \n    \"recognizedRevenueAccountingCodeType\": \"Sales Revenue\", \n    \"referenceId\": \"rs transaction ref\", \n    \"revenueDistributions\": [\n        {\n            \"accountingPeriodName\": \"Jan'2013\", \n            \"newAmount\": \"100\"\n        }, \n        {\n            \"accountingPeriodName\": \"Feb'2013\", \n            \"newAmount\": \"200\"\n        }\n    ], \n    \"revenueEvent\": {\n        \"eventType\": \"Revenue Distributed\", \n        \"eventTypeSystemId\": \"1111111\", \n        \"notes\": \"Manually distribute revenue by usage\"\n    }, \n    \"revenueScheduleDate\": \"2013-01-01\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/revenue-schedules/subscription-charges/{charge-key}");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"amount\": \"300\", \n    \"deferredRevenueAccountingCode\": \"Deferred Revenue\", \n    \"deferredRevenueAccountingCodeType\": \"Deferred Revenue\", \n    \"overrideChargeAccountingCodes\": \"true\", \n    \"recognizedRevenueAccountingCode\": \"Subscription Revenue\", \n    \"recognizedRevenueAccountingCodeType\": \"Sales Revenue\", \n    \"referenceId\": \"rs transaction ref\", \n    \"revenueDistributions\": [\n        {\n            \"accountingPeriodName\": \"Jan'2013\", \n            \"newAmount\": \"100\"\n        }, \n        {\n            \"accountingPeriodName\": \"Feb'2013\", \n            \"newAmount\": \"200\"\n        }\n    ], \n    \"revenueEvent\": {\n        \"eventType\": \"Revenue Distributed\", \n        \"eventTypeSystemId\": \"1111111\", \n        \"notes\": \"Manually distribute revenue by usage\"\n    }, \n    \"revenueScheduleDate\": \"2013-01-01\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/revenue-schedules/{rs-number}":
    delete:
      description: |
        Deletes a revenue schedule by specifying its revenue schedule number
        ## Prerequisites
        You must have the Delete Custom Revenue Schedule permissions in Zuora Finance.

        The revenue schedule must not be associated with any invoice item, invoice item adjustment, or credit/debit memo item in Zuora Billing.
      operationId: DELETE_RS
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            
            Revenue schedule number of the revenue schedule you want to delete, for example, RS-00000256. To be deleted, the revenue schedule:
            * Must be using a custom unlimited recognition rule.
            * Cannot have any revenue in a closed accounting period.
            * Cannot be included in a summary journal entry.
            * Cannot have a revenue schedule date in a closed accounting period.
          in: path
          name: rs-number
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Delete a revenue schedule
      tags:
        - Revenue Schedules
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/revenue-schedules/{rs-number}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/revenue-schedules/{rs-number}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/revenue-schedules/{rs-number}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/v1/revenue-schedules/{rs-number}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/revenue-schedules/{rs-number}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/revenue-schedules/{rs-number}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      description: |
        Retrieves the details of a revenue schedule by specifying the revenue schedule number. Request and response field descriptions and sample code are provided.
      operationId: GET_RS
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            Revenue schedule number. The revenue schedule number is always prefixed with "RS", for example, "RS-00000001".
          in: path
          name: rs-number
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 2c92c0f8439770960143b2141f5a584e
                    amount: 50
                    createdOn: 2014-01-20 16:36:45
                    currency: USD
                    linkedTransactionId: 2c92c095439782cd0143b239aa234cf5
                    linkedTransactionType: InvoiceItem
                    notes: change recognition term
                    number: RS-00000008
                    recognitionRuleName: Recognize upon invoicing
                    recognizedRevenue: 0
                    referenceId: null
                    revenueItems:
                      - accountingPeriodEndDate: 2013-10-31
                        accountingPeriodName: Nov'2013
                        accountingPeriodStartDate: 2013-10-01
                        amount: 60
                        currency: USD
                        deferredRevenueAccountingCode: MONTHLY RECURRING CHARGE
                        deferredRevenueAccountingCodeType: "Liabilities: Deferred Revenue"
                        isAccountingPeriodClosed: true
                        recognizedRevenueAccountingCode: MONTHLY RECURRING CHARGE
                        recognizedRevenueAccountingCodeType: "Revenue: Sales"
                      - accountingPeriodEndDate: null
                        accountingPeriodName: Open-Ended
                        accountingPeriodStartDate: 2013-11-01
                        amount: -10
                        currency: USD
                        deferredRevenueAccountingCode: MONTHLY RECURRING CHARGE
                        deferredRevenueAccountingCodeType: "Liabilities: Sales"
                        isAccountingPeriodClosed: false
                        recognizedRevenueAccountingCode: MONTHLY RECURRING CHARGE
                        recognizedRevenueAccountingCodeType: "Revenue: Sales"
                    revenueScheduleDate: 2014-01-20
                    subscriptionChargeId: 2c92c0f943977b4f0143b23487ed432e
                    subscriptionId: 2c92c0f943977b4f0143b23487994327
                    success: true
                    undistributedUnrecognizedRevenue: -10
                    unrecognizedRevenue: 50
                    updatedOn: 2014-01-28 17:05:52
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRSDetailType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List all details of a revenue schedule
      tags:
        - Revenue Schedules
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/revenue-schedules/{rs-number}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/revenue-schedules/{rs-number}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/revenue-schedules/{rs-number}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/revenue-schedules/{rs-number}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/revenue-schedules/{rs-number}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/revenue-schedules/{rs-number}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/revenue-schedules/{rs-number}/basic-information":
    put:
      description: |
        Retrieves basic information of a revenue schedule by specifying the revenue schedule number. Request and response field descriptions and sample code are provided.
      operationId: PUT_RSBasicInfo
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            Revenue schedule number. The revenue schedule number is always prefixed with "RS", for example, "RS-00000001".
          in: path
          name: rs-number
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTRSBasicInfoType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Update a revenue schedule
      tags:
        - Revenue Schedules
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "notes": "change recognition term", 
                "referenceId": "Reference ID"
            }' "https://rest.zuora.com/v1/revenue-schedules/{rs-number}/basic-information"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/revenue-schedules/{rs-number}/basic-information');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "notes": "change recognition term", 
                "referenceId": "Reference ID"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"notes\": \"change recognition term\", \n    \"referenceId\": \"Reference ID\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/revenue-schedules/{rs-number}/basic-information")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"notes\": \"change recognition term\", \n    \"referenceId\": \"Reference ID\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/revenue-schedules/{rs-number}/basic-information", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/revenue-schedules/{rs-number}/basic-information")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"notes\": \"change recognition term\", \n    \"referenceId\": \"Reference ID\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/revenue-schedules/{rs-number}/basic-information");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"notes\": \"change recognition term\", \n    \"referenceId\": \"Reference ID\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/revenue-schedules/{rs-number}/distribute-revenue-across-accounting-periods":
    put:
      description: |
        Distributes revenue by specifying the revenue schedule number. Request and response field descriptions and sample code are provided.
      operationId: PUT_RevenueAcrossAP
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            Revenue schedule number. The revenue schedule number is always prefixed with "RS", for example, "RS-00000001".
          in: path
          name: rs-number
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTAllocateManuallyType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    revenueEventNumber: RE-00000326
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PUTRevenueScheduleResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Distribute revenue across accounting periods
      tags:
        - Revenue Schedules
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "eventType": "Revenue Distributed", 
                "eventTypeSystemId": "RevenueDistributed__z", 
                "notes": "Manually distribute revenue for Phase 1", 
                "revenueDistributions": [
                    {
                        "accountingPeriodName": "Jan'\''2013", 
                        "newAmount": "500"
                    }, 
                    {
                        "accountingPeriodName": "Feb'\''2013", 
                        "newAmount": "600"
                    }
                ]
            }' "https://rest.zuora.com/v1/revenue-schedules/{rs-number}/distribute-revenue-across-accounting-periods"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/revenue-schedules/{rs-number}/distribute-revenue-across-accounting-periods');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "eventType": "Revenue Distributed", 
                "eventTypeSystemId": "RevenueDistributed__z", 
                "notes": "Manually distribute revenue for Phase 1", 
                "revenueDistributions": [
                    {
                        "accountingPeriodName": "Jan\'2013", 
                        "newAmount": "500"
                    }, 
                    {
                        "accountingPeriodName": "Feb\'2013", 
                        "newAmount": "600"
                    }
                ]
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"eventType\": \"Revenue Distributed\", \n    \"eventTypeSystemId\": \"RevenueDistributed__z\", \n    \"notes\": \"Manually distribute revenue for Phase 1\", \n    \"revenueDistributions\": [\n        {\n            \"accountingPeriodName\": \"Jan'2013\", \n            \"newAmount\": \"500\"\n        }, \n        {\n            \"accountingPeriodName\": \"Feb'2013\", \n            \"newAmount\": \"600\"\n        }\n    ]\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/revenue-schedules/{rs-number}/distribute-revenue-across-accounting-periods")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"eventType\": \"Revenue Distributed\", \n    \"eventTypeSystemId\": \"RevenueDistributed__z\", \n    \"notes\": \"Manually distribute revenue for Phase 1\", \n    \"revenueDistributions\": [\n        {\n            \"accountingPeriodName\": \"Jan'2013\", \n            \"newAmount\": \"500\"\n        }, \n        {\n            \"accountingPeriodName\": \"Feb'2013\", \n            \"newAmount\": \"600\"\n        }\n    ]\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/revenue-schedules/{rs-number}/distribute-revenue-across-accounting-periods", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/revenue-schedules/{rs-number}/distribute-revenue-across-accounting-periods")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"eventType\": \"Revenue Distributed\", \n    \"eventTypeSystemId\": \"RevenueDistributed__z\", \n    \"notes\": \"Manually distribute revenue for Phase 1\", \n    \"revenueDistributions\": [\n        {\n            \"accountingPeriodName\": \"Jan'2013\", \n            \"newAmount\": \"500\"\n        }, \n        {\n            \"accountingPeriodName\": \"Feb'2013\", \n            \"newAmount\": \"600\"\n        }\n    ]\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/revenue-schedules/{rs-number}/distribute-revenue-across-accounting-periods");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"eventType\": \"Revenue Distributed\", \n    \"eventTypeSystemId\": \"RevenueDistributed__z\", \n    \"notes\": \"Manually distribute revenue for Phase 1\", \n    \"revenueDistributions\": [\n        {\n            \"accountingPeriodName\": \"Jan'2013\", \n            \"newAmount\": \"500\"\n        }, \n        {\n            \"accountingPeriodName\": \"Feb'2013\", \n            \"newAmount\": \"600\"\n        }\n    ]\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/revenue-schedules/{rs-number}/distribute-revenue-on-specific-date":
    put:
      description: |
        Distributes revenue on a specific recognition date. Request and response field descriptions and sample code are provided.
      operationId: PUT_RevenueSpecificDate
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            Revenue schedule number. The revenue schedule number is always prefixed with "RS", for example, "RS-00000001".
          in: path
          name: rs-number
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTSpecificDateAllocationType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    revenueEventNumber: RE-00000326
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PUTRevenueScheduleResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Distribute revenue on a specific date
      tags:
        - Revenue Schedules
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "amount": "1000.00", 
                "distributeOn": "2016-02-03", 
                "distributionType": "specific date (delta fixed amount)", 
                "eventType": "Revenue Distributed", 
                "eventTypeSystemId": "RevenueDistributed__z", 
                "notes": "service delivered and accepted by customer"
            }' "https://rest.zuora.com/v1/revenue-schedules/{rs-number}/distribute-revenue-on-specific-date"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/revenue-schedules/{rs-number}/distribute-revenue-on-specific-date');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "amount": "1000.00", 
                "distributeOn": "2016-02-03", 
                "distributionType": "specific date (delta fixed amount)", 
                "eventType": "Revenue Distributed", 
                "eventTypeSystemId": "RevenueDistributed__z", 
                "notes": "service delivered and accepted by customer"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"amount\": \"1000.00\", \n    \"distributeOn\": \"2016-02-03\", \n    \"distributionType\": \"specific date (delta fixed amount)\", \n    \"eventType\": \"Revenue Distributed\", \n    \"eventTypeSystemId\": \"RevenueDistributed__z\", \n    \"notes\": \"service delivered and accepted by customer\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/revenue-schedules/{rs-number}/distribute-revenue-on-specific-date")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"amount\": \"1000.00\", \n    \"distributeOn\": \"2016-02-03\", \n    \"distributionType\": \"specific date (delta fixed amount)\", \n    \"eventType\": \"Revenue Distributed\", \n    \"eventTypeSystemId\": \"RevenueDistributed__z\", \n    \"notes\": \"service delivered and accepted by customer\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/revenue-schedules/{rs-number}/distribute-revenue-on-specific-date", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/revenue-schedules/{rs-number}/distribute-revenue-on-specific-date")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"amount\": \"1000.00\", \n    \"distributeOn\": \"2016-02-03\", \n    \"distributionType\": \"specific date (delta fixed amount)\", \n    \"eventType\": \"Revenue Distributed\", \n    \"eventTypeSystemId\": \"RevenueDistributed__z\", \n    \"notes\": \"service delivered and accepted by customer\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/revenue-schedules/{rs-number}/distribute-revenue-on-specific-date");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"amount\": \"1000.00\", \n    \"distributeOn\": \"2016-02-03\", \n    \"distributionType\": \"specific date (delta fixed amount)\", \n    \"eventType\": \"Revenue Distributed\", \n    \"eventTypeSystemId\": \"RevenueDistributed__z\", \n    \"notes\": \"service delivered and accepted by customer\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/revenue-schedules/{rs-number}/distribute-revenue-with-date-range":
    put:
      description: |
        Distributes revenue by specifying the recognition start and end dates. Request and response field descriptions and sample code are provided.
      operationId: PUT_RevenueByRecognitionStartandEndDates
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            Revenue schedule number. Specify the revenue schedule whose revenue you want to distribute.
              
            The revenue schedule number is always prefixed with "RS", for example, "RS-00000001".
          in: path
          name: rs-number
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTRSTermType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    revenueEventNumber: RE-00000326
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PUTRevenueScheduleResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Distribute revenue in a recognition period
      tags:
        - Revenue Schedules
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "distributionType": "Daily distribution", 
                "eventType": "Revenue Distributed", 
                "eventTypeSystemId": "RevenueDistributed__z", 
                "notes": "manual distribute revenue by usage", 
                "recognitionEnd": "2015-12-31", 
                "recognitionStart": "2015-12-1"
            }' "https://rest.zuora.com/v1/revenue-schedules/{rs-number}/distribute-revenue-with-date-range"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/revenue-schedules/{rs-number}/distribute-revenue-with-date-range');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "distributionType": "Daily distribution", 
                "eventType": "Revenue Distributed", 
                "eventTypeSystemId": "RevenueDistributed__z", 
                "notes": "manual distribute revenue by usage", 
                "recognitionEnd": "2015-12-31", 
                "recognitionStart": "2015-12-1"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"distributionType\": \"Daily distribution\", \n    \"eventType\": \"Revenue Distributed\", \n    \"eventTypeSystemId\": \"RevenueDistributed__z\", \n    \"notes\": \"manual distribute revenue by usage\", \n    \"recognitionEnd\": \"2015-12-31\", \n    \"recognitionStart\": \"2015-12-1\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/revenue-schedules/{rs-number}/distribute-revenue-with-date-range")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"distributionType\": \"Daily distribution\", \n    \"eventType\": \"Revenue Distributed\", \n    \"eventTypeSystemId\": \"RevenueDistributed__z\", \n    \"notes\": \"manual distribute revenue by usage\", \n    \"recognitionEnd\": \"2015-12-31\", \n    \"recognitionStart\": \"2015-12-1\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/revenue-schedules/{rs-number}/distribute-revenue-with-date-range", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/revenue-schedules/{rs-number}/distribute-revenue-with-date-range")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"distributionType\": \"Daily distribution\", \n    \"eventType\": \"Revenue Distributed\", \n    \"eventTypeSystemId\": \"RevenueDistributed__z\", \n    \"notes\": \"manual distribute revenue by usage\", \n    \"recognitionEnd\": \"2015-12-31\", \n    \"recognitionStart\": \"2015-12-1\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/revenue-schedules/{rs-number}/distribute-revenue-with-date-range");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"distributionType\": \"Daily distribution\", \n    \"eventType\": \"Revenue Distributed\", \n    \"eventTypeSystemId\": \"RevenueDistributed__z\", \n    \"notes\": \"manual distribute revenue by usage\", \n    \"recognitionEnd\": \"2015-12-31\", \n    \"recognitionStart\": \"2015-12-1\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/revpro-accounting-codes:
    put:
      description: Update the Zuora Revenue accounting code that corresponds to a specific Product Rate Plan Charge Id in Zuora Billing.
      operationId: PUT_RevProAccountingCodes
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/RevproAccountingCodes"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PUTRevproAccCodeResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Update a Zuora Revenue accounting code
      tags:
        - Zuora Revenue Integration
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "adjustmentLiabilityAccount": "adjustL-1", 
                "adjustmentRevenueAccount": "adjustRev-1", 
                "contractAssetAccount": "CA-2", 
                "contractLiabilityAccount": "CL-2", 
                "productRatePlanChargeId": "2c92c0f962470b8101624b869fcd45fc", 
                "recognizedRevenueAccount": "ContractRevRec-1", 
                "unbilledReceivablesAccount": "unbilledR-1"
            }' "https://rest.zuora.com/v1/revpro-accounting-codes"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/revpro-accounting-codes');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "adjustmentLiabilityAccount": "adjustL-1", 
                "adjustmentRevenueAccount": "adjustRev-1", 
                "contractAssetAccount": "CA-2", 
                "contractLiabilityAccount": "CL-2", 
                "productRatePlanChargeId": "2c92c0f962470b8101624b869fcd45fc", 
                "recognizedRevenueAccount": "ContractRevRec-1", 
                "unbilledReceivablesAccount": "unbilledR-1"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"adjustmentLiabilityAccount\": \"adjustL-1\", \n    \"adjustmentRevenueAccount\": \"adjustRev-1\", \n    \"contractAssetAccount\": \"CA-2\", \n    \"contractLiabilityAccount\": \"CL-2\", \n    \"productRatePlanChargeId\": \"2c92c0f962470b8101624b869fcd45fc\", \n    \"recognizedRevenueAccount\": \"ContractRevRec-1\", \n    \"unbilledReceivablesAccount\": \"unbilledR-1\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/revpro-accounting-codes")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"adjustmentLiabilityAccount\": \"adjustL-1\", \n    \"adjustmentRevenueAccount\": \"adjustRev-1\", \n    \"contractAssetAccount\": \"CA-2\", \n    \"contractLiabilityAccount\": \"CL-2\", \n    \"productRatePlanChargeId\": \"2c92c0f962470b8101624b869fcd45fc\", \n    \"recognizedRevenueAccount\": \"ContractRevRec-1\", \n    \"unbilledReceivablesAccount\": \"unbilledR-1\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/revpro-accounting-codes", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/revpro-accounting-codes")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"adjustmentLiabilityAccount\": \"adjustL-1\", \n    \"adjustmentRevenueAccount\": \"adjustRev-1\", \n    \"contractAssetAccount\": \"CA-2\", \n    \"contractLiabilityAccount\": \"CL-2\", \n    \"productRatePlanChargeId\": \"2c92c0f962470b8101624b869fcd45fc\", \n    \"recognizedRevenueAccount\": \"ContractRevRec-1\", \n    \"unbilledReceivablesAccount\": \"unbilledR-1\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/revpro-accounting-codes");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"adjustmentLiabilityAccount\": \"adjustL-1\", \n    \"adjustmentRevenueAccount\": \"adjustRev-1\", \n    \"contractAssetAccount\": \"CA-2\", \n    \"contractLiabilityAccount\": \"CL-2\", \n    \"productRatePlanChargeId\": \"2c92c0f962470b8101624b869fcd45fc\", \n    \"recognizedRevenueAccount\": \"ContractRevRec-1\", \n    \"unbilledReceivablesAccount\": \"unbilledR-1\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/rsa-signatures:
    post:
      description: |
        The REST API used in Payment Pages 2.0 are CORS (Cross-Origin Resource Sharing) enabled and therefore requires a digital signature. The POST rsa_signatures call generates and returns the required digital signature and token for a Payment Pages 2.0 form. You need to pass the generated signature to your client for it to access Payment Pages 2.0. 
            
        This REST service should be used only when you implement Payment Pages 2.0. 

        **Note:** To avoid potential credit card fraud attacks, you should secure your Payment Pages from being accessed by fraudulent users before you issue client-side digital signatures and tokens. See [Manage Token Issuance](https://knowledgecenter.zuora.com/CB_Billing/LA_Hosted_Payment_Pages/B_Payment_Pages_2.0/F_Generate_the_Digital_Signature_for_Payment_Pages_2.0#Manage_Token_Issuance) for more information.
      operationId: POST_RSASignatures
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTRSASignatureType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    key: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmWRFTwxQOqaG4JDZSQF/NJWvCDoSXm3TYilNzoN8nBbuvhKa7SZBBS+VP6rFqcbIU38Fu+Rf09vqyYOxuasPJe7yhqeOiStWB/aCPLhwXBeKt37L/qkwpNOKb1FETtUgrc+UjbtT0pnl55wCfi+Ik//X5SQi0B+c0ei1DQv99qmPJJErrhnBtdxeaWAT0EYAo42AOQ5cp0UWDY6OdOYL6+RyFOUFIs1yEgtfg4VMMSpSOKBOhYclQYuSC7nBF5Cc18ydtzsBpf7l49gCLTFzG45NCDAocada8KihFNpGXbauV9V4EPRD4lofaXdsXJ5Tw8/+KCsrUlvIQI3vcEv9LQIDAQAB
                    signature: VpCAFL2hHC2irxbhWYGLJmdBigjARsCStwHZiQ78z5LyVuBCFr2lkie0db/7E8n38MXaq12Ng5As5Qj+9Nhz6RBsSEWLod7c7hvwNI28OcgBZtcV/wscbWU69EP/+/XrQnF3ZUbHbqmcmhE8C/zNnc2zvHckfArroDW2HxxmATfMJS0xKUm5TrHi4tiILZVMYY1KIUqQTyuXV6uRWYzkqMkFkZDNCxSxf0XwzuBI/VOgTCmFZb0c3+bk/q6+7d/azFCrrg8C3dquCNJRfUeaBou+SLUa4TW3hV4rGd2zpvSrD/425x4qFNGV6JQ7wvIleIdrXU4qbh9nCmYoApMODA==
                    success: true
                    tenantId: "12270"
                    token: E2BJEle7YrAlw93SjkaKthTmzMvXF341
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTRSASignatureResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Generate an RSA signature
      tags:
        - RSA Signatures
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "method": "POST", 
                "pageId": "2c92c0f855e2b4630155ec9e6a1b6eec", 
                "uri": "https://apisandbox.zuora.com/apps/PublicHostedPageLite.do"
            }' "https://rest.zuora.com/v1/rsa-signatures"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/rsa-signatures');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "method": "POST", 
                "pageId": "2c92c0f855e2b4630155ec9e6a1b6eec", 
                "uri": "https://apisandbox.zuora.com/apps/PublicHostedPageLite.do"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"method\": \"POST\", \n    \"pageId\": \"2c92c0f855e2b4630155ec9e6a1b6eec\", \n    \"uri\": \"https://apisandbox.zuora.com/apps/PublicHostedPageLite.do\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/rsa-signatures")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"method\": \"POST\", \n    \"pageId\": \"2c92c0f855e2b4630155ec9e6a1b6eec\", \n    \"uri\": \"https://apisandbox.zuora.com/apps/PublicHostedPageLite.do\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/rsa-signatures", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/rsa-signatures")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"method\": \"POST\", \n    \"pageId\": \"2c92c0f855e2b4630155ec9e6a1b6eec\", \n    \"uri\": \"https://apisandbox.zuora.com/apps/PublicHostedPageLite.do\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/rsa-signatures");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"method\": \"POST\", \n    \"pageId\": \"2c92c0f855e2b4630155ec9e6a1b6eec\", \n    \"uri\": \"https://apisandbox.zuora.com/apps/PublicHostedPageLite.do\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/rsa-signatures/decrypt:
    post:
      description: |
        The REST API used in Payment Pages 2.0 are CORS (Cross-Origin Resource Sharing) enabled and therefore requires a digital signature. You use rsa_signatures to generate the required digital signature and token for a Payment Pages 2.0 form, and then you use the decrypt REST service to decrypt the signature to validate the signature and key.

        This REST service should be used only when you implement Payment Pages 2.0. 
      operationId: POST_DecryptRSASignatures
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTDecryptionType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    decryptedSignature: /apps/publichostedpagelite.do#12270#tpyeSbjfUdpZpY4EMSCy7CrupvuhIdvM#1473658419005#2c92c0f855e2b4630155ec9e6a1b6eec
                    publicKey: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmWRFTwxQOqaG4JDZSQF/NJWvCDoSXm3TYilNzoN8nBbuvhKa7SZBBS+VP6rFqcbIU38Fu+Rf09vqyYOxuasPJe7yhqeOiStWB/aCPLhwXBeKt37L/qkwpNOKb1FETtUgrc+UjbtT0pnl55wCfi+Ik//X5SQi0B+c0ei1DQv99qmPJJErrhnBtdxeaWAT0EYAo42AOQ5cp0UWDY6OdOYL6+RyFOUFIs1yEgtfg4VMMSpSOKBOhYclQYuSC7nBF5Cc18ydtzsBpf7l49gCLTFzG45NCDAocada8KihFNpGXbauV9V4EPRD4lofaXdsXJ5Tw8/+KCsrUlvIQI3vcEv9LQIDAQAB
                    signature: BeNYuHFkp/sbfm3clYyCkKEqd7XVTRDOJ1/5rL0tpkqxiSq+maqYkDz5kA+lN64ipoefQuJ7Rdm5TpICErufeJfa2sfTmGARDJ0hr+StXfLsIxHmDoNH5dqcXv3W6MR4kaljEqPVuhzGQ0We98DG52JcHWqqN53oHwTyuZuXocQqnmiE23IPm8UrU3g4hX/OLat0R81wDQ1SslZ+4pnqlncpTpopCK4FxeG3B0gYMhZcYd17Cmf0N3tEHVXHDlJIm4rOx0OVT+YBnjbKYLM0jxYu7PRKRis+yzN1BoappOEB0gmPjznIeiYF0u/fJdZWoEwK7d9mrfJeOBbpFyRoHA==
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTDecryptResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Decrypt an RSA signature
      tags:
        - RSA Signatures
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "method": "POST", 
                "publicKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmWRFTwxQOqaG4JDZSQF/NJWvCDoSXm3TYilNzoN8nBbuvhKa7SZBBS+VP6rFqcbIU38Fu+Rf09vqyYOxuasPJe7yhqeOiStWB/aCPLhwXBeKt37L/qkwpNOKb1FETtUgrc+UjbtT0pnl55wCfi+Ik//X5SQi0B+c0ei1DQv99qmPJJErrhnBtdxeaWAT0EYAo42AOQ5cp0UWDY6OdOYL6+RyFOUFIs1yEgtfg4VMMSpSOKBOhYclQYuSC7nBF5Cc18ydtzsBpf7l49gCLTFzG45NCDAocada8KihFNpGXbauV9V4EPRD4lofaXdsXJ5Tw8/+KCsrUlvIQI3vcEv9LQIDAQAB", 
                "signature": "BeNYuHFkp/sbfm3clYyCkKEqd7XVTRDOJ1/5rL0tpkqxiSq+maqYkDz5kA+lN64ipoefQuJ7Rdm5TpICErufeJfa2sfTmGARDJ0hr+StXfLsIxHmDoNH5dqcXv3W6MR4kaljEqPVuhzGQ0We98DG52JcHWqqN53oHwTyuZuXocQqnmiE23IPm8UrU3g4hX/OLat0R81wDQ1SslZ+4pnqlncpTpopCK4FxeG3B0gYMhZcYd17Cmf0N3tEHVXHDlJIm4rOx0OVT+YBnjbKYLM0jxYu7PRKRis+yzN1BoappOEB0gmPjznIeiYF0u/fJdZWoEwK7d9mrfJeOBbpFyRoHA=="
            }' "https://rest.zuora.com/v1/rsa-signatures/decrypt"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/rsa-signatures/decrypt');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "method": "POST", 
                "publicKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmWRFTwxQOqaG4JDZSQF/NJWvCDoSXm3TYilNzoN8nBbuvhKa7SZBBS+VP6rFqcbIU38Fu+Rf09vqyYOxuasPJe7yhqeOiStWB/aCPLhwXBeKt37L/qkwpNOKb1FETtUgrc+UjbtT0pnl55wCfi+Ik//X5SQi0B+c0ei1DQv99qmPJJErrhnBtdxeaWAT0EYAo42AOQ5cp0UWDY6OdOYL6+RyFOUFIs1yEgtfg4VMMSpSOKBOhYclQYuSC7nBF5Cc18ydtzsBpf7l49gCLTFzG45NCDAocada8KihFNpGXbauV9V4EPRD4lofaXdsXJ5Tw8/+KCsrUlvIQI3vcEv9LQIDAQAB", 
                "signature": "BeNYuHFkp/sbfm3clYyCkKEqd7XVTRDOJ1/5rL0tpkqxiSq+maqYkDz5kA+lN64ipoefQuJ7Rdm5TpICErufeJfa2sfTmGARDJ0hr+StXfLsIxHmDoNH5dqcXv3W6MR4kaljEqPVuhzGQ0We98DG52JcHWqqN53oHwTyuZuXocQqnmiE23IPm8UrU3g4hX/OLat0R81wDQ1SslZ+4pnqlncpTpopCK4FxeG3B0gYMhZcYd17Cmf0N3tEHVXHDlJIm4rOx0OVT+YBnjbKYLM0jxYu7PRKRis+yzN1BoappOEB0gmPjznIeiYF0u/fJdZWoEwK7d9mrfJeOBbpFyRoHA=="
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"method\": \"POST\", \n    \"publicKey\": \"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmWRFTwxQOqaG4JDZSQF/NJWvCDoSXm3TYilNzoN8nBbuvhKa7SZBBS+VP6rFqcbIU38Fu+Rf09vqyYOxuasPJe7yhqeOiStWB/aCPLhwXBeKt37L/qkwpNOKb1FETtUgrc+UjbtT0pnl55wCfi+Ik//X5SQi0B+c0ei1DQv99qmPJJErrhnBtdxeaWAT0EYAo42AOQ5cp0UWDY6OdOYL6+RyFOUFIs1yEgtfg4VMMSpSOKBOhYclQYuSC7nBF5Cc18ydtzsBpf7l49gCLTFzG45NCDAocada8KihFNpGXbauV9V4EPRD4lofaXdsXJ5Tw8/+KCsrUlvIQI3vcEv9LQIDAQAB\", \n    \"signature\": \"BeNYuHFkp/sbfm3clYyCkKEqd7XVTRDOJ1/5rL0tpkqxiSq+maqYkDz5kA+lN64ipoefQuJ7Rdm5TpICErufeJfa2sfTmGARDJ0hr+StXfLsIxHmDoNH5dqcXv3W6MR4kaljEqPVuhzGQ0We98DG52JcHWqqN53oHwTyuZuXocQqnmiE23IPm8UrU3g4hX/OLat0R81wDQ1SslZ+4pnqlncpTpopCK4FxeG3B0gYMhZcYd17Cmf0N3tEHVXHDlJIm4rOx0OVT+YBnjbKYLM0jxYu7PRKRis+yzN1BoappOEB0gmPjznIeiYF0u/fJdZWoEwK7d9mrfJeOBbpFyRoHA==\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/rsa-signatures/decrypt")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"method\": \"POST\", \n    \"publicKey\": \"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmWRFTwxQOqaG4JDZSQF/NJWvCDoSXm3TYilNzoN8nBbuvhKa7SZBBS+VP6rFqcbIU38Fu+Rf09vqyYOxuasPJe7yhqeOiStWB/aCPLhwXBeKt37L/qkwpNOKb1FETtUgrc+UjbtT0pnl55wCfi+Ik//X5SQi0B+c0ei1DQv99qmPJJErrhnBtdxeaWAT0EYAo42AOQ5cp0UWDY6OdOYL6+RyFOUFIs1yEgtfg4VMMSpSOKBOhYclQYuSC7nBF5Cc18ydtzsBpf7l49gCLTFzG45NCDAocada8KihFNpGXbauV9V4EPRD4lofaXdsXJ5Tw8/+KCsrUlvIQI3vcEv9LQIDAQAB\", \n    \"signature\": \"BeNYuHFkp/sbfm3clYyCkKEqd7XVTRDOJ1/5rL0tpkqxiSq+maqYkDz5kA+lN64ipoefQuJ7Rdm5TpICErufeJfa2sfTmGARDJ0hr+StXfLsIxHmDoNH5dqcXv3W6MR4kaljEqPVuhzGQ0We98DG52JcHWqqN53oHwTyuZuXocQqnmiE23IPm8UrU3g4hX/OLat0R81wDQ1SslZ+4pnqlncpTpopCK4FxeG3B0gYMhZcYd17Cmf0N3tEHVXHDlJIm4rOx0OVT+YBnjbKYLM0jxYu7PRKRis+yzN1BoappOEB0gmPjznIeiYF0u/fJdZWoEwK7d9mrfJeOBbpFyRoHA==\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/rsa-signatures/decrypt", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/rsa-signatures/decrypt")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"method\": \"POST\", \n    \"publicKey\": \"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmWRFTwxQOqaG4JDZSQF/NJWvCDoSXm3TYilNzoN8nBbuvhKa7SZBBS+VP6rFqcbIU38Fu+Rf09vqyYOxuasPJe7yhqeOiStWB/aCPLhwXBeKt37L/qkwpNOKb1FETtUgrc+UjbtT0pnl55wCfi+Ik//X5SQi0B+c0ei1DQv99qmPJJErrhnBtdxeaWAT0EYAo42AOQ5cp0UWDY6OdOYL6+RyFOUFIs1yEgtfg4VMMSpSOKBOhYclQYuSC7nBF5Cc18ydtzsBpf7l49gCLTFzG45NCDAocada8KihFNpGXbauV9V4EPRD4lofaXdsXJ5Tw8/+KCsrUlvIQI3vcEv9LQIDAQAB\", \n    \"signature\": \"BeNYuHFkp/sbfm3clYyCkKEqd7XVTRDOJ1/5rL0tpkqxiSq+maqYkDz5kA+lN64ipoefQuJ7Rdm5TpICErufeJfa2sfTmGARDJ0hr+StXfLsIxHmDoNH5dqcXv3W6MR4kaljEqPVuhzGQ0We98DG52JcHWqqN53oHwTyuZuXocQqnmiE23IPm8UrU3g4hX/OLat0R81wDQ1SslZ+4pnqlncpTpopCK4FxeG3B0gYMhZcYd17Cmf0N3tEHVXHDlJIm4rOx0OVT+YBnjbKYLM0jxYu7PRKRis+yzN1BoappOEB0gmPjznIeiYF0u/fJdZWoEwK7d9mrfJeOBbpFyRoHA==\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/rsa-signatures/decrypt");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"method\": \"POST\", \n    \"publicKey\": \"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmWRFTwxQOqaG4JDZSQF/NJWvCDoSXm3TYilNzoN8nBbuvhKa7SZBBS+VP6rFqcbIU38Fu+Rf09vqyYOxuasPJe7yhqeOiStWB/aCPLhwXBeKt37L/qkwpNOKb1FETtUgrc+UjbtT0pnl55wCfi+Ik//X5SQi0B+c0ei1DQv99qmPJJErrhnBtdxeaWAT0EYAo42AOQ5cp0UWDY6OdOYL6+RyFOUFIs1yEgtfg4VMMSpSOKBOhYclQYuSC7nBF5Cc18ydtzsBpf7l49gCLTFzG45NCDAocada8KihFNpGXbauV9V4EPRD4lofaXdsXJ5Tw8/+KCsrUlvIQI3vcEv9LQIDAQAB\", \n    \"signature\": \"BeNYuHFkp/sbfm3clYyCkKEqd7XVTRDOJ1/5rL0tpkqxiSq+maqYkDz5kA+lN64ipoefQuJ7Rdm5TpICErufeJfa2sfTmGARDJ0hr+StXfLsIxHmDoNH5dqcXv3W6MR4kaljEqPVuhzGQ0We98DG52JcHWqqN53oHwTyuZuXocQqnmiE23IPm8UrU3g4hX/OLat0R81wDQ1SslZ+4pnqlncpTpopCK4FxeG3B0gYMhZcYd17Cmf0N3tEHVXHDlJIm4rOx0OVT+YBnjbKYLM0jxYu7PRKRis+yzN1BoappOEB0gmPjznIeiYF0u/fJdZWoEwK7d9mrfJeOBbpFyRoHA==\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/sequence-sets:
    get:
      description: |
        Retrieves information about all sequence sets configured for billing documents, payments, and refunds. Billing documents include invoices, credit memos, and debit memos.

        You can use query parameters to restrict the data returned in the response.

        **Note**: The Credit and Debit Memos feature is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 
      operationId: GET_SequenceSets
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_page"
        - description: |
            The name of a specific sequence set.
          in: query
          name: name
          required: false
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    sequenceSets:
                      - creditMemo:
                          prefix: CM
                          startNumber: 11
                        debitMemo:
                          prefix: DM
                          startNumber: 12
                        id: 2c98906c69be199c0169be74ed210afd
                        invoice:
                          prefix: INV
                          startNumber: 10
                        name: DEFAULT
                        payment:
                          prefix: P-
                          startNumber: 13
                        refund:
                          prefix: R-
                          startNumber: 14
                      - creditMemo:
                          prefix: FCM
                          startNumber: 11
                        debitMemo:
                          prefix: FDM
                          startNumber: 12
                        id: 2c98906c69be199c0169be74ed211afd
                        invoice:
                          prefix: FINV
                          startNumber: 10
                        name: FR
                        payment:
                          prefix: FP-
                          startNumber: 13
                        refund:
                          prefix: FR-
                          startNumber: 14
                      - creditMemo:
                          prefix: ITACM
                          startNumber: 11
                        debitMemo:
                          prefix: ITADM
                          startNumber: 12
                        id: 2c98906c69be199c0169be74ed212afd
                        invoice:
                          prefix: ITAINV
                          startNumber: 10
                        name: ITA
                        payment:
                          prefix: ITAP-
                          startNumber: 13
                        refund:
                          prefix: ITAR-
                          startNumber: 14
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETSequenceSetsResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List sequence sets
      tags:
        - Sequence Sets
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/sequence-sets"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/sequence-sets');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/sequence-sets")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/sequence-sets", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/sequence-sets")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/sequence-sets");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    post:
      description: |
        Creates sequence sets, allowing distinct numbering sequences for billing documents, payments, and refunds. Billing documents include invoices, credit memos, and debit memos.

        You can create a maximum of 100 sequence sets in one single request. A sequence set comprises a set of custom prefixes and starting numbers that are used for billing documents to generate, and payments and refunds to create.

        See [Prefix and Numbering Configuration for Billing Documents](https://knowledgecenter.zuora.com/CB_Billing/Billing_Settings/Prefix_and_Numbering_Configuration_for_Billing_Documents) for more information about limitations.

        **Note**: The Credit and Debit Memos feature is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 
      operationId: POST_SequenceSets
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTSequenceSetsRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    sequenceSets:
                      - creditMemo:
                          prefix: FCM
                          startNumber: 10
                        debitMemo:
                          prefix: FDM
                          startNumber: 10
                        id: 402892c74c9193cd014c96bbe7c101f9
                        invoice:
                          prefix: FINV
                          startNumber: 10
                        name: FR
                        payment:
                          prefix: FP-
                          startNumber: 10
                        refund:
                          prefix: FR-
                          startNumber: 10
                      - creditMemo:
                          prefix: ICM
                          startNumber: 10
                        debitMemo:
                          prefix: IDM
                          startNumber: 10
                        id: 402892c74c9193cd014c96bbe7c201f9
                        invoice:
                          prefix: IINV
                          startNumber: 10
                        name: ITA
                        payment:
                          prefix: IP-
                          startNumber: 10
                        refund:
                          prefix: IR-
                          startNumber: 10
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTSequenceSetsResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Create sequence sets
      tags:
        - Sequence Sets
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "sequenceSets": [
                    {
                        "creditMemo": {
                            "prefix": "FCM", 
                            "startNumber": 10
                        }, 
                        "debitMemo": {
                            "prefix": "FDM", 
                            "startNumber": 10
                        }, 
                        "invoice": {
                            "prefix": "FINV", 
                            "startNumber": 10
                        }, 
                        "name": "FR", 
                        "payment": {
                            "prefix": "FP-", 
                            "startNumber": 10
                        }, 
                        "refund": {
                            "prefix": "FR-", 
                            "startNumber": 10
                        }
                    }, 
                    {
                        "creditMemo": {
                            "prefix": "ICM", 
                            "startNumber": 10
                        }, 
                        "debitMemo": {
                            "prefix": "IDM", 
                            "startNumber": 10
                        }, 
                        "invoice": {
                            "prefix": "IINV", 
                            "startNumber": 10
                        }, 
                        "name": "ITA", 
                        "payment": {
                            "prefix": "IP-", 
                            "startNumber": 10
                        }, 
                        "refund": {
                            "prefix": "IR-", 
                            "startNumber": 10
                        }
                    }
                ]
            }' "https://rest.zuora.com/v1/sequence-sets"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/sequence-sets');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "sequenceSets": [
                    {
                        "creditMemo": {
                            "prefix": "FCM", 
                            "startNumber": 10
                        }, 
                        "debitMemo": {
                            "prefix": "FDM", 
                            "startNumber": 10
                        }, 
                        "invoice": {
                            "prefix": "FINV", 
                            "startNumber": 10
                        }, 
                        "name": "FR", 
                        "payment": {
                            "prefix": "FP-", 
                            "startNumber": 10
                        }, 
                        "refund": {
                            "prefix": "FR-", 
                            "startNumber": 10
                        }
                    }, 
                    {
                        "creditMemo": {
                            "prefix": "ICM", 
                            "startNumber": 10
                        }, 
                        "debitMemo": {
                            "prefix": "IDM", 
                            "startNumber": 10
                        }, 
                        "invoice": {
                            "prefix": "IINV", 
                            "startNumber": 10
                        }, 
                        "name": "ITA", 
                        "payment": {
                            "prefix": "IP-", 
                            "startNumber": 10
                        }, 
                        "refund": {
                            "prefix": "IR-", 
                            "startNumber": 10
                        }
                    }
                ]
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"sequenceSets\": [\n        {\n            \"creditMemo\": {\n                \"prefix\": \"FCM\", \n                \"startNumber\": 10\n            }, \n            \"debitMemo\": {\n                \"prefix\": \"FDM\", \n                \"startNumber\": 10\n            }, \n            \"invoice\": {\n                \"prefix\": \"FINV\", \n                \"startNumber\": 10\n            }, \n            \"name\": \"FR\", \n            \"payment\": {\n                \"prefix\": \"FP-\", \n                \"startNumber\": 10\n            }, \n            \"refund\": {\n                \"prefix\": \"FR-\", \n                \"startNumber\": 10\n            }\n        }, \n        {\n            \"creditMemo\": {\n                \"prefix\": \"ICM\", \n                \"startNumber\": 10\n            }, \n            \"debitMemo\": {\n                \"prefix\": \"IDM\", \n                \"startNumber\": 10\n            }, \n            \"invoice\": {\n                \"prefix\": \"IINV\", \n                \"startNumber\": 10\n            }, \n            \"name\": \"ITA\", \n            \"payment\": {\n                \"prefix\": \"IP-\", \n                \"startNumber\": 10\n            }, \n            \"refund\": {\n                \"prefix\": \"IR-\", \n                \"startNumber\": 10\n            }\n        }\n    ]\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/sequence-sets")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"sequenceSets\": [\n        {\n            \"creditMemo\": {\n                \"prefix\": \"FCM\", \n                \"startNumber\": 10\n            }, \n            \"debitMemo\": {\n                \"prefix\": \"FDM\", \n                \"startNumber\": 10\n            }, \n            \"invoice\": {\n                \"prefix\": \"FINV\", \n                \"startNumber\": 10\n            }, \n            \"name\": \"FR\", \n            \"payment\": {\n                \"prefix\": \"FP-\", \n                \"startNumber\": 10\n            }, \n            \"refund\": {\n                \"prefix\": \"FR-\", \n                \"startNumber\": 10\n            }\n        }, \n        {\n            \"creditMemo\": {\n                \"prefix\": \"ICM\", \n                \"startNumber\": 10\n            }, \n            \"debitMemo\": {\n                \"prefix\": \"IDM\", \n                \"startNumber\": 10\n            }, \n            \"invoice\": {\n                \"prefix\": \"IINV\", \n                \"startNumber\": 10\n            }, \n            \"name\": \"ITA\", \n            \"payment\": {\n                \"prefix\": \"IP-\", \n                \"startNumber\": 10\n            }, \n            \"refund\": {\n                \"prefix\": \"IR-\", \n                \"startNumber\": 10\n            }\n        }\n    ]\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/sequence-sets", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/sequence-sets")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"sequenceSets\": [\n        {\n            \"creditMemo\": {\n                \"prefix\": \"FCM\", \n                \"startNumber\": 10\n            }, \n            \"debitMemo\": {\n                \"prefix\": \"FDM\", \n                \"startNumber\": 10\n            }, \n            \"invoice\": {\n                \"prefix\": \"FINV\", \n                \"startNumber\": 10\n            }, \n            \"name\": \"FR\", \n            \"payment\": {\n                \"prefix\": \"FP-\", \n                \"startNumber\": 10\n            }, \n            \"refund\": {\n                \"prefix\": \"FR-\", \n                \"startNumber\": 10\n            }\n        }, \n        {\n            \"creditMemo\": {\n                \"prefix\": \"ICM\", \n                \"startNumber\": 10\n            }, \n            \"debitMemo\": {\n                \"prefix\": \"IDM\", \n                \"startNumber\": 10\n            }, \n            \"invoice\": {\n                \"prefix\": \"IINV\", \n                \"startNumber\": 10\n            }, \n            \"name\": \"ITA\", \n            \"payment\": {\n                \"prefix\": \"IP-\", \n                \"startNumber\": 10\n            }, \n            \"refund\": {\n                \"prefix\": \"IR-\", \n                \"startNumber\": 10\n            }\n        }\n    ]\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/sequence-sets");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"sequenceSets\": [\n        {\n            \"creditMemo\": {\n                \"prefix\": \"FCM\", \n                \"startNumber\": 10\n            }, \n            \"debitMemo\": {\n                \"prefix\": \"FDM\", \n                \"startNumber\": 10\n            }, \n            \"invoice\": {\n                \"prefix\": \"FINV\", \n                \"startNumber\": 10\n            }, \n            \"name\": \"FR\", \n            \"payment\": {\n                \"prefix\": \"FP-\", \n                \"startNumber\": 10\n            }, \n            \"refund\": {\n                \"prefix\": \"FR-\", \n                \"startNumber\": 10\n            }\n        }, \n        {\n            \"creditMemo\": {\n                \"prefix\": \"ICM\", \n                \"startNumber\": 10\n            }, \n            \"debitMemo\": {\n                \"prefix\": \"IDM\", \n                \"startNumber\": 10\n            }, \n            \"invoice\": {\n                \"prefix\": \"IINV\", \n                \"startNumber\": 10\n            }, \n            \"name\": \"ITA\", \n            \"payment\": {\n                \"prefix\": \"IP-\", \n                \"startNumber\": 10\n            }, \n            \"refund\": {\n                \"prefix\": \"IR-\", \n                \"startNumber\": 10\n            }\n        }\n    ]\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/sequence-sets/{id}":
    delete:
      description: |
        Deletes a specific sequence set configured for billing documents, payments, and refunds. Billing documents include invoices, credit memos, and debit memos.

        **Note**: The Credit and Debit Memos feature is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 
      operationId: DELETE_SequenceSet
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: |
            The ID of the sequence set to delete.
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Delete a sequence set
      tags:
        - Sequence Sets
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/sequence-sets/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/sequence-sets/{id}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/sequence-sets/{id}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/v1/sequence-sets/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/sequence-sets/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/sequence-sets/{id}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      description: |
        Retrieves information about a specific sequence set configured for billing documents, payments, and refunds. Billing documents include invoices, credit memos, and debit memos

        **Note**: The Credit and Debit Memos feature is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 
      operationId: GET_SequenceSet
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: |
            The ID of the sequence set to retrieve information about.
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    creditMemo:
                      prefix: FCM
                      startNumber: 11
                    debitMemo:
                      prefix: FDM
                      startNumber: 12
                    invoice:
                      prefix: FINV
                      startNumber: 10
                    name: FR
                    payment:
                      prefix: FP-
                      startNumber: 13
                    refund:
                      prefix: FR-
                      startNumber: 14
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETSequenceSetResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a sequence set
      tags:
        - Sequence Sets
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/sequence-sets/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/sequence-sets/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/sequence-sets/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/sequence-sets/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/sequence-sets/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/sequence-sets/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: |
        Updates a specific sequence set configured for billing documents, payments, and refunds. Billing documents include invoices, credit memos, and debit memos.

        **Note**: The Credit and Debit Memos feature is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 
      operationId: PUT_SequenceSet
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: |
            The ID of the sequence set to update.
          in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTSequenceSetRequest"
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PUTSequenceSetResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Update a sequence set
      tags:
        - Sequence Sets
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "creditMemo": {
                    "prefix": "FR-CM"
                }, 
                "invoice": {
                    "startNumber": 100
                }, 
                "name": "FR", 
                "payment": {
                    "prefix": "FR-P-"
                }
            }' "https://rest.zuora.com/v1/sequence-sets/{id}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/sequence-sets/{id}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "creditMemo": {
                    "prefix": "FR-CM"
                }, 
                "invoice": {
                    "startNumber": 100
                }, 
                "name": "FR", 
                "payment": {
                    "prefix": "FR-P-"
                }
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"creditMemo\": {\n        \"prefix\": \"FR-CM\"\n    }, \n    \"invoice\": {\n        \"startNumber\": 100\n    }, \n    \"name\": \"FR\", \n    \"payment\": {\n        \"prefix\": \"FR-P-\"\n    }\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/sequence-sets/{id}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"creditMemo\": {\n        \"prefix\": \"FR-CM\"\n    }, \n    \"invoice\": {\n        \"startNumber\": 100\n    }, \n    \"name\": \"FR\", \n    \"payment\": {\n        \"prefix\": \"FR-P-\"\n    }\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/sequence-sets/{id}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/sequence-sets/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"creditMemo\": {\n        \"prefix\": \"FR-CM\"\n    }, \n    \"invoice\": {\n        \"startNumber\": 100\n    }, \n    \"name\": \"FR\", \n    \"payment\": {\n        \"prefix\": \"FR-P-\"\n    }\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/sequence-sets/{id}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"creditMemo\": {\n        \"prefix\": \"FR-CM\"\n    }, \n    \"invoice\": {\n        \"startNumber\": 100\n    }, \n    \"name\": \"FR\", \n    \"payment\": {\n        \"prefix\": \"FR-P-\"\n    }\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /v1/settings/finance/revenue-automation-start-date:
    get:
      description: |
        Describes how to get the revenue automation start date. Request and response field descriptions and sample code are provided.
      operationId: GET_RevenueAutomationStartDate
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    startDate: 2012-02-01
                    success: true
                    updatedBy: MyCorpAdmin
                    updatedOn: 2013-09-11 22:49:18
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRevenueStartDateSettingType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a revenue automation start date
      tags:
        - Revenue Rules
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/settings/finance/revenue-automation-start-date"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/settings/finance/revenue-automation-start-date');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/settings/finance/revenue-automation-start-date")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/settings/finance/revenue-automation-start-date", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/settings/finance/revenue-automation-start-date")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/settings/finance/revenue-automation-start-date");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  /v1/subscriptions:
    post:
      description: |
        This REST API reference describes how to create a new subscription for an existing customer account.

        ## Notes

        If you have the Invoice Settlement feature enabled, it is best practice to set the `zuora-version` parameter to `211.0` or later. Otherwise, an error occurs.

        If `invoiceCollect` is `true`, the call will not return `success` = `true` unless the subscription, invoice, and payment are all successful.

        Default values for **customerAcceptanceDate** and **serviceActivationDate** are set as follows. This API operation does not support creating a pending subscription.

        |        | serviceActivationDate(SA) specified          | serviceActivationDate (SA) NOT specified  |
        | ------------- |:-------------:| -----:|
        | customerAcceptanceDate (CA) specified| SA uses value in the request call; CA uses value in the request call| CA uses value in the request call;SA uses CE as default |
        | customerAcceptanceDate (CA) NOT specified      | SA uses value in the request call; CA uses SA as default |   SA and CA use CE as default |
      operationId: POST_Subscription
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The minor version of the Zuora REST API. 

            You only need to set this parameter if you use the following fields:
            * invoice
            * collect
            * runBilling
            * targetDate
          in: header
          name: zuora-version
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTSubscriptionType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    contractedMrr: 1950
                    subscriptionId: 402890fc4fa094d5014fa0a4aa78001d
                    subscriptionNumber: A-S00000041
                    success: true
                    totalContractedValue: 6227.41935465
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTSubscriptionResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Create a subscription
      tags:
        - Subscriptions
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "accountKey": "A00001115", 
                "autoRenew": true, 
                "contractEffectiveDate": "2015-02-1", 
                "initialTerm": "12", 
                "initialTermPeriodType": "Week", 
                "notes": "Test POST subscription from z-ruby-sdk", 
                "renewalTerm": "3", 
                "renewalTermPeriodType": "Week", 
                "subscribeToRatePlans": [
                    {
                        "chargeOverrides": [
                            {
                                "billCycleDay": "5", 
                                "billCycleType": "SpecificDayofMonth", 
                                "billingPeriodAlignment": "AlignToCharge", 
                                "billingTiming": "IN_ARREARS", 
                                "description": "This is rate plan charge description", 
                                "number": "TestCharge", 
                                "price": 12.01, 
                                "productRatePlanChargeId": "ff8080811ca15d19011cddad8c953b53", 
                                "triggerDate": "2015-09-01", 
                                "triggerEvent": "USD"
                            }
                        ], 
                        "productRatePlanId": "ff8080811ca15d19011cdda9b0ad3b51"
                    }
                ], 
                "termType": "TERMED"
            }' "https://rest.zuora.com/v1/subscriptions"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/subscriptions');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "accountKey": "A00001115", 
                "autoRenew": true, 
                "contractEffectiveDate": "2015-02-1", 
                "initialTerm": "12", 
                "initialTermPeriodType": "Week", 
                "notes": "Test POST subscription from z-ruby-sdk", 
                "renewalTerm": "3", 
                "renewalTermPeriodType": "Week", 
                "subscribeToRatePlans": [
                    {
                        "chargeOverrides": [
                            {
                                "billCycleDay": "5", 
                                "billCycleType": "SpecificDayofMonth", 
                                "billingPeriodAlignment": "AlignToCharge", 
                                "billingTiming": "IN_ARREARS", 
                                "description": "This is rate plan charge description", 
                                "number": "TestCharge", 
                                "price": 12.01, 
                                "productRatePlanChargeId": "ff8080811ca15d19011cddad8c953b53", 
                                "triggerDate": "2015-09-01", 
                                "triggerEvent": "USD"
                            }
                        ], 
                        "productRatePlanId": "ff8080811ca15d19011cdda9b0ad3b51"
                    }
                ], 
                "termType": "TERMED"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"accountKey\": \"A00001115\", \n    \"autoRenew\": true, \n    \"contractEffectiveDate\": \"2015-02-1\", \n    \"initialTerm\": \"12\", \n    \"initialTermPeriodType\": \"Week\", \n    \"notes\": \"Test POST subscription from z-ruby-sdk\", \n    \"renewalTerm\": \"3\", \n    \"renewalTermPeriodType\": \"Week\", \n    \"subscribeToRatePlans\": [\n        {\n            \"chargeOverrides\": [\n                {\n                    \"billCycleDay\": \"5\", \n                    \"billCycleType\": \"SpecificDayofMonth\", \n                    \"billingPeriodAlignment\": \"AlignToCharge\", \n                    \"billingTiming\": \"IN_ARREARS\", \n                    \"description\": \"This is rate plan charge description\", \n                    \"number\": \"TestCharge\", \n                    \"price\": 12.01, \n                    \"productRatePlanChargeId\": \"ff8080811ca15d19011cddad8c953b53\", \n                    \"triggerDate\": \"2015-09-01\", \n                    \"triggerEvent\": \"USD\"\n                }\n            ], \n            \"productRatePlanId\": \"ff8080811ca15d19011cdda9b0ad3b51\"\n        }\n    ], \n    \"termType\": \"TERMED\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/subscriptions")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"accountKey\": \"A00001115\", \n    \"autoRenew\": true, \n    \"contractEffectiveDate\": \"2015-02-1\", \n    \"initialTerm\": \"12\", \n    \"initialTermPeriodType\": \"Week\", \n    \"notes\": \"Test POST subscription from z-ruby-sdk\", \n    \"renewalTerm\": \"3\", \n    \"renewalTermPeriodType\": \"Week\", \n    \"subscribeToRatePlans\": [\n        {\n            \"chargeOverrides\": [\n                {\n                    \"billCycleDay\": \"5\", \n                    \"billCycleType\": \"SpecificDayofMonth\", \n                    \"billingPeriodAlignment\": \"AlignToCharge\", \n                    \"billingTiming\": \"IN_ARREARS\", \n                    \"description\": \"This is rate plan charge description\", \n                    \"number\": \"TestCharge\", \n                    \"price\": 12.01, \n                    \"productRatePlanChargeId\": \"ff8080811ca15d19011cddad8c953b53\", \n                    \"triggerDate\": \"2015-09-01\", \n                    \"triggerEvent\": \"USD\"\n                }\n            ], \n            \"productRatePlanId\": \"ff8080811ca15d19011cdda9b0ad3b51\"\n        }\n    ], \n    \"termType\": \"TERMED\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/subscriptions", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/subscriptions")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"accountKey\": \"A00001115\", \n    \"autoRenew\": true, \n    \"contractEffectiveDate\": \"2015-02-1\", \n    \"initialTerm\": \"12\", \n    \"initialTermPeriodType\": \"Week\", \n    \"notes\": \"Test POST subscription from z-ruby-sdk\", \n    \"renewalTerm\": \"3\", \n    \"renewalTermPeriodType\": \"Week\", \n    \"subscribeToRatePlans\": [\n        {\n            \"chargeOverrides\": [\n                {\n                    \"billCycleDay\": \"5\", \n                    \"billCycleType\": \"SpecificDayofMonth\", \n                    \"billingPeriodAlignment\": \"AlignToCharge\", \n                    \"billingTiming\": \"IN_ARREARS\", \n                    \"description\": \"This is rate plan charge description\", \n                    \"number\": \"TestCharge\", \n                    \"price\": 12.01, \n                    \"productRatePlanChargeId\": \"ff8080811ca15d19011cddad8c953b53\", \n                    \"triggerDate\": \"2015-09-01\", \n                    \"triggerEvent\": \"USD\"\n                }\n            ], \n            \"productRatePlanId\": \"ff8080811ca15d19011cdda9b0ad3b51\"\n        }\n    ], \n    \"termType\": \"TERMED\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/subscriptions");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"accountKey\": \"A00001115\", \n    \"autoRenew\": true, \n    \"contractEffectiveDate\": \"2015-02-1\", \n    \"initialTerm\": \"12\", \n    \"initialTermPeriodType\": \"Week\", \n    \"notes\": \"Test POST subscription from z-ruby-sdk\", \n    \"renewalTerm\": \"3\", \n    \"renewalTermPeriodType\": \"Week\", \n    \"subscribeToRatePlans\": [\n        {\n            \"chargeOverrides\": [\n                {\n                    \"billCycleDay\": \"5\", \n                    \"billCycleType\": \"SpecificDayofMonth\", \n                    \"billingPeriodAlignment\": \"AlignToCharge\", \n                    \"billingTiming\": \"IN_ARREARS\", \n                    \"description\": \"This is rate plan charge description\", \n                    \"number\": \"TestCharge\", \n                    \"price\": 12.01, \n                    \"productRatePlanChargeId\": \"ff8080811ca15d19011cddad8c953b53\", \n                    \"triggerDate\": \"2015-09-01\", \n                    \"triggerEvent\": \"USD\"\n                }\n            ], \n            \"productRatePlanId\": \"ff8080811ca15d19011cdda9b0ad3b51\"\n        }\n    ], \n    \"termType\": \"TERMED\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/subscriptions/accounts/{account-key}":
    get:
      description: |
        Retrieves all subscriptions associated with the specified account. Zuora only returns the latest version of the subscriptions.

        Subscription data is returned in reverse chronological order based on `updatedDate`.
      operationId: GET_SubscriptionsByAccount
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - description: |
            
            Possible values are:
            * an account number
            * an account ID
          in: path
          name: account-key
          required: true
          schema:
            type: string
        - description: |
            The segmented rate plan charges.

            When an amendment results in a change to a charge, Zuora creates a segmented rate plan charge. Use this field to track segment charges.

            Possible values are:

            * __last-segment__: (Default) The last rate plan charge on the subscription. The last rate plan charge is the last one in the order of time on the subscription rather than the most recent changed charge on the subscription.
             * __current-segment__: The segmented charge that is active on today’s date (effectiveStartDate <= today’s date < effectiveEndDate).
             
             * __all-segments__: All the segmented charges. The `chargeSegments` field is returned in the response. The `chargeSegments` field contains an array of the charge information for all the charge segments.

             * __specific-segment&as-of-date=date__: The segmented charge that is active on a date you specified (effectiveStartDate <= specific date < effectiveEndDate). The format of the date is yyyy-mm-dd.
          in: query
          name: charge-detail
          required: false
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    subscriptions:
                      - accountId: 8a8082c45aa81b51015ad64396090f5c
                        accountName: ABCD
                        accountNumber: A00002641
                        autoRenew: true
                        contractEffectiveDate: 2017-01-01
                        contractedMrr: 8.33
                        currentTerm: 12
                        currentTermPeriodType: Month
                        customerAcceptanceDate: 2017-01-01
                        id: 8a8082c45aa81b51015ad68743ec0fdb
                        initialTerm: 12
                        initialTermPeriodType: Month
                        invoiceOwnerAccountId: 8a8082c45aa81b51015ad64396090f5c
                        invoiceOwnerAccountName: ABCD
                        invoiceOwnerAccountNumber: A00002641
                        invoiceSeparately: false
                        notes: ""
                        ratePlans:
                          - id: 8a8082c45aa81b51015ad68744030fe3
                            productId: 8a8082c45aa81b51015ad5a2d07d0e89
                            productName: ABC
                            productRatePlanId: 8a8082c45aa81b51015ad5a473fb0e8d
                            productSku: SKU-00000987
                            ratePlanCharges:
                              - applyDiscountTo: null
                                billingDay: DefaultFromCustomer
                                billingPeriod: Annual
                                billingPeriodAlignment: AlignToCharge
                                billingTiming: IN_ADVANCE
                                chargedThroughDate: null
                                currency: USD
                                description: ""
                                discountAmount: null
                                discountApplyDetails: []
                                discountClass: null
                                discountLevel: null
                                discountPercentage: null
                                dmrc: 8.333333
                                done: false
                                dtcv: 100
                                effectiveEndDate: 2018-01-01
                                effectiveStartDate: 2017-01-01
                                endDateCondition: Subscription_End
                                id: 8a8082c45aa81b51015ad68744160fe4
                                includedUnits: null
                                listPriceBase: Per_Billing_Period
                                model: FlatFee
                                mrr: 8.333333
                                name: Annual Charge
                                number: C-00032238
                                numberOfPeriods: null
                                originalChargeId: 8a8082c45aa81b51015ad68744160fe4
                                overageCalculationOption: null
                                overagePrice: null
                                overageUnusedUnitsCreditOption: null
                                price: 100
                                priceChangeOption: NoChange
                                priceIncreasePercentage: null
                                pricingSummary: USD100
                                processedThroughDate: null
                                productRatePlanChargeId: 8a8082c45aa81b51015ad5a655c00e8f
                                quantity: 1
                                segment: 1
                                smoothingModel: null
                                specificBillingPeriod: null
                                specificEndDate: null
                                tcv: 100
                                tiers: null
                                triggerDate: null
                                triggerEvent: ContractEffective
                                type: Recurring
                                unusedUnitsCreditRates: null
                                uom: null
                                upToPeriods: null
                                upToPeriodsType: null
                                usageRecordRatingOption: null
                                version: 1
                              - applyDiscountTo: ONETIMERECURRINGUSAGE
                                billingDay: DefaultFromCustomer
                                billingPeriod: Month
                                billingPeriodAlignment: AlignToCharge
                                billingTiming: null
                                chargedThroughDate: null
                                currency: USD
                                description: ""
                                discountAmount: 10
                                discountApplyDetails:
                                  - appliedProductRatePlanChargeId: 8a8082c45aa81b51015ad5a655c00e8f
                                    appliedProductRatePlanId: 8a8082c45aa81b51015ad5a473fb0e8d
                                  - appliedProductRatePlanChargeId: 8a8082c45aa81b51015ad5a655c00e8f
                                    appliedProductRatePlanId: 8a8082c45aa81b51015ad5a473fb0e8d
                                discountClass: VIP Discount
                                discountLevel: subscription
                                discountPercentage: null
                                dmrc: 0
                                done: false
                                dtcv: 0
                                effectiveEndDate: 2018-01-01
                                effectiveStartDate: 2017-01-01
                                endDateCondition: Subscription_End
                                id: 8a8082c45aa81b51015ad68744240fe5
                                includedUnits: null
                                listPriceBase: null
                                model: DiscountFixedAmount
                                mrr: 0
                                name: Discount-Fixed 10
                                number: C-00032239
                                numberOfPeriods: null
                                originalChargeId: 8a8082c45aa81b51015ad68744240fe5
                                overageCalculationOption: null
                                overagePrice: null
                                overageUnusedUnitsCreditOption: null
                                price: null
                                priceChangeOption: null
                                priceIncreasePercentage: null
                                pricingSummary: USD10 fixed amount discount
                                processedThroughDate: null
                                productRatePlanChargeId: 8a8082c45aa81b51015ad683bc590fd8
                                quantity: null
                                segment: 1
                                smoothingModel: null
                                specificBillingPeriod: null
                                specificEndDate: null
                                tcv: 0
                                tiers: null
                                triggerDate: null
                                triggerEvent: ContractEffective
                                type: Recurring
                                unusedUnitsCreditRates: null
                                uom: null
                                upToPeriods: null
                                upToPeriodsType: null
                                usageRecordRatingOption: null
                                version: 1
                            ratePlanName: RatePlan 1
                        renewalSetting: RENEW_WITH_SPECIFIC_TERM
                        renewalTerm: 12
                        renewalTermPeriodType: Month
                        revision: "1.0"
                        serviceActivationDate: 2017-01-01
                        status: Active
                        subscriptionNumber: A-S00007412
                        subscriptionStartDate: 2017-01-01
                        termEndDate: 2018-01-01
                        termStartDate: 2017-01-01
                        termType: TERMED
                        totalContractedValue: 100
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETSubscriptionWrapper"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List subscriptions by account key
      tags:
        - Subscriptions
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/subscriptions/accounts/{account-key}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/subscriptions/accounts/{account-key}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/subscriptions/accounts/{account-key}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/subscriptions/accounts/{account-key}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/subscriptions/accounts/{account-key}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/subscriptions/accounts/{account-key}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  /v1/subscriptions/preview:
    post:
      description: |
        The REST API reference describes how to create a new subscription in preview mode. This call does not require a valid customer account. It can be used to show potential new customers a preview of a subscription with complete details and charges before creating an account, or to let existing customers preview a subscription with all charges before committing.

        ## Notes
        - The response of the Preview Subscription call is based on the REST API minor version you set in the request header. The response structure might be different if you use different minor version numbers. 

        - If you have the Invoice Settlement feature enabled, we recommend that you set the `zuora-version` parameter to `207.0` or later. Otherwise, an error is returned.


        - Default values for **customerAcceptanceDate** and **serviceActivationDate** are set as follows.

        |        | serviceActivationDate (SA) specified          | serviceActivationDate (SA) NOT specified  |
        | ------------- |:-------------:| -----:|
        | customerAcceptanceDate (CA) specified      | SA uses value in the request call; CA uses value in the request call| CA uses value in the request call;SA uses CE as default |
        | customerAcceptanceDate (CA) NOT specified      | SA uses value in the request call; CA uses SA as default |   SA and CA use CE as default |
      operationId: POST_PreviewSubscription
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            
            The minor version of the Zuora REST API. 

            You need to set this parameter if you use the following fields:
            * targetDate
            * includeExistingDraftDocItems
            * previewType


            If you have the Invoice Settlement feature enabled, you need to specify this parameter. Otherwise, an error is returned.


            See [Zuora REST API Versions](https://www.zuora.com/developer/api-reference/#section/API-Versions) for more information. 
          in: header
          name: zuora-version
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTSubscriptionPreviewType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    amount: 278.28
                    amountWithoutTax: 278.28
                    contractedMrr: 100
                    invoiceItems:
                      - chargeAmount: 51.61
                        chargeDescription: ""
                        chargeName: recurring
                        productName: restAPITest
                        productRatePlanChargeId: 40289070576ad42f0157b24a62420918
                        quantity: 1
                        serviceEndDate: 2016-01-30
                        serviceStartDate: 2016-01-15
                        taxAmount: 5.16
                        unitOfMeasure: ""
                      - chargeAmount: 100
                        chargeDescription: ""
                        chargeName: recurring
                        productName: restAPITest
                        productRatePlanChargeId: 40289070576ad42f0157b24a62420918
                        quantity: 1
                        serviceEndDate: 2016-02-28
                        serviceStartDate: 2016-01-31
                        taxAmount: 10
                        unitOfMeasure: ""
                      - chargeAmount: 100
                        chargeDescription: ""
                        chargeName: recurring
                        productName: restAPITest
                        productRatePlanChargeId: 40289070576ad42f0157b24a62420918
                        quantity: 1
                        serviceEndDate: 2016-03-30
                        serviceStartDate: 2016-02-29
                        taxAmount: 10
                        unitOfMeasure: ""
                      - chargeAmount: 26.67
                        chargeDescription: ""
                        chargeName: recurring
                        productName: restAPITest
                        productRatePlanChargeId: 40289070576ad42f0157b24a62420918
                        quantity: 1
                        serviceEndDate: 2016-04-07
                        serviceStartDate: 2016-03-31
                        taxAmount: 2.66
                        unitOfMeasure: ""
                    invoiceTargetDate: 2016-12-31
                    success: true
                    taxAmount: 0
                    totalContractedValue: 277.4193548
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTSubscriptionPreviewResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Preview a subscription
      tags:
        - Subscriptions
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X POST -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "contractEffectiveDate": "2013-1-15", 
                "initialTerm": 12, 
                "initialTermPeriodType": "Week", 
                "invoiceTargetDate": "2013-12-31", 
                "previewAccountInfo": {
                    "billCycleDay": 31, 
                    "billToContact": {
                        "city": "Walnut Creek", 
                        "country": "United States", 
                        "county": "Contra Consta", 
                        "state": "California", 
                        "zipCode": "94549"
                    }, 
                    "currency": "USD"
                }, 
                "subscribeToRatePlans": [
                    {
                        "chargeOverrides": [
                            {
                                "productRatePlanChargeId": "ff8080811ca15d19011cddad8c953b53", 
                                "quantity": 100
                            }
                        ], 
                        "productRatePlanId": "ff8080811ca15d19011cdda9b0ad3b51"
                    }
                ], 
                "termType": "TERMED"
            }' "https://rest.zuora.com/v1/subscriptions/preview"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/subscriptions/preview');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "contractEffectiveDate": "2013-1-15", 
                "initialTerm": 12, 
                "initialTermPeriodType": "Week", 
                "invoiceTargetDate": "2013-12-31", 
                "previewAccountInfo": {
                    "billCycleDay": 31, 
                    "billToContact": {
                        "city": "Walnut Creek", 
                        "country": "United States", 
                        "county": "Contra Consta", 
                        "state": "California", 
                        "zipCode": "94549"
                    }, 
                    "currency": "USD"
                }, 
                "subscribeToRatePlans": [
                    {
                        "chargeOverrides": [
                            {
                                "productRatePlanChargeId": "ff8080811ca15d19011cddad8c953b53", 
                                "quantity": 100
                            }
                        ], 
                        "productRatePlanId": "ff8080811ca15d19011cdda9b0ad3b51"
                    }
                ], 
                "termType": "TERMED"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"contractEffectiveDate\": \"2013-1-15\", \n    \"initialTerm\": 12, \n    \"initialTermPeriodType\": \"Week\", \n    \"invoiceTargetDate\": \"2013-12-31\", \n    \"previewAccountInfo\": {\n        \"billCycleDay\": 31, \n        \"billToContact\": {\n            \"city\": \"Walnut Creek\", \n            \"country\": \"United States\", \n            \"county\": \"Contra Consta\", \n            \"state\": \"California\", \n            \"zipCode\": \"94549\"\n        }, \n        \"currency\": \"USD\"\n    }, \n    \"subscribeToRatePlans\": [\n        {\n            \"chargeOverrides\": [\n                {\n                    \"productRatePlanChargeId\": \"ff8080811ca15d19011cddad8c953b53\", \n                    \"quantity\": 100\n                }\n            ], \n            \"productRatePlanId\": \"ff8080811ca15d19011cdda9b0ad3b51\"\n        }\n    ], \n    \"termType\": \"TERMED\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/subscriptions/preview")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"contractEffectiveDate\": \"2013-1-15\", \n    \"initialTerm\": 12, \n    \"initialTermPeriodType\": \"Week\", \n    \"invoiceTargetDate\": \"2013-12-31\", \n    \"previewAccountInfo\": {\n        \"billCycleDay\": 31, \n        \"billToContact\": {\n            \"city\": \"Walnut Creek\", \n            \"country\": \"United States\", \n            \"county\": \"Contra Consta\", \n            \"state\": \"California\", \n            \"zipCode\": \"94549\"\n        }, \n        \"currency\": \"USD\"\n    }, \n    \"subscribeToRatePlans\": [\n        {\n            \"chargeOverrides\": [\n                {\n                    \"productRatePlanChargeId\": \"ff8080811ca15d19011cddad8c953b53\", \n                    \"quantity\": 100\n                }\n            ], \n            \"productRatePlanId\": \"ff8080811ca15d19011cdda9b0ad3b51\"\n        }\n    ], \n    \"termType\": \"TERMED\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/v1/subscriptions/preview", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/subscriptions/preview")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"contractEffectiveDate\": \"2013-1-15\", \n    \"initialTerm\": 12, \n    \"initialTermPeriodType\": \"Week\", \n    \"invoiceTargetDate\": \"2013-12-31\", \n    \"previewAccountInfo\": {\n        \"billCycleDay\": 31, \n        \"billToContact\": {\n            \"city\": \"Walnut Creek\", \n            \"country\": \"United States\", \n            \"county\": \"Contra Consta\", \n            \"state\": \"California\", \n            \"zipCode\": \"94549\"\n        }, \n        \"currency\": \"USD\"\n    }, \n    \"subscribeToRatePlans\": [\n        {\n            \"chargeOverrides\": [\n                {\n                    \"productRatePlanChargeId\": \"ff8080811ca15d19011cddad8c953b53\", \n                    \"quantity\": 100\n                }\n            ], \n            \"productRatePlanId\": \"ff8080811ca15d19011cdda9b0ad3b51\"\n        }\n    ], \n    \"termType\": \"TERMED\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/subscriptions/preview");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"contractEffectiveDate\": \"2013-1-15\", \n    \"initialTerm\": 12, \n    \"initialTermPeriodType\": \"Week\", \n    \"invoiceTargetDate\": \"2013-12-31\", \n    \"previewAccountInfo\": {\n        \"billCycleDay\": 31, \n        \"billToContact\": {\n            \"city\": \"Walnut Creek\", \n            \"country\": \"United States\", \n            \"county\": \"Contra Consta\", \n            \"state\": \"California\", \n            \"zipCode\": \"94549\"\n        }, \n        \"currency\": \"USD\"\n    }, \n    \"subscribeToRatePlans\": [\n        {\n            \"chargeOverrides\": [\n                {\n                    \"productRatePlanChargeId\": \"ff8080811ca15d19011cddad8c953b53\", \n                    \"quantity\": 100\n                }\n            ], \n            \"productRatePlanId\": \"ff8080811ca15d19011cdda9b0ad3b51\"\n        }\n    ], \n    \"termType\": \"TERMED\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/subscriptions/{subscription-key}":
    get:
      description: |
        This REST API reference describes how to retrieve detailed information about a specified subscription in the latest version.
      operationId: GET_SubscriptionsByKey
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            Possible values are:
              * a subscription number
              * a subscription ID
          in: path
          name: subscription-key
          required: true
          schema:
            type: string
        - description: |
            
            The segmented rate plan charges. When an amendment results in a change to a charge, Zuora creates a segmented rate plan charge. Use this field to track segment charges.

            Possible values are:

             * __last-segment__: (Default) The last rate plan charge on the subscription. The last rate plan charge is the last one in the order of time on the subscription rather than the most recent changed charge on the subscription.
             * __current-segment__: The segmented charge that is active on today’s date (effectiveStartDate <= today’s date < effectiveEndDate).
             
             * __all-segments__: All the segmented charges. The `chargeSegments` field is returned in the response. The `chargeSegments` field contains an array of the charge information for all the charge segments.

             * __specific-segment&as-of-date=date__: The segmented charge that is active on a date you specified ((specific date = effectiveStartDate) OR (effectiveStartDate < specific date < effectiveEndDate)). The format of the date is yyyy-mm-dd.
          in: query
          name: charge-detail
          required: false
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 8a8082c45aa81b51015ad64396090f5c
                    accountName: ABCD
                    accountNumber: A00002641
                    autoRenew: true
                    contractEffectiveDate: 2017-01-01
                    contractedMrr: 8.33
                    currentTerm: 12
                    currentTermPeriodType: Month
                    customerAcceptanceDate: 2017-01-01
                    id: 8a8082c45aa81b51015ad68743ec0fdb
                    initialTerm: 12
                    initialTermPeriodType: Month
                    invoiceOwnerAccountId: 8a8082c45aa81b51015ad64396090f5c
                    invoiceOwnerAccountName: ABCD
                    invoiceOwnerAccountNumber: A00002641
                    invoiceSeparately: false
                    notes: ""
                    ratePlans:
                      - id: 8a8082c45aa81b51015ad68744030fe3
                        productId: 8a8082c45aa81b51015ad5a2d07d0e89
                        productName: ABC
                        productRatePlanId: 8a8082c45aa81b51015ad5a473fb0e8d
                        productSku: SKU-00000987
                        ratePlanCharges:
                          - applyDiscountTo: null
                            billingDay: DefaultFromCustomer
                            billingPeriod: Annual
                            billingPeriodAlignment: AlignToCharge
                            billingTiming: IN_ADVANCE
                            chargedThroughDate: null
                            currency: USD
                            description: ""
                            discountAmount: null
                            discountApplyDetails: []
                            discountClass: null
                            discountLevel: null
                            discountPercentage: null
                            dmrc: 8.333333
                            done: false
                            dtcv: 100
                            effectiveEndDate: 2018-01-01
                            effectiveStartDate: 2017-01-01
                            endDateCondition: Subscription_End
                            id: 8a8082c45aa81b51015ad68744160fe4
                            includedUnits: null
                            listPriceBase: Per_Billing_Period
                            model: FlatFee
                            mrr: 8.333333
                            name: Annual Charge
                            number: C-00032238
                            numberOfPeriods: null
                            originalChargeId: 8a8082c45aa81b51015ad68744160fe4
                            overageCalculationOption: null
                            overagePrice: null
                            overageUnusedUnitsCreditOption: null
                            price: 100
                            priceChangeOption: NoChange
                            priceIncreasePercentage: null
                            pricingSummary: USD100
                            processedThroughDate: null
                            productRatePlanChargeId: 8a8082c45aa81b51015ad5a655c00e8f
                            quantity: 1
                            segment: 1
                            smoothingModel: null
                            specificBillingPeriod: null
                            specificEndDate: null
                            tcv: 100
                            tiers: null
                            triggerDate: null
                            triggerEvent: ContractEffective
                            type: Recurring
                            unusedUnitsCreditRates: null
                            uom: null
                            upToPeriods: null
                            upToPeriodsType: null
                            usageRecordRatingOption: null
                            version: 1
                          - applyDiscountTo: ONETIMERECURRINGUSAGE
                            billingDay: DefaultFromCustomer
                            billingPeriod: Month
                            billingPeriodAlignment: AlignToCharge
                            billingTiming: null
                            chargedThroughDate: null
                            currency: USD
                            description: ""
                            discountAmount: 10
                            discountApplyDetails:
                              - appliedProductRatePlanChargeId: 8a8082c45aa81b51015ad5a655c00e8f
                                appliedProductRatePlanId: 8a8082c45aa81b51015ad5a473fb0e8d
                            discountClass: VIP Discount
                            discountLevel: subscription
                            discountPercentage: null
                            dmrc: 0
                            done: false
                            dtcv: 0
                            effectiveEndDate: 2018-01-01
                            effectiveStartDate: 2017-01-01
                            endDateCondition: Subscription_End
                            id: 8a8082c45aa81b51015ad68744240fe5
                            includedUnits: null
                            listPriceBase: null
                            model: DiscountFixedAmount
                            mrr: 0
                            name: Discount-Fixed 10
                            number: C-00032239
                            numberOfPeriods: null
                            originalChargeId: 8a8082c45aa81b51015ad68744240fe5
                            overageCalculationOption: null
                            overagePrice: null
                            overageUnusedUnitsCreditOption: null
                            price: null
                            priceChangeOption: null
                            priceIncreasePercentage: null
                            pricingSummary: USD10 fixed amount discount
                            processedThroughDate: null
                            productRatePlanChargeId: 8a8082c45aa81b51015ad683bc590fd8
                            quantity: null
                            segment: 1
                            smoothingModel: null
                            specificBillingPeriod: null
                            specificEndDate: null
                            tcv: 0
                            tiers: null
                            triggerDate: null
                            triggerEvent: ContractEffective
                            type: Recurring
                            unusedUnitsCreditRates: null
                            uom: null
                            upToPeriods: null
                            upToPeriodsType: null
                            usageRecordRatingOption: null
                            version: 1
                        ratePlanName: RatePlan 1
                    renewalSetting: RENEW_WITH_SPECIFIC_TERM
                    renewalTerm: 12
                    renewalTermPeriodType: Month
                    revision: "1.0"
                    serviceActivationDate: 2017-01-01
                    status: Active
                    subscriptionNumber: A-S00007412
                    subscriptionStartDate: 2017-01-01
                    success: true
                    termEndDate: 2018-01-01
                    termStartDate: 2017-01-01
                    termType: TERMED
                    totalContractedValue: 100
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETSubscriptionTypeWithSuccess"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a subscription by key
      tags:
        - Subscriptions
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/subscriptions/{subscription-key}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/subscriptions/{subscription-key}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/subscriptions/{subscription-key}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/subscriptions/{subscription-key}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/subscriptions/{subscription-key}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/subscriptions/{subscription-key}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: |
        Use this call to make the following kinds of changes to a subscription:
          * Add a note
          * Change the renewal term or auto-renewal flag
          * Change the term length or change between evergreen and termed
          * Add a new product rate plan
          * Remove an existing subscription rate plan
          * Change the quantity or price of an existing subscription rate plan

        ## Notes
        * The Update Subscription call creates a new subscription, which has the old subscription number but a new subscription ID.  The old subscription is canceled but remains in the system.
        * In one request, this call can make:
          * Up to 9 combined add, update, and remove changes
          * No more than 1 change to terms & conditions
        * Updates are performed in the following sequence:
          1. First change the notes on the existing subscription, if requested.
          2. Then change the terms and conditions, if requested.
          3. Then perform the remaining amendments based upon the effective dates specified. If multiple amendments have the same contract-effective dates, then execute adds before updates, and updates before removes.
        * The update operation is atomic. If any of the updates fails, the entire operation is rolled back.
        * The response of the Update Subscription call is based on the REST API minor version you set in the request header. The response structure might be different if you use different minor version numbers. 
        * If you have the Invoice Settlement feature enabled, it is best practice to set the `zuora-version` parameter to `211.0` or later. Otherwise, an error occurs.

        ## Override a Tiered Price
        There are two ways you override a tiered price:

        * Override a specific tier number
        For example: `tiers[{tier:1,price:8},{tier:2,price:6}]`

        * Override the entire tier structure
        For example:  `tiers[{tier:1,price:8,startingUnit:1,endingUnit:100,priceFormat:"FlatFee"},
        {tier:2,price:6,startingUnit:101,priceFormat:"FlatFee"}]`

        If you just override a specific tier, do not include the `startingUnit` field in the request.
      operationId: PUT_Subscription
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            
            The minor version of the Zuora REST API. 

            You need to set this parameter if you use the following fields:
            * collect
            * invoice
            * includeExistingDraftDocItems
            * previewType
            * runBilling
            * targetDate


            If you have the Invoice Settlement feature enabled, you need to specify this parameter. Otherwise, an error is returned.


            See [Zuora REST API Versions](https://www.zuora.com/developer/api-reference/#section/API-Versions) for more information.
          in: header
          name: zuora-version
          required: false
          schema:
            type: string
        - description: Subscription number or ID.
          in: path
          name: subscription-key
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTSubscriptionType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    subscriptionId: 4028bb83510f8ed7015114a503cf0373
                    success: true
                    totalDeltaMrr: 100
                    totalDeltaTcv: 4867.7419355
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PUTSubscriptionResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Update a subscription
      tags:
        - Subscriptions
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "autoRenew": false, 
                "collect": false, 
                "currentTerm": "10", 
                "currentTermPeriodType": "Month", 
                "notes": "Test UPDATE subscription from z-ruby-sdk", 
                "renewalSetting": "RENEW_WITH_SPECIFIC_TERM", 
                "renewalTerm": "4", 
                "renewalTermPeriodType": "Month", 
                "runBilling": true, 
                "termType": "TERMED", 
                "update": [
                    {
                        "chargeUpdateDetails": [
                            {
                                "quantity": 12, 
                                "ratePlanChargeId": "2c92c8f83dcbd8b1013dcce0eb510075"
                            }
                        ], 
                        "contractEffectiveDate": "2013-04-28", 
                        "ratePlanId": "2c92c8f83dcbd8b1013dcce0ea7e006f"
                    }
                ]
            }' "https://rest.zuora.com/v1/subscriptions/{subscription-key}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/subscriptions/{subscription-key}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "autoRenew": false, 
                "collect": false, 
                "currentTerm": "10", 
                "currentTermPeriodType": "Month", 
                "notes": "Test UPDATE subscription from z-ruby-sdk", 
                "renewalSetting": "RENEW_WITH_SPECIFIC_TERM", 
                "renewalTerm": "4", 
                "renewalTermPeriodType": "Month", 
                "runBilling": true, 
                "termType": "TERMED", 
                "update": [
                    {
                        "chargeUpdateDetails": [
                            {
                                "quantity": 12, 
                                "ratePlanChargeId": "2c92c8f83dcbd8b1013dcce0eb510075"
                            }
                        ], 
                        "contractEffectiveDate": "2013-04-28", 
                        "ratePlanId": "2c92c8f83dcbd8b1013dcce0ea7e006f"
                    }
                ]
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"autoRenew\": false, \n    \"collect\": false, \n    \"currentTerm\": \"10\", \n    \"currentTermPeriodType\": \"Month\", \n    \"notes\": \"Test UPDATE subscription from z-ruby-sdk\", \n    \"renewalSetting\": \"RENEW_WITH_SPECIFIC_TERM\", \n    \"renewalTerm\": \"4\", \n    \"renewalTermPeriodType\": \"Month\", \n    \"runBilling\": true, \n    \"termType\": \"TERMED\", \n    \"update\": [\n        {\n            \"chargeUpdateDetails\": [\n                {\n                    \"quantity\": 12, \n                    \"ratePlanChargeId\": \"2c92c8f83dcbd8b1013dcce0eb510075\"\n                }\n            ], \n            \"contractEffectiveDate\": \"2013-04-28\", \n            \"ratePlanId\": \"2c92c8f83dcbd8b1013dcce0ea7e006f\"\n        }\n    ]\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/subscriptions/{subscription-key}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"autoRenew\": false, \n    \"collect\": false, \n    \"currentTerm\": \"10\", \n    \"currentTermPeriodType\": \"Month\", \n    \"notes\": \"Test UPDATE subscription from z-ruby-sdk\", \n    \"renewalSetting\": \"RENEW_WITH_SPECIFIC_TERM\", \n    \"renewalTerm\": \"4\", \n    \"renewalTermPeriodType\": \"Month\", \n    \"runBilling\": true, \n    \"termType\": \"TERMED\", \n    \"update\": [\n        {\n            \"chargeUpdateDetails\": [\n                {\n                    \"quantity\": 12, \n                    \"ratePlanChargeId\": \"2c92c8f83dcbd8b1013dcce0eb510075\"\n                }\n            ], \n            \"contractEffectiveDate\": \"2013-04-28\", \n            \"ratePlanId\": \"2c92c8f83dcbd8b1013dcce0ea7e006f\"\n        }\n    ]\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/subscriptions/{subscription-key}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/subscriptions/{subscription-key}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"autoRenew\": false, \n    \"collect\": false, \n    \"currentTerm\": \"10\", \n    \"currentTermPeriodType\": \"Month\", \n    \"notes\": \"Test UPDATE subscription from z-ruby-sdk\", \n    \"renewalSetting\": \"RENEW_WITH_SPECIFIC_TERM\", \n    \"renewalTerm\": \"4\", \n    \"renewalTermPeriodType\": \"Month\", \n    \"runBilling\": true, \n    \"termType\": \"TERMED\", \n    \"update\": [\n        {\n            \"chargeUpdateDetails\": [\n                {\n                    \"quantity\": 12, \n                    \"ratePlanChargeId\": \"2c92c8f83dcbd8b1013dcce0eb510075\"\n                }\n            ], \n            \"contractEffectiveDate\": \"2013-04-28\", \n            \"ratePlanId\": \"2c92c8f83dcbd8b1013dcce0ea7e006f\"\n        }\n    ]\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/subscriptions/{subscription-key}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"autoRenew\": false, \n    \"collect\": false, \n    \"currentTerm\": \"10\", \n    \"currentTermPeriodType\": \"Month\", \n    \"notes\": \"Test UPDATE subscription from z-ruby-sdk\", \n    \"renewalSetting\": \"RENEW_WITH_SPECIFIC_TERM\", \n    \"renewalTerm\": \"4\", \n    \"renewalTermPeriodType\": \"Month\", \n    \"runBilling\": true, \n    \"termType\": \"TERMED\", \n    \"update\": [\n        {\n            \"chargeUpdateDetails\": [\n                {\n                    \"quantity\": 12, \n                    \"ratePlanChargeId\": \"2c92c8f83dcbd8b1013dcce0eb510075\"\n                }\n            ], \n            \"contractEffectiveDate\": \"2013-04-28\", \n            \"ratePlanId\": \"2c92c8f83dcbd8b1013dcce0ea7e006f\"\n        }\n    ]\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/subscriptions/{subscription-key}/cancel":
    put:
      description: |
        This REST API reference describes how to cancel an active subscription.

        **Note**: If you have the Invoice Settlement feature enabled, it is best practice to set the `zuora-version` parameter to `211.0` or later. Otherwise, an error occurs.
      operationId: PUT_CancelSubscription
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The minor version of the Zuora REST API. 

            You only need to set this parameter if you use the following fields:
            * invoice
            * collect
            * runBilling
            * targetDate 
          in: header
          name: zuora-version
          required: false
          schema:
            type: string
        - description: Subscription number or ID. Subscription status must be `Active`.
          in: path
          name: subscription-key
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/POSTSubscriptionCancellationType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    cancelledDate: 2019-05-31
                    invoiceId: 8a8082c453cd2a620153e426c7eb78b3
                    subscriptionId: 8a8082c453cd2a620154efc7bba0350e
                    success: true
                    totalDeltaMrr: 0
                    totalDeltaTcv: -703.2258065
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTSubscriptionCancellationResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Cancel a subscription
      tags:
        - Subscriptions
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "cancellationEffectiveDate": "2019-05-31", 
                "cancellationPolicy": "SpecificDate", 
                "collect": false, 
                "runBilling": true
            }' "https://rest.zuora.com/v1/subscriptions/{subscription-key}/cancel"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/subscriptions/{subscription-key}/cancel');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "cancellationEffectiveDate": "2019-05-31", 
                "cancellationPolicy": "SpecificDate", 
                "collect": false, 
                "runBilling": true
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"cancellationEffectiveDate\": \"2019-05-31\", \n    \"cancellationPolicy\": \"SpecificDate\", \n    \"collect\": false, \n    \"runBilling\": true\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/subscriptions/{subscription-key}/cancel")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"cancellationEffectiveDate\": \"2019-05-31\", \n    \"cancellationPolicy\": \"SpecificDate\", \n    \"collect\": false, \n    \"runBilling\": true\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/subscriptions/{subscription-key}/cancel", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/subscriptions/{subscription-key}/cancel")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"cancellationEffectiveDate\": \"2019-05-31\", \n    \"cancellationPolicy\": \"SpecificDate\", \n    \"collect\": false, \n    \"runBilling\": true\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/subscriptions/{subscription-key}/cancel");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"cancellationEffectiveDate\": \"2019-05-31\", \n    \"cancellationPolicy\": \"SpecificDate\", \n    \"collect\": false, \n    \"runBilling\": true\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/subscriptions/{subscription-key}/renew":
    put:
      description: |
        Renews a termed subscription using existing renewal terms.

        **Note**: If you have the Invoice Settlement feature enabled, it is best practice to set the `zuora-version` parameter to `211.0` or later. Otherwise, an error occurs.
      operationId: PUT_RenewSubscription
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The minor version of the Zuora REST API. 

            You only need to set this parameter if you use the following fields:
            * invoice
            * collect
            * runBilling
            * targetDate 
          in: header
          name: zuora-version
          required: false
          schema:
            type: string
        - description: Subscription number or ID
          in: path
          name: subscription-key
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTRenewSubscriptionType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    subscriptionId: 2c92c8f83dcbd8b1013dcce0f09100a5
                    success: true
                    termEndDate: 2014-05-01
                    termStartDate: 2014-02-01
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PUTRenewSubscriptionResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Renew a subscription
      tags:
        - Subscriptions
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "collect": false, 
                "runBilling": true
            }' "https://rest.zuora.com/v1/subscriptions/{subscription-key}/renew"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/subscriptions/{subscription-key}/renew');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "collect": false, 
                "runBilling": true
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"collect\": false, \n    \"runBilling\": true\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/subscriptions/{subscription-key}/renew")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"collect\": false, \n    \"runBilling\": true\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/subscriptions/{subscription-key}/renew", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/subscriptions/{subscription-key}/renew")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"collect\": false, \n    \"runBilling\": true\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/subscriptions/{subscription-key}/renew");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"collect\": false, \n    \"runBilling\": true\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/subscriptions/{subscription-key}/resume":
    put:
      description: |
        This REST API reference describes how to resume a suspended subscription.  

        **Note**: If you have the Invoice Settlement feature enabled, it is best practice to set the `zuora-version` parameter to `211.0` or later. Otherwise, an error occurs.
      operationId: PUT_ResumeSubscription
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The minor version of the Zuora REST API. 

            You only need to set this parameter if you use the following fields:
            * invoice
            * collect
            * runBilling
            * targetDate
          in: header
          name: zuora-version
          required: false
          schema:
            type: string
        - description: Subscription number or ID. Subscription status must be Suspended.
          in: path
          name: subscription-key
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTSubscriptionResumeType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    resumeDate: 2019-10-01
                    subscriptionId: 8a8082c4539c5bcc0153a752f9c87094
                    success: true
                    termEndDate: 2020-01-31
                    totalDeltaTcv: 396.7741935
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PUTSubscriptionResumeResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Resume a subscription
      tags:
        - Subscriptions
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "collect": false, 
                "contractEffectiveDate": "2019-02-01", 
                "extendsTerm": true, 
                "resumePolicy": "SpecificDate", 
                "resumeSpecificDate": "2019-10-01", 
                "runBilling": true
            }' "https://rest.zuora.com/v1/subscriptions/{subscription-key}/resume"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/subscriptions/{subscription-key}/resume');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "collect": false, 
                "contractEffectiveDate": "2019-02-01", 
                "extendsTerm": true, 
                "resumePolicy": "SpecificDate", 
                "resumeSpecificDate": "2019-10-01", 
                "runBilling": true
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"collect\": false, \n    \"contractEffectiveDate\": \"2019-02-01\", \n    \"extendsTerm\": true, \n    \"resumePolicy\": \"SpecificDate\", \n    \"resumeSpecificDate\": \"2019-10-01\", \n    \"runBilling\": true\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/subscriptions/{subscription-key}/resume")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"collect\": false, \n    \"contractEffectiveDate\": \"2019-02-01\", \n    \"extendsTerm\": true, \n    \"resumePolicy\": \"SpecificDate\", \n    \"resumeSpecificDate\": \"2019-10-01\", \n    \"runBilling\": true\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/subscriptions/{subscription-key}/resume", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/subscriptions/{subscription-key}/resume")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"collect\": false, \n    \"contractEffectiveDate\": \"2019-02-01\", \n    \"extendsTerm\": true, \n    \"resumePolicy\": \"SpecificDate\", \n    \"resumeSpecificDate\": \"2019-10-01\", \n    \"runBilling\": true\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/subscriptions/{subscription-key}/resume");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"collect\": false, \n    \"contractEffectiveDate\": \"2019-02-01\", \n    \"extendsTerm\": true, \n    \"resumePolicy\": \"SpecificDate\", \n    \"resumeSpecificDate\": \"2019-10-01\", \n    \"runBilling\": true\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/subscriptions/{subscription-key}/suspend":
    put:
      description: |
        This REST API reference describes how to suspend an active subscription. 

        **Note**: If you have the Invoice Settlement feature enabled, it is best practice to set the `zuora-version` parameter to `211.0` or later. Otherwise, an error occurs.
      operationId: PUT_SuspendSubscription
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The minor version of the Zuora REST API. 

            You only need to set this parameter if you use the following fields:
            * invoice
            * collect
            * runBilling
            * targetDate
          in: header
          name: zuora-version
          required: false
          schema:
            type: string
        - description: Subscription number or ID. Subscription status must be Active.
          in: path
          name: subscription-key
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTSubscriptionSuspendType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    invoiceId: 8a8082c453bb061f0153c529bc921b4b
                    resumeDate: 2016-06-01
                    subscriptionId: 8a8082c4539c5bcc0153a658a9636fcc
                    success: true
                    suspendDate: 2019-05-01
                    termEndDate: 2020-02-01
                    totalDeltaTcv: -896.6666667
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PUTSubscriptionSuspendResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Suspend a subscription
      tags:
        - Subscriptions
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "collect": false, 
                "contractEffectiveDate": "2019-02-01", 
                "extendsTerm": true, 
                "resume": true, 
                "resumePolicy": "SpecificDate", 
                "resumeSpecificDate": "2019-06-01", 
                "runBilling": true, 
                "suspendPeriods": 10, 
                "suspendPeriodsType": "Day", 
                "suspendPolicy": "FixedPeriodsFromToday"
            }' "https://rest.zuora.com/v1/subscriptions/{subscription-key}/suspend"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/subscriptions/{subscription-key}/suspend');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "collect": false, 
                "contractEffectiveDate": "2019-02-01", 
                "extendsTerm": true, 
                "resume": true, 
                "resumePolicy": "SpecificDate", 
                "resumeSpecificDate": "2019-06-01", 
                "runBilling": true, 
                "suspendPeriods": 10, 
                "suspendPeriodsType": "Day", 
                "suspendPolicy": "FixedPeriodsFromToday"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"collect\": false, \n    \"contractEffectiveDate\": \"2019-02-01\", \n    \"extendsTerm\": true, \n    \"resume\": true, \n    \"resumePolicy\": \"SpecificDate\", \n    \"resumeSpecificDate\": \"2019-06-01\", \n    \"runBilling\": true, \n    \"suspendPeriods\": 10, \n    \"suspendPeriodsType\": \"Day\", \n    \"suspendPolicy\": \"FixedPeriodsFromToday\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/subscriptions/{subscription-key}/suspend")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"collect\": false, \n    \"contractEffectiveDate\": \"2019-02-01\", \n    \"extendsTerm\": true, \n    \"resume\": true, \n    \"resumePolicy\": \"SpecificDate\", \n    \"resumeSpecificDate\": \"2019-06-01\", \n    \"runBilling\": true, \n    \"suspendPeriods\": 10, \n    \"suspendPeriodsType\": \"Day\", \n    \"suspendPolicy\": \"FixedPeriodsFromToday\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/subscriptions/{subscription-key}/suspend", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/subscriptions/{subscription-key}/suspend")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"collect\": false, \n    \"contractEffectiveDate\": \"2019-02-01\", \n    \"extendsTerm\": true, \n    \"resume\": true, \n    \"resumePolicy\": \"SpecificDate\", \n    \"resumeSpecificDate\": \"2019-06-01\", \n    \"runBilling\": true, \n    \"suspendPeriods\": 10, \n    \"suspendPeriodsType\": \"Day\", \n    \"suspendPolicy\": \"FixedPeriodsFromToday\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/subscriptions/{subscription-key}/suspend");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"collect\": false, \n    \"contractEffectiveDate\": \"2019-02-01\", \n    \"extendsTerm\": true, \n    \"resume\": true, \n    \"resumePolicy\": \"SpecificDate\", \n    \"resumeSpecificDate\": \"2019-06-01\", \n    \"runBilling\": true, \n    \"suspendPeriods\": 10, \n    \"suspendPeriodsType\": \"Day\", \n    \"suspendPolicy\": \"FixedPeriodsFromToday\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/subscriptions/{subscription-key}/versions/{version}":
    get:
      description: |
        This REST API reference describes how to retrieve detailed information about a specified subscription in a specified version. When you create a subscription amendment, you create a new version of the subscription. You can use this method to retrieve information about a subscription in any version.
      operationId: GET_SubscriptionsByKeyAndVersion
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            Subscription number. For example, A-S00000135.
          in: path
          name: subscription-key
          required: true
          schema:
            type: string
        - description: |
            Subscription version. For example, 1.
          in: path
          name: version
          required: true
          schema:
            type: string
        - description: |
            
            The segmented rate plan charges. When an amendment results in a change to a charge, Zuora creates a segmented rate plan charge. Use this field to track segment charges.

            Possible values are:

             * __last-segment__: (Default) The last rate plan charge on the subscription. The last rate plan charge is the last one in the order of time on the subscription rather than the most recent changed charge on the subscription.
             * __current-segment__: The segmented charge that is active on today’s date (effectiveStartDate <= today’s date < effectiveEndDate).
             
             * __all-segments__: All the segmented charges. The `chargeSegments` field is returned in the response. The `chargeSegments` field contains an array of the charge information for all the charge segments.

             * __specific-segment&as-of-date=date__: The segmented charge that is active on a date you specified (effectiveStartDate <= specific date < effectiveEndDate). The format of the date is yyyy-mm-dd.
          in: query
          name: charge-detail
          required: false
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    accountId: 2c9081a03c63c94c013c66688a2c00bf
                    accountName: RestAPI
                    accountNumber: RestAPI
                    autoRenew: false
                    contractEffectiveDate: 2012-02-01
                    contractedMrr: 26.67
                    currentTerm: 12
                    currentTermPeriodType: Week
                    customerAcceptanceDate: 2012-02-01
                    id: 2c9081a03c63c94c013c687b864e0195
                    initialTermPeriodType: Week
                    notes: ""
                    ratePlans:
                      - id: 2c9081a03c63c94c013c687b868901a4
                        productId: 2c9081a03c63c94c013c66499ef0001b
                        productName: OneTime
                        productRatePlanId: 2c9081a03c63c94c013c665102e5003a
                        productSku: SKU-00000022
                        ratePlanCharges:
                          - applyDiscountTo: null
                            billingDay: null
                            billingPeriod: null
                            billingPeriodAlignment: null
                            billingTiming: null
                            chargedThroughDate: 2012-02-02
                            currency: USD
                            description: ""
                            discountAmount: null
                            discountLevel: null
                            discountPercentage: null
                            dmrc: null
                            done: true
                            dtcv: 24
                            effectiveEndDate: 2012-02-02
                            effectiveStartDate: 2012-02-01
                            endDateCondition: One_Time
                            id: 2c9081a03c63c94c013c687b868901a5
                            includedUnits: null
                            listPriceBase: null
                            model: Tiered
                            mrr: null
                            name: OT_Tiered
                            number: C-00000010
                            numberOfPeriods: null
                            originalChargeId: 2c9081a03c63c94c013c687a92d70175
                            overageCalculationOption: null
                            overagePrice: null
                            overageUnusedUnitsCreditOption: null
                            price: null
                            priceChangeOption: null
                            priceIncreasePercentage: null
                            pricingSummary: "0 to 10 Each: USD20 flat fee;  11 Each or more: USD4/Each"
                            processedThroughDate: 2012-02-02
                            productRatePlanChargeId: 2c9081a03c63c94c013c6651d677003c
                            quantity: 11
                            segment: 1
                            smoothingModel: null
                            specificBillingPeriod: null
                            specificEndDate: null
                            tcv: 24
                            tiers:
                              - endingUnit: 10
                                price: 20
                                priceFormat: FlatFee
                                startingUnit: 0
                                tier: 1
                              - endingUnit: null
                                price: 4
                                priceFormat: PerUnit
                                startingUnit: 11
                                tier: 2
                            triggerDate: null
                            triggerEvent: ContractEffective
                            type: OneTime
                            unusedUnitsCreditRates: null
                            uom: Each
                            upToPeriods: null
                            upToPeriodsType: null
                            usageRecordRatingOption: null
                            version: 1
                        ratePlanName: OT_Tiered
                    renewalSetting: RENEW_WITH_SPECIFIC_TERM
                    renewalTerm: 0
                    renewalTermPeriodType: Week
                    revision: "1.0"
                    serviceActivationDate: 2012-02-01
                    status: Active
                    subscriptionNumber: A-S00000004
                    subscriptionStartDate: 2012-02-01
                    success: true
                    termEndDate: 2013-02-01
                    termStartDate: 2012-02-01
                    termType: TERMED
                    totalContractedValue: 404
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETSubscriptionTypeWithSuccess"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a subscription by key and version
      tags:
        - Subscriptions
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/subscriptions/{subscription-key}/versions/{version}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/subscriptions/{subscription-key}/versions/{version}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/subscriptions/{subscription-key}/versions/{version}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/subscriptions/{subscription-key}/versions/{version}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/subscriptions/{subscription-key}/versions/{version}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/subscriptions/{subscription-key}/versions/{version}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/subscriptions/{subscriptionKey}/ramp-metrics":
    get:
      description: |
        **Note**: This operation is only available if you have the Ramps feature enabled. The [Orders](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/AA_Overview_of_Orders) feature must be enabled before you can access the [Ramps](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Ramps_and_Ramp_Metrics/A_Overview_of_Ramps_and_Ramp_Metrics) feature. The Ramps feature is available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information coming October 2020.

        Retrieves key ramp metrics about a specified subscription, including the following metrics:

        * TCB, TCV in the Ramp level
        * TCB, TCV in the Interval level
        * TCB, TCV, Quantity, and MRR in Interval Metrics
        * Delta TCB, Delta TCV, Delta Quantity, and Delta MRR in Interval Delta Metrics

        See [Key metrics for Ramps](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Ramps_and_Ramp_Metrics/F_Key_metrics_for_Ramps) for more information.
      operationId: GET_RampMetricsBySubscriptionKey
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The ID or number of an existing subscription.
          in: path
          name: subscriptionKey
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    rampMetrics:
                      description: ""
                      discountTcb: 0
                      discountTcv: 0
                      grossTcb: 240
                      grossTcv: 240
                      intervals:
                        - description: ""
                          discountTcb: 0
                          discountTcv: 0
                          endDate: 2020-12-31
                          grossTcb: 120
                          grossTcv: 120
                          intervalMetrics:
                            - chargeNumber: C-00000202
                              discountTcb: 0
                              discountTcv: 0
                              endDate: 2020-12-31
                              grossTcb: 120
                              grossTcv: 120
                              mrr:
                                - discount: 0
                                  endDate: 2020-12-31
                                  gross: 10
                                  net: 10
                                  startDate: 2020-01-01
                              netTcb: 120
                              netTcv: 120
                              productRatePlanChargeId: 40289f7b7115832f0171158e6dd906cd
                              quantity: 1
                              ratePlanChargeId: 40289f7b7321f5ce0173229d792c00c8
                              startDate: 2020-01-01
                              subscriptionNumber: A-S00000287
                          name: Year 1
                          netTcb: 120
                          netTcv: 120
                          startDate: 2020-01-01
                        - description: ""
                          discountTcb: 0
                          discountTcv: 0
                          endDate: 2021-12-31
                          grossTcb: 120
                          grossTcv: 120
                          intervalMetrics:
                            - chargeNumber: C-00000202
                              discountTcb: 0
                              discountTcv: 0
                              endDate: 2021-12-31
                              grossTcb: 120
                              grossTcv: 120
                              mrr:
                                - discount: 0
                                  endDate: 2021-12-31
                                  gross: 10
                                  net: 10
                                  startDate: 2021-01-01
                              netTcb: 120
                              netTcv: 120
                              productRatePlanChargeId: 40289f7b7115832f0171158e6dd906cd
                              quantity: 1
                              ratePlanChargeId: 40289f7b7321f5ce0173229d792c00c8
                              startDate: 2021-01-01
                              subscriptionNumber: A-S00000287
                          name: Year 2
                          netTcb: 120
                          netTcv: 120
                          startDate: 2021-01-01
                      name: Two Years Ramp
                      netTcb: 240
                      netTcv: 240
                      number: R-00000268
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRampMetricsBySubscriptionKeyResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List ramp metrics by subscription key
      tags:
        - Ramps
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/subscriptions/{subscriptionKey}/ramp-metrics"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/subscriptions/{subscriptionKey}/ramp-metrics');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/subscriptions/{subscriptionKey}/ramp-metrics")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/subscriptions/{subscriptionKey}/ramp-metrics", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/subscriptions/{subscriptionKey}/ramp-metrics")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/subscriptions/{subscriptionKey}/ramp-metrics");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/subscriptions/{subscriptionKey}/ramps":
    get:
      description: |
        **Note**: This operation is only available if you have the Ramps feature enabled. The [Orders](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/AA_Overview_of_Orders) feature must be enabled before you can access the [Ramps](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Ramps_and_Ramp_Metrics/A_Overview_of_Ramps_and_Ramp_Metrics) feature. The Ramps feature is available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information coming October 2020.

         Retrieves the definition of the ramp associated with a specified subscription.
      operationId: GET_RampsBySubscriptionKey
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The ID or number of an existing subscription.
          in: path
          name: subscriptionKey
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    ramps:
                      - charges:
                          - chargeNumber: C-00000202
                        description: ""
                        id: 40289f7b7321f5ce0173229d798300cf
                        intervals:
                          - description: ""
                            endDate: 2020-12-31
                            name: Year 1
                            startDate: 2020-01-01
                          - description: ""
                            endDate: 2021-12-31
                            name: Year 2
                            startDate: 2021-01-01
                        name: Two Years Ramp
                        number: R-00000268
                        subscriptionNumber: A-S00000287
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETRampsBySubscriptionKeyResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a ramp by subscription key
      tags:
        - Ramps
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/subscriptions/{subscriptionKey}/ramps"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/subscriptions/{subscriptionKey}/ramps');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/subscriptions/{subscriptionKey}/ramps")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/subscriptions/{subscriptionKey}/ramps", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/subscriptions/{subscriptionKey}/ramps")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/subscriptions/{subscriptionKey}/ramps");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/subscriptions/{subscriptionNumber}/customFields":
    put:
      description: |
        **Note:** This operation is only available if you have the [Orders](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AA_Overview_of_Orders#Orders) feature enabled. Orders is now generally available as of Zuora Billing Release 284 (August 2020). If you are an existing Zuora Subscribe and Amend customer and want to adopt Orders, see [What is Orders Harmonization](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Orders_Harmonization/Orders_Harmonization#What_is_Orders_Harmonization.3F) and join the [Orders Harmonization community group](https://community.zuora.com/t5/Orders-Harmonization/gp-p/Orders-Harmonization) for more information. If you want to enable Orders, submit a request at [Zuora Global Support](https://support.zuora.com/).

        Updates the custom fields of a specified subscription.
      operationId: PUT_UpdateSubscriptionCustomFields
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: The subscription number to be updated.
          in: path
          name: subscriptionNumber
          required: true
          schema:
            format: string
            type: string
      requestBody:
        $ref: "#/components/requestBodies/PUTSubscriptionPatchRequestType"
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Update subscription custom fields
      tags:
        - Orders
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "customFields": {
                    "sub_cf__c": "subscription custom field"
                }, 
                "ratePlans": [
                    {
                        "charges": [
                            {
                                "chargeNumber": "C-00000016", 
                                "customFields": {
                                    "sub_rpc__c": "rate plan charge custom field"
                                }
                            }
                        ], 
                        "customFields": {
                            "sub_rate_plan__c": "rate plan custom field"
                        }, 
                        "ratePlanId": "8a8081085d834928015da220da08207f"
                    }
                ]
            }' "https://rest.zuora.com/v1/subscriptions/{subscriptionNumber}/customFields"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/subscriptions/{subscriptionNumber}/customFields');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "customFields": {
                    "sub_cf__c": "subscription custom field"
                }, 
                "ratePlans": [
                    {
                        "charges": [
                            {
                                "chargeNumber": "C-00000016", 
                                "customFields": {
                                    "sub_rpc__c": "rate plan charge custom field"
                                }
                            }
                        ], 
                        "customFields": {
                            "sub_rate_plan__c": "rate plan custom field"
                        }, 
                        "ratePlanId": "8a8081085d834928015da220da08207f"
                    }
                ]
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"customFields\": {\n        \"sub_cf__c\": \"subscription custom field\"\n    }, \n    \"ratePlans\": [\n        {\n            \"charges\": [\n                {\n                    \"chargeNumber\": \"C-00000016\", \n                    \"customFields\": {\n                        \"sub_rpc__c\": \"rate plan charge custom field\"\n                    }\n                }\n            ], \n            \"customFields\": {\n                \"sub_rate_plan__c\": \"rate plan custom field\"\n            }, \n            \"ratePlanId\": \"8a8081085d834928015da220da08207f\"\n        }\n    ]\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/subscriptions/{subscriptionNumber}/customFields")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"customFields\": {\n        \"sub_cf__c\": \"subscription custom field\"\n    }, \n    \"ratePlans\": [\n        {\n            \"charges\": [\n                {\n                    \"chargeNumber\": \"C-00000016\", \n                    \"customFields\": {\n                        \"sub_rpc__c\": \"rate plan charge custom field\"\n                    }\n                }\n            ], \n            \"customFields\": {\n                \"sub_rate_plan__c\": \"rate plan custom field\"\n            }, \n            \"ratePlanId\": \"8a8081085d834928015da220da08207f\"\n        }\n    ]\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/subscriptions/{subscriptionNumber}/customFields", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/subscriptions/{subscriptionNumber}/customFields")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"customFields\": {\n        \"sub_cf__c\": \"subscription custom field\"\n    }, \n    \"ratePlans\": [\n        {\n            \"charges\": [\n                {\n                    \"chargeNumber\": \"C-00000016\", \n                    \"customFields\": {\n                        \"sub_rpc__c\": \"rate plan charge custom field\"\n                    }\n                }\n            ], \n            \"customFields\": {\n                \"sub_rate_plan__c\": \"rate plan custom field\"\n            }, \n            \"ratePlanId\": \"8a8081085d834928015da220da08207f\"\n        }\n    ]\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/subscriptions/{subscriptionNumber}/customFields");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"customFields\": {\n        \"sub_cf__c\": \"subscription custom field\"\n    }, \n    \"ratePlans\": [\n        {\n            \"charges\": [\n                {\n                    \"chargeNumber\": \"C-00000016\", \n                    \"customFields\": {\n                        \"sub_rpc__c\": \"rate plan charge custom field\"\n                    }\n                }\n            ], \n            \"customFields\": {\n                \"sub_rate_plan__c\": \"rate plan custom field\"\n            }, \n            \"ratePlanId\": \"8a8081085d834928015da220da08207f\"\n        }\n    ]\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/subscriptions/{subscriptionNumber}/versions/{version}/customFields":
    put:
      description: |
        Updates the custom fields of a specified subscription version.
      operationId: PUT_UpdateSubscriptionCustomFieldsOfASpecifiedVersion
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: The subscription number to be updated.
          in: path
          name: subscriptionNumber
          required: true
          schema:
            format: string
            type: string
        - description: The subscription version to be updated.
          in: path
          name: version
          required: true
          schema:
            format: string
            type: string
      requestBody:
        $ref: "#/components/requestBodies/PUTSubscriptionPatchRequestType"
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Update subscription custom fields of a subscription version
      tags:
        - Subscriptions
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "customFields": {
                    "sub_cf__c": "subscription custom field"
                }, 
                "ratePlans": [
                    {
                        "charges": [
                            {
                                "chargeNumber": "C-00000016", 
                                "customFields": {
                                    "sub_rpc__c": "rate plan charge custom field"
                                }
                            }
                        ], 
                        "customFields": {
                            "sub_rate_plan__c": "rate plan custom field"
                        }, 
                        "ratePlanId": "8a8081085d834928015da220da08207f"
                    }
                ]
            }' "https://rest.zuora.com/v1/subscriptions/{subscriptionNumber}/versions/{version}/customFields"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/subscriptions/{subscriptionNumber}/versions/{version}/customFields');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "customFields": {
                    "sub_cf__c": "subscription custom field"
                }, 
                "ratePlans": [
                    {
                        "charges": [
                            {
                                "chargeNumber": "C-00000016", 
                                "customFields": {
                                    "sub_rpc__c": "rate plan charge custom field"
                                }
                            }
                        ], 
                        "customFields": {
                            "sub_rate_plan__c": "rate plan custom field"
                        }, 
                        "ratePlanId": "8a8081085d834928015da220da08207f"
                    }
                ]
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"customFields\": {\n        \"sub_cf__c\": \"subscription custom field\"\n    }, \n    \"ratePlans\": [\n        {\n            \"charges\": [\n                {\n                    \"chargeNumber\": \"C-00000016\", \n                    \"customFields\": {\n                        \"sub_rpc__c\": \"rate plan charge custom field\"\n                    }\n                }\n            ], \n            \"customFields\": {\n                \"sub_rate_plan__c\": \"rate plan custom field\"\n            }, \n            \"ratePlanId\": \"8a8081085d834928015da220da08207f\"\n        }\n    ]\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/subscriptions/{subscriptionNumber}/versions/{version}/customFields")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"customFields\": {\n        \"sub_cf__c\": \"subscription custom field\"\n    }, \n    \"ratePlans\": [\n        {\n            \"charges\": [\n                {\n                    \"chargeNumber\": \"C-00000016\", \n                    \"customFields\": {\n                        \"sub_rpc__c\": \"rate plan charge custom field\"\n                    }\n                }\n            ], \n            \"customFields\": {\n                \"sub_rate_plan__c\": \"rate plan custom field\"\n            }, \n            \"ratePlanId\": \"8a8081085d834928015da220da08207f\"\n        }\n    ]\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/subscriptions/{subscriptionNumber}/versions/{version}/customFields", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/subscriptions/{subscriptionNumber}/versions/{version}/customFields")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"customFields\": {\n        \"sub_cf__c\": \"subscription custom field\"\n    }, \n    \"ratePlans\": [\n        {\n            \"charges\": [\n                {\n                    \"chargeNumber\": \"C-00000016\", \n                    \"customFields\": {\n                        \"sub_rpc__c\": \"rate plan charge custom field\"\n                    }\n                }\n            ], \n            \"customFields\": {\n                \"sub_rate_plan__c\": \"rate plan custom field\"\n            }, \n            \"ratePlanId\": \"8a8081085d834928015da220da08207f\"\n        }\n    ]\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/subscriptions/{subscriptionNumber}/versions/{version}/customFields");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"customFields\": {\n        \"sub_cf__c\": \"subscription custom field\"\n    }, \n    \"ratePlans\": [\n        {\n            \"charges\": [\n                {\n                    \"chargeNumber\": \"C-00000016\", \n                    \"customFields\": {\n                        \"sub_rpc__c\": \"rate plan charge custom field\"\n                    }\n                }\n            ], \n            \"customFields\": {\n                \"sub_rate_plan__c\": \"rate plan custom field\"\n            }, \n            \"ratePlanId\": \"8a8081085d834928015da220da08207f\"\n        }\n    ]\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/taxationitems/{id}":
    delete:
      description: |
        Deletes a specific taxation item by ID.
      operationId: DELETE_TaxationItem
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a taxation item.
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/CommonResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Delete a taxation item
      tags:
        - Taxation Items
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/taxationitems/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/taxationitems/{id}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/taxationitems/{id}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/v1/taxationitems/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/taxationitems/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/taxationitems/{id}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      description: |
        Retrieves the information about a specific taxation item by ID.
      operationId: GET_TaxationItem
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a taxation item.
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-02-27 11:52:03
                    exemptAmount: 0
                    financeInformation:
                      onAccountAccountingCode: null
                      onAccountAccountingCodeType: null
                      salesTaxPayableAccountingCode: null
                      salesTaxPayableAccountingCodeType: null
                    id: 402890555a7d4022015a7db254e200c8
                    jurisdiction: null
                    locationCode: null
                    memoItemId: 402890555a7d4022015a7db254d800c7
                    name: my tax
                    sourceTaxItemId: 402890555a7d4022015a7db254e200c1
                    success: true
                    taxAmount: 1
                    taxCode: ZtaxCode
                    taxCodeDescription: ""
                    taxDate: 2017-02-27
                    taxRate: 5
                    taxRateDescription: null
                    taxRateType: FlatFee
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-02-27 11:52:03
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETTaxationItemType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: |
        Retrieve a taxation item
      tags:
        - Taxation Items
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/taxationitems/{id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/taxationitems/{id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/taxationitems/{id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/taxationitems/{id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/taxationitems/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/taxationitems/{id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    put:
      description: |
        Updates a specific taxation item by ID.
      operationId: PUT_TaxationItem
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            The unique ID of a taxation item.
          in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTTaxationItemType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    createdById: 402881e522cf4f9b0122cf5d82860002
                    createdDate: 2017-02-27 18:16:24
                    exemptAmount: 0
                    financeInformation:
                      onAccountAccountingCode: Check
                      onAccountAccountingCodeType: Cash
                      salesTaxPayableAccountingCode: null
                      salesTaxPayableAccountingCodeType: null
                    id: 402890555a7e9791015a7f12364e0004
                    jurisdiction: CALIFORNIA
                    locationCode: "06"
                    memoItemId: 402890555a7e9791015a7f1235f50003
                    name: STATE TAX
                    sourceTaxItemId: 402890555a7d4022015a7db254e200c1
                    success: true
                    taxAmount: 1
                    taxCode: ServiceTaxCode
                    taxCodeDescription: This is tax code description!
                    taxDate: 2016-06-05
                    taxRate: 0.0625
                    taxRateDescription: This is tax rate description!
                    taxRateType: Percentage
                    updatedById: 402881e522cf4f9b0122cf5d82860002
                    updatedDate: 2017-02-28 17:53:11
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETTaxationItemType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Update a taxation item
      tags:
        - Taxation Items
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "exemptAmount": 0.0, 
                "financeInformation": {
                    "onAccountAccountingCode": "Check", 
                    "salesTaxPayableAccountingCode": ""
                }, 
                "jurisdiction": "CALIFORNIA", 
                "locationCode": "06", 
                "name": "STATE TAX", 
                "taxAmount": 1.0, 
                "taxCode": "ServiceTaxCode", 
                "taxCodeDescription": "This is tax code description!", 
                "taxDate": "2016-06-05", 
                "taxRate": 0.0625, 
                "taxRateDescription": "This is tax rate description!", 
                "taxRateType": "Percentage"
            }' "https://rest.zuora.com/v1/taxationitems/{id}"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/taxationitems/{id}');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "exemptAmount": 0.0, 
                "financeInformation": {
                    "onAccountAccountingCode": "Check", 
                    "salesTaxPayableAccountingCode": ""
                }, 
                "jurisdiction": "CALIFORNIA", 
                "locationCode": "06", 
                "name": "STATE TAX", 
                "taxAmount": 1.0, 
                "taxCode": "ServiceTaxCode", 
                "taxCodeDescription": "This is tax code description!", 
                "taxDate": "2016-06-05", 
                "taxRate": 0.0625, 
                "taxRateDescription": "This is tax rate description!", 
                "taxRateType": "Percentage"
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"exemptAmount\": 0.0, \n    \"financeInformation\": {\n        \"onAccountAccountingCode\": \"Check\", \n        \"salesTaxPayableAccountingCode\": \"\"\n    }, \n    \"jurisdiction\": \"CALIFORNIA\", \n    \"locationCode\": \"06\", \n    \"name\": \"STATE TAX\", \n    \"taxAmount\": 1.0, \n    \"taxCode\": \"ServiceTaxCode\", \n    \"taxCodeDescription\": \"This is tax code description!\", \n    \"taxDate\": \"2016-06-05\", \n    \"taxRate\": 0.0625, \n    \"taxRateDescription\": \"This is tax rate description!\", \n    \"taxRateType\": \"Percentage\"\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/taxationitems/{id}")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"exemptAmount\": 0.0, \n    \"financeInformation\": {\n        \"onAccountAccountingCode\": \"Check\", \n        \"salesTaxPayableAccountingCode\": \"\"\n    }, \n    \"jurisdiction\": \"CALIFORNIA\", \n    \"locationCode\": \"06\", \n    \"name\": \"STATE TAX\", \n    \"taxAmount\": 1.0, \n    \"taxCode\": \"ServiceTaxCode\", \n    \"taxCodeDescription\": \"This is tax code description!\", \n    \"taxDate\": \"2016-06-05\", \n    \"taxRate\": 0.0625, \n    \"taxRateDescription\": \"This is tax rate description!\", \n    \"taxRateType\": \"Percentage\"\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/taxationitems/{id}", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/taxationitems/{id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"exemptAmount\": 0.0, \n    \"financeInformation\": {\n        \"onAccountAccountingCode\": \"Check\", \n        \"salesTaxPayableAccountingCode\": \"\"\n    }, \n    \"jurisdiction\": \"CALIFORNIA\", \n    \"locationCode\": \"06\", \n    \"name\": \"STATE TAX\", \n    \"taxAmount\": 1.0, \n    \"taxCode\": \"ServiceTaxCode\", \n    \"taxCodeDescription\": \"This is tax code description!\", \n    \"taxDate\": \"2016-06-05\", \n    \"taxRate\": 0.0625, \n    \"taxRateDescription\": \"This is tax rate description!\", \n    \"taxRateType\": \"Percentage\"\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/taxationitems/{id}");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"exemptAmount\": 0.0, \n    \"financeInformation\": {\n        \"onAccountAccountingCode\": \"Check\", \n        \"salesTaxPayableAccountingCode\": \"\"\n    }, \n    \"jurisdiction\": \"CALIFORNIA\", \n    \"locationCode\": \"06\", \n    \"name\": \"STATE TAX\", \n    \"taxAmount\": 1.0, \n    \"taxCode\": \"ServiceTaxCode\", \n    \"taxCodeDescription\": \"This is tax code description!\", \n    \"taxDate\": \"2016-06-05\", \n    \"taxRate\": 0.0625, \n    \"taxRateDescription\": \"This is tax rate description!\", \n    \"taxRateType\": \"Percentage\"\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/transactions/invoices/accounts/{account-key}":
    get:
      description: |
        Retrieves invoices for a specified account. 
        Invoices are returned in reverse chronological order by **updatedDate**.

        For a use case of this operation, see [View invoices](https://www.zuora.com/developer/api-guides/#View-invoices).
      operationId: GET_TransactionInvoice
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - description: |
            Account number or account ID.
          in: path
          name: account-key
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    invoices:
                      - accountId: 2c9891b06661f78c01667bc6dc090202
                        accountName: AC_AC_15396749217821539674921782
                        accountNumber: AN_1539674921782
                        amount: 9.68
                        balance: 9.68
                        body: null
                        createdBy: 2c9891b06661f78c01667bc6c7600068
                        creditBalanceAdjustmentAmount: 0
                        dueDate: 2018-10-29
                        id: 8a88818e66bdd34d0166be4589b60031
                        invoiceDate: 2018-10-29
                        invoiceFiles: https://rest.zuora.com/v1/invoices/8a88818e66bdd34d0166be4589b60031/files
                        invoiceItems: https://rest.zuora.com/v1/invoices/8a88818e66bdd34d0166be4589b60031/items
                        invoiceNumber: INV00000001
                        invoiceTargetDate: 2018-10-29
                        reversed: false
                        status: Draft
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETInvoiceFileWrapper"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List all invoices for an account
      tags:
        - Transactions
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/transactions/invoices/accounts/{account-key}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/transactions/invoices/accounts/{account-key}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/transactions/invoices/accounts/{account-key}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/transactions/invoices/accounts/{account-key}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/transactions/invoices/accounts/{account-key}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/transactions/invoices/accounts/{account-key}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/transactions/payments/accounts/{account-key}":
    get:
      description: |
        Retrieves payments for a specified account. Payments are returned in
        reverse chronological order by **updatedDate**.
      operationId: GET_TransactionPayment
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - description: Account number or account ID.
          in: path
          name: account-key
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    payments:
                      - accountId: 2c92a0f9391832b10139183e277a0042
                        accountName: subscribeCallYan_1
                        accountNumber: A00001115
                        amount: 150248.1
                        effectiveDate: 2013-03-27
                        gatewayTransactionNumber: null
                        id: 2c92c8f83dabf9cf013daf3bfa0305a6
                        paidInvoices:
                          - appliedPaymentAmount: 5
                            invoiceId: 2c92a09539190dbe0139190f42780012
                            invoiceNumber: INV00000159
                          - appliedPaymentAmount: 139722.1
                            invoiceId: 2c92a0953a3fa95d013a407c10a60100
                            invoiceNumber: INV00000323
                          - appliedPaymentAmount: 10521
                            invoiceId: 2c92a09739190dc60139194bcf1b0098
                            invoiceNumber: INV00000160
                        paymentMethodId: 2c92c8f83dabf9cf013daef12dd303b0
                        paymentNumber: P-00000075
                        status: Processed
                        type: Electronic
                      - accountId: 2c92a0f9391832b10139183e277a0042
                        accountName: subscribeCallYan_1
                        accountNumber: A00001115
                        amount: 5
                        effectiveDate: 2012-08-11
                        gatewayTransactionNumber: null
                        id: 2c92a0f9391832b101391922ad5f049d
                        paidInvoices:
                          - appliedPaymentAmount: 5
                            invoiceId: 2c92a09539190dbe0139190f42780012
                            invoiceNumber: INV00000159
                        paymentMethodId: 2c92a0f9391832b10139183e279e0044
                        paymentNumber: P-00000056
                        status: Processed
                        type: Electronic
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETPaymentsType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List all payments for an account
      tags:
        - Transactions
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/transactions/payments/accounts/{account-key}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/transactions/payments/accounts/{account-key}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/transactions/payments/accounts/{account-key}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/transactions/payments/accounts/{account-key}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/transactions/payments/accounts/{account-key}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/transactions/payments/accounts/{account-key}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  /v1/usage:
    post:
      description: |
        This REST API reference describes how to post or import usage data for one or more accounts in the CSV format. There are no path or query parameters. The data is uploaded using the HTTP multipart/form-data POST method and applied to the user's tenant. 

        For a use case of this operation, see [Upload usage records](https://www.zuora.com/developer/api-guides/#Upload-usage-records).

        ## How this REST API Call Works
        The content of the uploaded usage file must follow the format used by the UI import tool. It must be a comma-separated (CSV) file with a corresponding .csv extension. The length of the file name must not exceed 50 characters. The file size must not exceed 4MB. See [Downloading the Usage Template](https://knowledgecenter.zuora.com/CB_Billing/J_Billing_Operations/Usage/C_Import_Usage_Data#Downloading_the_Usage_Template) to learn about how to download the usage file template.

        At the completion of the upload, before the file contents are actually being processed, the API returns a response containing the byte count of the received file and a URL for checking the status of the import process.  Of the five possible results displayed at that URL (Pending, Processing, Completed, Canceled, and Failed) only a Completed status indicates that the import was successful.  The operation is atomic; if any record fails, the file is rejected. In that case, the entire import is rolled back and all stored data is returned to its original state.

        To view the actual import status, enter the resulting status URL from the checkImportStatus response using a tool such as POSTMAN. This additional step provides more information about why the import has failed.

        To manage the information after a successful upload, use the web-based UI.

        ## Usage File Format
        The usage file uses the following headings: 

        | Heading         | Description   | Required |
        |-----------------|--------|----------|
        | ACCOUNT_ID      | Enter the account number, e.g., the default account number, such as A00000001, or your custom account number. Although this field is labeled as Account_Id, it is not the actual Account ID nor Account Name.  | Yes      |
        | UOM             | Enter the unit of measure. This must match the UOM for the usage. | Yes      |
        | QTY             | Enter the quantity.  | Yes      |
        | STARTDATE       | Enter the start date of the usage. This date determines the invoice item service period the associated usage is billed to. Date format is based on locale of the current user. Default date format: `MM/DD/YYYY`. | Yes |
        | ENDDATE         | Enter the end date of the usage. This is not used in calculations for usage billing and is optional. Date format is based on locale of the current user. Default date format: `MM/DD/YYYY`. <p>**Note:** The value of this column is optional, but the column header is required.</p> | No |
        | SUBSCRIPTION_ID | Enter the subscription number or subscription name. If you created the subscription in the Zuora application, Zuora created a number automatically in a format similar to A-S00000001. If you do not provide a value for this field, the associated usage will be added to all subscriptions for the specified Account that use this Unit Of Measure. If your Accounts can have multiple subscriptions and you do not want double or triple counting of usage, you must specify the Subscription or Charge ID in each usage record.  <p>**Note:** The value of this column is optional, but the column header is required.</p>  | No   |
        | CHARGE_ID       | Enter the charge number (not the charge name). You can see the charge ID, e.g., C-00000001, when you add your rate plan to your subscription and view your individual charges. If your Accounts can have multiple subscriptions and you do not want double or triple counting of usage, you must specify the specific Subscription or Charge ID in each usage record. This field is related to the Charge Number on the subscription rate plan.  <p>**Note:** The value of this column is optional, but the column header is required.</p>  | No      |
        | DESCRIPTION     | Enter a description for the charge. | No       |
      operationId: POST_Usage
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
      requestBody:
        content:
          multipart/form-data:
            schema:
              properties:
                file:
                  description: |
                    The usage data to import.
                  format: binary
                  type: string
              required:
                - file
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    checkImportStatus: /v1/usage/2c92c8f83dcbd8b1013dcce1159900cc/status
                    size: 316
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/POSTUsageResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Upload a usage file
      tags:
        - Usage
      x-code-samples:
        - lang: Curl
          source: |
            curl -X POST -H "Authorization: Bearer f21f017e4724445d8647b1f0de7ed6f1" -F "file=@UsageData.csv" "https://rest.zuora.com/v1/usage"
  "/v1/usage/accounts/{account-key}":
    get:
      description: |
        This REST API reference describes how to retrieve usage details for an account. Usage data is returned in reverse chronological order.
      operationId: GET_Usage
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_REQUEST_pageSize"
        - description: Account number or account ID.
          in: path
          name: account-key
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    nextPage: https://rest.zuora.com/v1/usage/accounts/A00001115?page=2&pageSize=10
                    success: true
                    usage:
                      - accountId: 2c92a0f9391832b10139183e277a0042
                        accountName: subscribeCallYan_1
                        accountNumber: A00001115
                        chargeNumber: null
                        id: 2c92c8953dac2b1c013dae0a263f35dd
                        quantity: 4
                        sourceName: Import
                        startDateTime: 2012-02-05 00:00:00
                        status: Pending
                        submissionDateTime: 2013-03-27 15:48:53
                        subscriptionNumber: null
                        unitOfMeasure: UOM
                      - accountId: 2c92a0f9391832b10139183e277a0042
                        accountName: subscribeCallYan_1
                        accountNumber: A00001115
                        chargeNumber: null
                        id: 2c92c8943db2ae51013dcce116b00f4b
                        quantity: 4
                        sourceName: Import
                        startDateTime: 2012-02-05 00:00:00
                        status: Pending
                        submissionDateTime: 2013-04-02 15:32:16
                        subscriptionNumber: null
                        unitOfMeasure: UOM
                      - accountId: 2c92a0f9391832b10139183e277a0042
                        accountName: subscribeCallYan_1
                        accountNumber: A00001115
                        chargeNumber: null
                        id: 2c92c8953dac2b1c013dae0a263f35dc
                        quantity: 3
                        sourceName: Import
                        startDateTime: 2012-02-04 00:00:00
                        status: Pending
                        submissionDateTime: 2013-03-27 15:48:53
                        subscriptionNumber: null
                        unitOfMeasure: UOM
                      - accountId: 2c92a0f9391832b10139183e277a0042
                        accountName: subscribeCallYan_1
                        accountNumber: A00001115
                        chargeNumber: null
                        id: 2c92c8943db2ae51013dcce116b00f4a
                        quantity: 3
                        sourceName: Import
                        startDateTime: 2012-02-04 00:00:00
                        status: Pending
                        submissionDateTime: 2013-04-02 15:32:16
                        subscriptionNumber: null
                        unitOfMeasure: UOM
                      - accountId: 2c92a0f9391832b10139183e277a0042
                        accountName: subscribeCallYan_1
                        accountNumber: A00001115
                        chargeNumber: null
                        id: 2c92c8953dac2b1c013dae0a263e35db
                        quantity: 2
                        sourceName: Import
                        startDateTime: 2012-02-03 00:00:00
                        status: Pending
                        submissionDateTime: 2013-03-27 15:48:53
                        subscriptionNumber: null
                        unitOfMeasure: UOM
                      - accountId: 2c92a0f9391832b10139183e277a0042
                        accountName: subscribeCallYan_1
                        accountNumber: A00001115
                        chargeNumber: null
                        id: 2c92c8943db2ae51013dcce116af0f49
                        quantity: 2
                        sourceName: Import
                        startDateTime: 2012-02-03 00:00:00
                        status: Pending
                        submissionDateTime: 2013-04-02 15:32:16
                        subscriptionNumber: null
                        unitOfMeasure: UOM
                      - accountId: 2c92a0f9391832b10139183e277a0042
                        accountName: subscribeCallYan_1
                        accountNumber: A00001115
                        chargeNumber: null
                        id: 2c92c8953dac2b1c013dae0a263e35da
                        quantity: 1
                        sourceName: Import
                        startDateTime: 2012-02-02 00:00:00
                        status: Pending
                        submissionDateTime: 2013-03-27 15:48:53
                        subscriptionNumber: null
                        unitOfMeasure: UOM
                      - accountId: 2c92a0f9391832b10139183e277a0042
                        accountName: subscribeCallYan_1
                        accountNumber: A00001115
                        chargeNumber: null
                        id: 2c92c8943db2ae51013dcce116af0f48
                        quantity: 1
                        sourceName: Import
                        startDateTime: 2012-02-02 00:00:00
                        status: Pending
                        submissionDateTime: 2013-04-02 15:32:16
                        subscriptionNumber: null
                        unitOfMeasure: UOM
                      - accountId: 2c92a0f9391832b10139183e277a0042
                        accountName: subscribeCallYan_1
                        accountNumber: A00001115
                        chargeNumber: null
                        id: 2c92c8953dac2b1c013dae0a263e35d9
                        quantity: 4
                        sourceName: Import
                        startDateTime: 2012-01-05 00:00:00
                        status: Pending
                        submissionDateTime: 2013-03-27 15:48:53
                        subscriptionNumber: null
                        unitOfMeasure: UOM
                      - accountId: 2c92a0f9391832b10139183e277a0042
                        accountName: subscribeCallYan_1
                        accountNumber: A00001115
                        chargeNumber: null
                        id: 2c92c8943db2ae51013dcce116af0f47
                        quantity: 4
                        sourceName: Import
                        startDateTime: 2012-01-05 00:00:00
                        status: Pending
                        submissionDateTime: 2013-04-02 15:32:16
                        subscriptionNumber: null
                        unitOfMeasure: UOM
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETUsageWrapper"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a usage record
      tags:
        - Usage
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/usage/accounts/{account-key}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/usage/accounts/{account-key}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/usage/accounts/{account-key}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/usage/accounts/{account-key}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/usage/accounts/{account-key}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/usage/accounts/{account-key}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/users/{username}/accept-access":
    put:
      description: |
        **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](http://support.zuora.com/). 

        Accepts user access to an entity.

        ## User Access Permission
        You must make the calls as an administrator of the entity that you want to accept the user access to. 
      operationId: PUT_AcceptUserAccess
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            Specify the login name of the user that you want to accept the access request for.
          in: path
          name: username
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PUTAcceptUserAccessResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "Multi-entity: Accept user access"
      tags:
        - Users
      x-code-samples:
        - lang: Curl
          source: "curl -X PUT -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" -d '{}' \"https://rest.zuora.com/v1/users/{username}/accept-access\""
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/users/{username}/accept-access');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/users/{username}/accept-access")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/users/{username}/accept-access", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/users/{username}/accept-access")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/users/{username}/accept-access");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/users/{username}/accessible-entities":
    get:
      description: |
        **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](http://support.zuora.com/). 

        Retrieves detailed information about all the entities that a user has permission to access.

        ## User Access Permission
        You can make the call as any entity user.
      operationId: GET_EntitiesUserAccessible
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            Specify the login user name that you want to retrieve.
          in: path
          name: username
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    entities:
                      - displayName: Acme Corporation
                        id: 8a808255557baba1015580e12fa5083a
                        locale: en_US
                        name: Acme Corporation
                        parentId: null
                        status: Provisioned
                        tenantId: "6398"
                        timezone: GMT
                      - displayName: Acme-Americas
                        id: 8a80825555a3c7a10155b460f53858e6
                        locale: en_US
                        name: Acme-Americas
                        parentId: 8a808255557baba1015580e12fa5083a
                        status: Provisioned
                        tenantId: "6398"
                        timezone: America/Los_Angeles
                      - displayName: Acme-US
                        id: 8a80825555a3c7a10155b46120d058e7
                        locale: en_US
                        name: Acme-US
                        parentId: 8a80825555a3c7a10155b460f53858e6
                        status: Provisioned
                        tenantId: "6398"
                        timezone: America/Los_Angeles
                      - displayName: Acme-Canada
                        id: 8a80825556ff28a4015708b93df82ba7
                        locale: en_US
                        name: Acme-Canada
                        parentId: 8a80825555a3c7a10155b460f53858e6
                        status: Provisioned
                        tenantId: "6398"
                        timezone: America/Toronto
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GETEntitiesUserAccessibleResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "Multi-entity: List all entities that a user can access"
      tags:
        - Users
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/v1/users/{username}/accessible-entities"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/users/{username}/accessible-entities');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/users/{username}/accessible-entities")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/v1/users/{username}/accessible-entities", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/users/{username}/accessible-entities")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/users/{username}/accessible-entities");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/v1/users/{username}/deny-access":
    put:
      description: |
        **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](http://support.zuora.com/). 

        Denies a user access to an entity. 

        ## User Access Permission
        You must make the calls as an administrator of the entity that you want to deny the user access to.
      operationId: PUT_DenyUserAccess
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            Specify the login name of the user that you want to deny the access.
          in: path
          name: username
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PUTDenyUserAccessResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "Multi-entity: Deny user access"
      tags:
        - Users
      x-code-samples:
        - lang: Curl
          source: "curl -X PUT -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" -d '{}' \"https://rest.zuora.com/v1/users/{username}/deny-access\""
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/users/{username}/deny-access');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/users/{username}/deny-access")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/users/{username}/deny-access", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/users/{username}/deny-access")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/users/{username}/deny-access");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/v1/users/{username}/request-access":
    put:
      description: |
        **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](http://support.zuora.com/). 

        Sends access requests to the entities that a user wants to access.

        ## User Access Permission
        You must make the call as an administrator of the entity, in which the request user is created. Also, this administrator must have the permission to access the entities that the request user wants to access.
      operationId: PUT_SendUserAccessRequests
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - description: |
            Specify the login name of the user who wants to access other entities.
          in: path
          name: username
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PUTSendUserAccessRequestType"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/PUTSendUserAccessRequestResponseType"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: "Multi-entity: Send user access requests"
      tags:
        - Users
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "targetEntityIds": [
                    "8a80825555a3c7a10155b46120d058e7", 
                    "8a80825556ff28a4015708b93df82ba7"
                ]
            }' "https://rest.zuora.com/v1/users/{username}/request-access"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/v1/users/{username}/request-access');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "targetEntityIds": [
                    "8a80825555a3c7a10155b46120d058e7", 
                    "8a80825556ff28a4015708b93df82ba7"
                ]
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"targetEntityIds\": [\n        \"8a80825555a3c7a10155b46120d058e7\", \n        \"8a80825556ff28a4015708b93df82ba7\"\n    ]\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/v1/users/{username}/request-access")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"targetEntityIds\": [\n        \"8a80825555a3c7a10155b46120d058e7\", \n        \"8a80825556ff28a4015708b93df82ba7\"\n    ]\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/v1/users/{username}/request-access", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/v1/users/{username}/request-access")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"targetEntityIds\": [\n        \"8a80825555a3c7a10155b46120d058e7\", \n        \"8a80825556ff28a4015708b93df82ba7\"\n    ]\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/v1/users/{username}/request-access");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"targetEntityIds\": [\n        \"8a80825555a3c7a10155b46120d058e7\", \n        \"8a80825556ff28a4015708b93df82ba7\"\n    ]\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /workflows:
    get:
      description: |
        Retrieves a list of workflows available in your Zuora tenant.      
      operationId: GET_Workflows
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: |
            If set to true, the operation retrieves workflows that have the callout trigger enabled. If set to false, the operation retrieves workflows that have the callout trigger disabled. If not specified, the operation will not use this filter.
          in: query
          name: callout_trigger
          required: false
          schema:
            type: boolean
        - description: |
            A CRON expession that specifies a schedule (for example, `0 0 * * *`). If specified, the operation retrieves the workflow that is run based on the specified schedule.
          in: query
          name: interval
          required: false
          schema:
            type: string
        - description: |
            If specified, the operation retrieves the workflow that is in the specified name.
          in: query
          name: name
          required: false
          schema:
            type: string
        - description: |
            If set to true, the operation retrieves workflows that have the ondemand trigger enabled. If set to false, the operation retrieves workflows that have the ondemand trigger disabled. If not specified, the operation will not use this filter.
          in: query
          name: ondemand_trigger
          required: false
          schema:
            type: boolean
        - description: |
            If set to true, the operation retrieves workflows that have the scheduled trigger enabled. If set to false, the operation retrieves workflows that have the scheduled trigger disabled. If not specfied, the operation will not use this filter.
          in: query
          name: scheduled_trigger
          required: false
          schema:
            type: boolean
        - description: |
            If you want to retrieve only the workflows on a specific page, you can specify the `page` number in the query.
          in: query
          name: page
          required: false
          schema:
            default: 1
            type: integer
        - description: |
            The number of workflows shown in a single call. If the `page` parameter is not specified, the operation will return only the first page of results. If there are multiple pages of results, use it with the `page` parameter to get the results on subsequent pages.
          in: query
          name: page_length
          required: false
          schema:
            default: 20
            type: integer
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    data:
                      - calloutTrigger: true
                        createdAt: 2019-05-31T14:52:38.171Z
                        description: ""
                        id: 48
                        interval: null
                        name: New test workflow
                        ondemandTrigger: true
                        scheduledTrigger: false
                        timezone: null
                        type: Workflow::Setup
                        updatedAt: 2019-06-03T21:02:26.694Z
                    pagination:
                      next_page: https://rest.zuora.com/workflows?page=2&page_length=1
                      page: 1
                      page_length: 1
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GetWorkflowsResponse"
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List workflows
      tags:
        - Workflows
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/workflows"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/workflows');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/workflows")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/workflows", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/workflows")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/workflows");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  /workflows/import:
    post:
      description: Creates a copy of a workflow using the exported JSON document of the original workflow.
      operationId: POST_WorkflowImport
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              properties:
                linkages:
                  items:
                    $ref: "#/components/schemas/Linkage"
                  type: array
                tasks:
                  items:
                    $ref: "#/components/schemas/Task"
                  type: array
                workflow:
                  $ref: "#/components/schemas/Workflow"
              type: object
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    calloutTrigger: true
                    createdAt: 2019-10-03T14:14:39.139Z
                    description: ""
                    id: 403
                    interval: null
                    name: Call Echo
                    ondemandTrigger: true
                    scheduledTrigger: false
                    timezone: null
                    type: Workflow::Setup
                    updatedAt: 2019-10-03T14:14:39.139Z
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/Workflow"
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Import a workflow
      tags:
        - Workflows
      x-code-samples:
        - lang: Curl
          source: "curl -X POST -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" -d '{}' \"https://rest.zuora.com/workflows/import\""
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/workflows/import');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/workflows/import")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/workflows/import", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/workflows/import")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/workflows/import");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  /workflows/metrics.json:
    get:
      description: |
        Gets workflow task usage sorted by day within a specified time frame.
      operationId: GET_WorkflowsUsages
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: |
            The start date of the usage data that you want to get. For example, 2019-01-01.
          in: query
          name: startDate
          required: true
          schema:
            format: date
            type: string
        - description: |
            The end date of the usage data that you want to get. For example, 2019-12-31.
          in: query
          name: endDate
          required: true
          schema:
            format: date
            type: string
        - description: |
            The type of metric that you want to get. Currently, only `taskCount` is supported. `taskCount` is the amount of task runs.
          in: query
          name: metrics
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    metrics:
                      - date: 2019-01-16
                        values:
                          taskCount: 1417
                      - date: 2019-08-02
                        values:
                          taskCount: 24
                      - date: 2019-05-23
                        values:
                          taskCount: 2
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/UsagesResponse"
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve workflow task usage
      tags:
        - Workflows
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/workflows/metrics.json"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/workflows/metrics.json');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/workflows/metrics.json")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/workflows/metrics.json", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/workflows/metrics.json")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/workflows/metrics.json");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  /workflows/tasks:
    get:
      description: |
        Retrieves a list of workflow tasks available in your Zuora tenant.
      operationId: GET_WorkflowsTasks
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: |
            If specified, the operation retrieves the task that is with specified id.
          in: query
          name: id
          required: false
          schema:
            type: string
        - description: |
            If specified, the operation retrieves tasks that is in the specified name.
          in: query
          name: name
          required: false
          schema:
            type: string
        - description: |
            If set to true, the operation retrieves workflows that have the scheduled trigger enabled. If set to false, the operation retrieves workflows that have the scheduled trigger disabled. If not specfied, the operation will not use this filter.
          in: query
          name: instance
          required: false
          schema:
            type: boolean
        - description: |
            If specified, the operation retrieves tasks that is the specified type.
          in: query
          name: action_type
          required: false
          schema:
            type: string
        - description: |
            If specified, the operation retrieves tasks with the specified object.
          in: query
          name: object
          required: false
          schema:
            type: string
        - description: |
            If specified, the operation retrieves tasks with the specified object id.
          in: query
          name: object_id
          required: false
          schema:
            type: string
        - description: |
            If specified, the operation retrieves tasks with the specified api call type used.
          in: query
          name: call_type
          required: false
          schema:
            type: string
        - description: |
            If specified, the operation retrieves tasks that for the specified workflow id.
          in: query
          name: workflow_id
          required: false
          schema:
            type: string
        - description: |
            If specified, the operation retrieves tasks that with the specified filter tags.
          in: query
          name: tags
          required: false
          schema:
            type: string
        - description: |
            If you want to retrieve only the workflows on a specific page, you can specify the `page` number in the query.
          in: query
          name: page
          required: false
          schema:
            default: 1
            type: integer
        - description: |
            The number of workflows shown in a single call. If the `page` parameter is not specified, the operation will return only the first page of results. If there are multiple pages of results, use it with the `page` parameter to get the results on subsequent pages.
          in: query
          name: page_length
          required: false
          schema:
            default: 20
            type: integer
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    data:
                      - action_type: If
                        call_type: SOAP
                        data:
                          Callout:
                            RequestBody:
                              queryString: Select Id From Contact Where LastName = 'Drew' AND FirstName = 'Nancy' AND  WorkEmail = 'nancy@xyz.com'
                            RequestHeaders:
                              Content-Type: application/json
                            ResponseBody:
                              message: |
                                An unexpected error occurred
                            ResponseCode: 500
                            ResponseHeaders:
                              cache-control:
                                - max-age=0, no-cache, no-store
                              connection:
                                - close
                              content-type:
                                - text/plain; charset=UTF-8
                              date:
                                - Thu, 19 Sep 2019 12:35:43 GMT
                              expires:
                                - Thu, 19 Sep 2019 12:35:43 GMT
                              pragma:
                                - no-cache
                              server:
                                - kong/0.9.9
                              x-n:
                                - S
                            URL: https://rest.apisandbox.zuora.com/v1/action/query
                          Files:
                            XML_52881.xml:
                              name: JSONData_xslt.xml
                              object_class: Workflow
                              size: 0.011725425720214844
                          Tasks:
                            Previous:
                              ErrorClass: WorkflowError::Callout
                              ErrorReason: Callout response was 500 after 1 tries.
                              Id: 2770
                              Status: Error
                          Workflow:
                            ExecutionDate: 2019-09-19
                            ExecutionDateTime: 2019-09-19T12:35:37
                            LastRunDate: 2019-09-19
                            LastRunDateTime: 2019-09-19T12:34:41
                            WorkflowRunUser: test-user
                        end_time: 2019-09-19T12:35:43.942Z
                        error: null
                        error_class: null
                        error_details: null
                        id: 2771
                        instance: true
                        name: If
                        object: null
                        object_id: null
                        original_task_id: 2582
                        original_workflow_id: 416
                        parameters:
                          if_clause: "{% if 0 > 1 %}\r

                            True\r

                            {% else %}\r

                            False\r

                            {% endif %}"
                          strict_variables: "true"
                        start_time: 2019-09-19T12:35:43.857Z
                        status: Success
                        tags: []
                        workflow_id: 476
                    pagination:
                      next_page: https://rest.zuora.com/workflows/tasks?page=2&page_length=1
                      page: 1
                      page_length: 1
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/TasksResponse"
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: List workflow tasks
      tags:
        - Workflows
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/workflows/tasks"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/workflows/tasks');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/workflows/tasks")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/workflows/tasks", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/workflows/tasks")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/workflows/tasks");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  /workflows/tasks/batch_update:
    put:
      description: |
        Updates a group of workflow tasks.
      operationId: PUT_WorkflowsTasksUpdate
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: "#/components/schemas/PutTasksRequest"
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    data:
                      - action_type: If
                        call_type: SOAP
                        data:
                          Callout:
                            RequestBody:
                              queryString: Select Id From Contact Where LastName = 'Drew' AND FirstName = 'Nancy' AND  WorkEmail = 'nancy@xyz.com'
                            RequestHeaders:
                              Content-Type: application/json
                            ResponseBody:
                              message: |
                                An unexpected error occurred
                            ResponseCode: 500
                            ResponseHeaders:
                              cache-control:
                                - max-age=0, no-cache, no-store
                              connection:
                                - close
                              content-type:
                                - text/plain; charset=UTF-8
                              date:
                                - Thu, 19 Sep 2019 12:35:43 GMT
                              expires:
                                - Thu, 19 Sep 2019 12:35:43 GMT
                              pragma:
                                - no-cache
                              server:
                                - kong/0.9.9
                              x-n:
                                - S
                            URL: https://rest.apisandbox.zuora.com/v1/action/query
                          Files:
                            XML_52881.xml:
                              name: JSONData_xslt.xml
                              object_class: Workflow
                              size: 0.011725425720214844
                          Tasks:
                            Previous:
                              ErrorClass: WorkflowError::Callout
                              ErrorReason: Callout response was 500 after 1 tries.
                              Id: 2770
                              Status: Error
                          Workflow:
                            ExecutionDate: 2019-09-19
                            ExecutionDateTime: 2019-09-19T12:35:37
                            LastRunDate: 2019-09-19
                            LastRunDateTime: 2019-09-19T12:34:41
                            WorkflowRunUser: test-user
                        end_time: 2019-09-19T12:35:43.942Z
                        error: null
                        error_class: null
                        error_details: null
                        id: 2771
                        instance: true
                        name: If
                        object: null
                        object_id: null
                        original_task_id: 2582
                        original_workflow_id: 416
                        parameters:
                          if_clause: "{% if 0 > 1 %}\r

                            True\r

                            {% else %}\r

                            False\r

                            {% endif %}"
                          strict_variables: "true"
                        start_time: 2019-09-19T12:35:43.857Z
                        status: Success
                        tags: []
                        workflow_id: 476
                    pagination:
                      page: null
                      page_length: null
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/TasksResponse"
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "400":
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - code: Task
                        status: 400
                        title: Data not present or not in array.
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/BadRequestResponse"
          description: |
            Bad Request for one of the following reasons:
            * Data is missing
            * Data is empty or not an array
            * Data has more than 50 tasks
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - code: Task
                        status: 404
                        title: Missing ids for tasks.
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/BadRequestResponse"
          description: One or more tasks are missing the required `id` field
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Update workflow tasks
      tags:
        - Workflows
      x-code-samples:
        - lang: Curl
          source: |-
            curl -X PUT -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" -d '{
                "data": [
                    {
                        "action_type": "If", 
                        "call_type": "SOAP", 
                        "concurrent_limit": 9999999, 
                        "id": 2771, 
                        "name": "If", 
                        "object": null, 
                        "object_id": null, 
                        "status": "Success", 
                        "tags": [], 
                        "workflow_id": 476
                    }
                ]
            }' "https://rest.zuora.com/workflows/tasks/batch_update"
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/workflows/tasks/batch_update');
            $request->setMethod(HTTP_METH_PUT);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{
                "data": [
                    {
                        "action_type": "If", 
                        "call_type": "SOAP", 
                        "concurrent_limit": 9999999, 
                        "id": 2771, 
                        "name": "If", 
                        "object": null, 
                        "object_id": null, 
                        "status": "Success", 
                        "tags": [], 
                        "workflow_id": 476
                    }
                ]
            }');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{\n    \"data\": [\n        {\n            \"action_type\": \"If\", \n            \"call_type\": \"SOAP\", \n            \"concurrent_limit\": 9999999, \n            \"id\": 2771, \n            \"name\": \"If\", \n            \"object\": null, \n            \"object_id\": null, \n            \"status\": \"Success\", \n            \"tags\": [], \n            \"workflow_id\": 476\n        }\n    ]\n}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/workflows/tasks/batch_update")
              .put(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{\n    \"data\": [\n        {\n            \"action_type\": \"If\", \n            \"call_type\": \"SOAP\", \n            \"concurrent_limit\": 9999999, \n            \"id\": 2771, \n            \"name\": \"If\", \n            \"object\": null, \n            \"object_id\": null, \n            \"status\": \"Success\", \n            \"tags\": [], \n            \"workflow_id\": 476\n        }\n    ]\n}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("PUT", "/workflows/tasks/batch_update", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/workflows/tasks/batch_update")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Put.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{\n    \"data\": [\n        {\n            \"action_type\": \"If\", \n            \"call_type\": \"SOAP\", \n            \"concurrent_limit\": 9999999, \n            \"id\": 2771, \n            \"name\": \"If\", \n            \"object\": null, \n            \"object_id\": null, \n            \"status\": \"Success\", \n            \"tags\": [], \n            \"workflow_id\": 476\n        }\n    ]\n}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/workflows/tasks/batch_update");
            var request = new RestRequest(Method.PUT);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{\n    \"data\": [\n        {\n            \"action_type\": \"If\", \n            \"call_type\": \"SOAP\", \n            \"concurrent_limit\": 9999999, \n            \"id\": 2771, \n            \"name\": \"If\", \n            \"object\": null, \n            \"object_id\": null, \n            \"status\": \"Success\", \n            \"tags\": [], \n            \"workflow_id\": 476\n        }\n    ]\n}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/workflows/tasks/{task_id}":
    get:
      description: |
        Retrieves a specific workflow task by its ID.
      operationId: GET_WorkflowsTask
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: |
            The unique ID of the task.
          in: path
          name: task_id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    action_type: If
                    call_type: SOAP
                    data:
                      Callout:
                        RequestBody:
                          queryString: Select Id From Contact Where LastName = 'Drew' AND FirstName = 'Nancy' AND  WorkEmail = 'nancy@xyz.com'
                        RequestHeaders:
                          Content-Type: application/json
                        ResponseBody:
                          message: |
                            An unexpected error occurred
                        ResponseCode: 500
                        ResponseHeaders:
                          cache-control:
                            - max-age=0, no-cache, no-store
                          connection:
                            - close
                          content-type:
                            - text/plain; charset=UTF-8
                          date:
                            - Thu, 19 Sep 2019 12:35:43 GMT
                          expires:
                            - Thu, 19 Sep 2019 12:35:43 GMT
                          pragma:
                            - no-cache
                          server:
                            - kong/0.9.9
                          x-n:
                            - S
                        URL: https://rest.apisandbox.zuora.com/v1/action/query
                      Files:
                        XML_52881.xml:
                          name: JSONData_xslt.xml
                          object_class: Workflow
                          size: 0.011725425720214844
                      Tasks:
                        Previous:
                          ErrorClass: WorkflowError::Callout
                          ErrorReason: Callout response was 500 after 1 tries.
                          Id: 2770
                          Status: Error
                      Workflow:
                        ExecutionDate: 2019-09-19
                        ExecutionDateTime: 2019-09-19T12:35:37
                        LastRunDate: 2019-09-19
                        LastRunDateTime: 2019-09-19T12:34:41
                        WorkflowRunUser: test-user
                    end_time: 2019-09-19T12:35:43.942Z
                    error: null
                    error_class: null
                    error_details: null
                    id: 2771
                    instance: true
                    name: If
                    object: null
                    object_id: null
                    original_task_id: 2582
                    original_workflow_id: 416
                    parameters:
                      if_clause: "{% if 0 > 1 %}\r

                        True\r

                        {% else %}\r

                        False\r

                        {% endif %}"
                      strict_variables: "true"
                    start_time: 2019-09-19T12:35:43.857Z
                    status: Success
                    tags: []
                    workflow_id: 476
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/Task"
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a workflow task
      tags:
        - Workflows
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/workflows/tasks/{task_id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/workflows/tasks/{task_id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/workflows/tasks/{task_id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/workflows/tasks/{task_id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/workflows/tasks/{task_id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/workflows/tasks/{task_id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/workflows/tasks/{task_id}/rerun":
    post:
      description: |
        Reruns a specific workflow task by its ID.
      operationId: POST_WorkflowsTaskRerun
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: |
            The unique ID of the task.
          in: path
          name: task_id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    action_type: If
                    call_type: SOAP
                    data:
                      Callout:
                        RequestBody:
                          queryString: Select Id From Contact Where LastName = 'Drew' AND FirstName = 'Nancy' AND  WorkEmail = 'nancy@xyz.com'
                        RequestHeaders:
                          Content-Type: application/json
                        ResponseBody:
                          message: |
                            An unexpected error occurred
                        ResponseCode: 500
                        ResponseHeaders:
                          cache-control:
                            - max-age=0, no-cache, no-store
                          connection:
                            - close
                          content-type:
                            - text/plain; charset=UTF-8
                          date:
                            - Thu, 19 Sep 2019 12:35:43 GMT
                          expires:
                            - Thu, 19 Sep 2019 12:35:43 GMT
                          pragma:
                            - no-cache
                          server:
                            - kong/0.9.9
                          x-n:
                            - S
                        URL: https://rest.apisandbox.zuora.com/v1/action/query
                      Files:
                        XML_52881.xml:
                          name: JSONData_xslt.xml
                          object_class: Workflow
                          size: 0.011725425720214844
                      Tasks:
                        Previous:
                          ErrorClass: WorkflowError::Callout
                          ErrorReason: Callout response was 500 after 1 tries.
                          Id: 2770
                          Status: Error
                      Workflow:
                        ExecutionDate: 2019-09-19
                        ExecutionDateTime: 2019-09-19T12:35:37
                        LastRunDate: 2019-09-19
                        LastRunDateTime: 2019-09-19T12:34:41
                        WorkflowRunUser: test-user
                    end_time: 2019-09-19T12:35:43.942Z
                    error: null
                    error_class: null
                    error_details: null
                    id: 2771
                    instance: true
                    name: If
                    object: null
                    object_id: null
                    original_task_id: 2582
                    original_workflow_id: 416
                    parameters:
                      if_clause: "{% if 0 > 1 %}\r

                        True\r

                        {% else %}\r

                        False\r

                        {% endif %}"
                      strict_variables: "true"
                    start_time: 2019-09-19T12:35:43.857Z
                    status: Success
                    tags: []
                    workflow_id: 476
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/Task"
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Rerun a workflow task
      tags:
        - Workflows
      x-code-samples:
        - lang: Curl
          source: "curl -X POST -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" -d '{}' \"https://rest.zuora.com/workflows/tasks/{task_id}/rerun\""
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/workflows/tasks/{task_id}/rerun');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/workflows/tasks/{task_id}/rerun")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/workflows/tasks/{task_id}/rerun", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/workflows/tasks/{task_id}/rerun")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/workflows/tasks/{task_id}/rerun");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
  "/workflows/{workflow_id}":
    delete:
      description: |
        Deletes a specific workflow by its ID.
      operationId: DELETE_Workflow
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: |
            The unique ID of a workflow. For example, 19080.
          in: path
          name: workflow_id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    id: 19080
                    success: true
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/DeleteWorkflowSuccess"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - "Invalid ID / Multiple objects returned - SchemaId: 2 InstanceId: 2 ObjectId: 19080"
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/DeleteWorkflowError"
          description: The workflow for the given id does not exist
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Delete a workflow
      tags:
        - Workflows
      x-code-samples:
        - lang: Curl
          source: 'curl -X DELETE -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/workflows/{workflow_id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/workflows/{workflow_id}');
            $request->setMethod(HTTP_METH_DELETE);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/workflows/{workflow_id}")
              .delete()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("DELETE", "/workflows/{workflow_id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/workflows/{workflow_id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Delete.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/workflows/{workflow_id}");
            var request = new RestRequest(Method.DELETE);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    get:
      description: |
        Retrieves information about a specific workflow by its ID.
      operationId: GET_Workflow
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: |
            The unique ID of a workflow. For example, 19080.
          in: path
          name: workflow_id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    cpuTime: 19:01:04
                    createdAt: 2019-09-10 19:32:21 UTC
                    finishedAt: 2019-09-10 19:33:34 UTC
                    id: 19063
                    messages:
                      success:
                        No Message:
                          - 84067
                          - 84066
                          - 84065
                          - 84064
                    name: WF-19027-00000032
                    originalWorkflowId: 19027
                    runTime: 64.513026
                    status: Finished
                    tasks:
                      error: 0
                      pending: 0
                      processing: 0
                      queued: 0
                      stopped: 0
                      success: 4
                      total: 4
                    type: Workflow::Instance
                    updatedAt: 2019-09-10 19:33:34 UTC
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GetWorkflowResponse"
          description: ""
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Retrieve a workflow
      tags:
        - Workflows
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/workflows/{workflow_id}"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/workflows/{workflow_id}');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/workflows/{workflow_id}")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/workflows/{workflow_id}", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/workflows/{workflow_id}")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/workflows/{workflow_id}");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
    patch:
      description: |
        Updates the definition of a specific workflow by its ID, which allows you to [configure the settings of a workflow](https://knowledgecenter.zuora.com/CE_Workflow/Using_Workflow/B_Configure_a_Workflow) via API.
      operationId: PATCH_UpdateWorkflow
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - description: |
            The unique ID of a workflow. For example, 19080.
          in: path
          name: workflow_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              properties:
                callout_trigger:
                  description: |
                    If true, the workflow will run upon an API callout. This field must be `true` for integrating with the Configurable Payment Retry feature or the Collections Window feature in Collect.
                  type: boolean
                description:
                  description: |
                    The description of the workflow defintion
                  type: string
                interval:
                  description: |
                    The cron expression for workflows with scheduled_trigger as `true`
                  type: string
                name:
                  description: |
                    The name of the workflow definition
                  type: string
                ondemand_trigger:
                  description: |
                    If true, the workflow will run when manually initiated.
                  type: boolean
                priority:
                  description: |
                    Can be `High`, `Medium`, or `Low`. Higher-priority workflows take precedence over lower-priority workflows. When a workflow of higher priority is initiated, it will be placed ahead of lower-priority workflows that are running. Depending on the available resources, lower-priority workflows may be paused until resources are released.
                  type: string
                scheduled_trigger:
                  description: |
                    If true, the workflow will run based on the configured schedule with the interval field.
                  type: boolean
                status:
                  description: |
                    Can be `Active` or `Inactive`. Active workfow definitions run like normal. Inactive workflow definitions cannot be run.
                  type: string
                timezone:
                  description: |
                    The timezone that corresponds with the cron expression in the interval field. See the [list of accepted timezone values](https://docs.google.com/spreadsheets/d/1skhepi-q5l9LyaMUPZjU_V9gzTphNMqNyV6ST5mygEo/edit?usp=sharing).
                  type: string
              type: object
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    calloutTrigger: true
                    createdAt: 2021-03-24T19:52:37.254Z
                    description: This is my special workflow! It bills everybody
                    id: 2
                    interval: 0 0 /1 /1 * *
                    name: Bill Customers
                    ondemandTrigger: true
                    priority: Low
                    scheduledTrigger: true
                    status: Inactive
                    timezone: Eastern Time (US & Canada)
                    type: Workflow::Setup
                    updatedAt: 2021-04-05T18:35:52.781Z
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/GetWorkflowSetupResponse"
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "404":
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - "Invalid ID / Multiple objects returned - SchemaId: 2 InstanceId: 2 ObjectId: 19080"
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/DeleteWorkflowError"
          description: The workflow for the given id does not exist
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "422":
          content:
            application/json:
              examples:
                response:
                  value:
                    reasons:
                      - fieldName: status
                        title: on is not a valid status. Choose from Active or Inactive
                      - fieldName: interval
                        title: The entered cron interval is not valid, rebuild schedule and submit again.
                    success: false
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/ValidationErrors"
          description: |
            Bad Request for one of the following reasons:
            * The name or description fields are not strings.
            * The ondemand_trigger, callout_trigger, or scheduled_trigger fields are not booleans.
            * The timezone does not match one of the valid values in [this spread sheet](https://docs.google.com/spreadsheets/d/1skhepi-q5l9LyaMUPZjU_V9gzTphNMqNyV6ST5mygEo/edit?usp=sharing).
            * The priority is not one of High, Medium, or Low.
            * The status is not one of Active or Inactive.
            * The scheduled_trigger is set to true but a valid timezone and interval were not passed.
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Update a workflow definition
      tags:
        - Workflows
      x-code-samples: []
  "/workflows/{workflow_id}/export":
    get:
      description: Export a Workflow in a JSON document. This document can be used to create a copy of this workflow.
      operationId: GET_WorkflowExport
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: The ID of the workflow to export.
          in: path
          name: workflow_id
          required: true
          schema:
            type: integer
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    linkages:
                      - linkage_type: Start
                        source_task_id: null
                        source_workflow_id: 286
                        target_task_id: 849
                    tasks:
                      - action_type: Callout
                        assignment: []
                        call_type: SOAP
                        concurrent_limit: 9999999
                        css:
                          left: 470px
                          top: 160px
                        error: null
                        error_class: null
                        error_details: null
                        id: 849
                        iterate_row_reference: null
                        name: Call Echo
                        object: null
                        object_batched_reference: null
                        object_id: null
                        original_task_id: null
                        original_workflow_id: null
                        parameters:
                          authorization:
                            type: none
                          body_type: raw
                          datas:
                            - key: ""
                              value: ""
                          headers:
                            - key: ""
                              value: ""
                          include_response_code: "true"
                          method: GET
                          raw_body: ""
                          retry_rules:
                            current_retry_count: "0"
                            retry_count: "0"
                            retry_window: "30"
                          strict_variables: "true"
                          url: http://scooterlabs.com/echo
                          validate_response: "false"
                          validation:
                            status_codes:
                              - ""
                              - "200"
                            zuora_call: "false"
                          validation_scheme: ""
                        priority: Medium
                        process_id: null
                        status: null
                        tags:
                          - ""
                        task_id: null
                    workflow:
                      call_type: null
                      callout_trigger: true
                      css:
                        left: 30px
                        top: 40px
                      data: {}
                      delete_ttl: 60
                      description: ""
                      finished_at: null
                      id: 286
                      interval: null
                      name: Call Echo
                      notifications: {}
                      ondemand_trigger: true
                      original_workflow_id: null
                      parameters: {}
                      priority: Medium
                      run_mode: automated
                      scheduled_trigger: false
                      started_at: null
                      status: null
                      sync_trigger: false
                      task_summary: {}
                      timezone: null
                      type: Workflow::Setup
            application/json; charset=utf-8:
              schema:
                properties:
                  linkages:
                    items:
                      $ref: "#/components/schemas/Linkage"
                    type: array
                  tasks:
                    items:
                      $ref: "#/components/schemas/Task"
                    type: array
                  workflow:
                    $ref: "#/components/schemas/Workflow"
                type: object
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Export a workflow
      tags:
        - Workflows
      x-code-samples:
        - lang: Curl
          source: 'curl -X GET -H "Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3" -H "Content-Type: application/json" "https://rest.zuora.com/workflows/{workflow_id}/export"'
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/workflows/{workflow_id}/export');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/workflows/{workflow_id}/export")
              .get()
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3"
                }

            conn.request("GET", "/workflows/{workflow_id}/export", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/workflows/{workflow_id}/export")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/workflows/{workflow_id}/export");
            var request = new RestRequest(Method.GET);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            IRestResponse response = client.Execute(request);
  "/workflows/{workflow_id}/run":
    post:
      description: |
        Run a specified workflow. In the request body, you can include parameters that you want to pass to the workflow. For the parameters to be recognized and picked up by tasks in the workflow, you need to define the parameters first. 

        To learn about how to define parameters, see [Configure the settings of a workflow](https://knowledgecenter.zuora.com/CE_Workflow/Using_Workflow/B_Configure_a_Workflow).
      operationId: POST_Run_Workflow
      parameters:
        - $ref: "#/components/parameters/GLOBAL_HEADER_Authorization_OAuth"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Entity_Ids_Single"
        - $ref: "#/components/parameters/GLOBAL_HEADER_Zuora_Track_Id"
        - description: The ID of the workflow you want to run.
          in: path
          name: workflow_id
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              example:
                accountId: 4028905f5a87c0ff015a87d25ae90025
                paymentId: 4028905f5a87c0ff015a889ddfb800c0
              type: object
        description: Include parameters you want to pass to the workflow.
      responses:
        "200":
          content:
            application/json:
              examples:
                response:
                  value:
                    createdAt: 2019-09-19 18:25:33 UTC
                    id: 400
                    name: WF-396-00000003
                    originalWorkflowId: 396
                    status: Queued
                    type: Workflow::Instance
                    updatedAt: 2019-09-19 18:25:33 UTC
            application/json; charset=utf-8:
              schema:
                $ref: "#/components/schemas/WorkflowInstance"
          description: OK
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "400":
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - code: invalid
                        status: 400
                        title: Callout mode is not turned on in this workflow.
            application/json; charset=utf-8:
              schema:
                properties:
                  errors:
                    description: The list of errors returned from the workflow
                    items:
                      $ref: "#/components/schemas/WorkflowError"
                    type: array
                type: object
          description: Callout not enabled for the workflow
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "406":
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - code: invalid
                        status: 406
                        title: Required field for Workflow-Message1 does not have a set value. Ensure parameter 'Message' is present.
                    parameters:
                      workflow: {}
            application/json; charset=utf-8:
              schema:
                properties:
                  errors:
                    description: The list of errors returned from the workflow
                    items:
                      $ref: "#/components/schemas/WorkflowError"
                    type: array
                  parameters:
                    description: The request body that was originally provided to the run API.
                type: object
          description: The provided body is missing one or more required parameters
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
        "409":
          content:
            application/json:
              examples:
                response:
                  value:
                    errors:
                      - code: invalid
                        status: 406
                        title: Workflow WF-396-00000002 with Id 399 is an instance/run.
            application/json; charset=utf-8:
              schema:
                properties:
                  errors:
                    description: The list of errors returned from the workflow
                    items:
                      $ref: "#/components/schemas/WorkflowError"
                    type: array
                type: object
          description: The provided workflow_id references a workflow instance
          headers:
            RateLimit-Limit:
              description: |
                The request limit quota for the time window closest to exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: string
            RateLimit-Remaining:
              description: |
                The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            RateLimit-Reset:
              description: |
                The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Policies/Concurrent_Request_Limits#Rate_limits) for more information.
              schema:
                type: number
            Zuora-Request-Id:
              description: |
                The Zuora internal identifier of the API call. You cannot control the value of this header.
              schema:
                maxLength: 36
                minLength: 36
                type: string
            Zuora-Track-Id:
              description: |
                A custom identifier for tracing the API call. If you specified a tracing identifier in the request
                headers, Zuora returns the same tracing identifier. Otherwise, Zuora does not set this header.
              schema:
                maxLength: 64
                type: string
      summary: Run a workflow
      tags:
        - Workflows
      x-code-samples:
        - lang: Curl
          source: "curl -X POST -H \"Authorization: Bearer 6d151216ef504f65b8ff6e9e9e8356d3\" -H \"Content-Type: application/json\" -d '{}' \"https://rest.zuora.com/workflows/{workflow_id}/run\""
        - lang: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://rest.zuora.com/workflows/{workflow_id}/run');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders(array(
              'content-type' => 'application/json',
              'Authorization' => 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            ));

            $request->setBody('{}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          source: |-
            OkHttpClient client = new OkHttpClient();

            MediaType mediaType = MediaType.parse("application/json");
            RequestBody body = RequestBody.create(mediaType, "{}");
            Request request = new Request.Builder()
              .url("https://rest.zuora.com/workflows/{workflow_id}/run")
              .post(body)
              .addHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3")
              .addHeader("content-type", "application/json")
              .addHeader("cache-control", "no-cache")
              .build();

            Response response = client.newCall(request).execute();
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("https://rest.zuora.com/")

            payload = "{}"

            headers = {
                'Authorization': "Bearer 6d151216ef504f65b8ff6e9e9e8356d3",
                'content-type': "application/json",
                }

            conn.request("POST", "/workflows/{workflow_id}/run", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'

            url = URI("https://rest.zuora.com/workflows/{workflow_id}/run")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Post.new(url)
            request["Authorization"] = 'Bearer 6d151216ef504f65b8ff6e9e9e8356d3'
            request["content-type"] = 'application/json'
            request.body = "{}"

            response = http.request(request)
            puts response.read_body
        - lang: C#
          source: |-
            var client = new RestClient("https://rest.zuora.com/workflows/{workflow_id}/run");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/json");
            request.AddHeader("Authorization", "Bearer 6d151216ef504f65b8ff6e9e9e8356d3");
            request.AddParameter("application/json", "{}", ParameterType.RequestBody);
            IRestResponse response = client.Execute(request);
components:
  parameters:
    GLOBAL_HEADER_Authorization_OAuth:
      description: |
        `Bearer {token}` for a valid OAuth token.
      in: header
      name: Authorization
      required: true
      schema:
        type: string
    GLOBAL_HEADER_Authorization_OAuth_Notifications:
      description: |
        `Bearer {token}` for a valid OAuth token.

        Note that you must regenerate the OAuth token after the Custom Events feature is enabled in your Zuora tenant. The OAuth tokens generated before this feature is turned on will not work.
      in: header
      name: Authorization
      required: true
      schema:
        type: string
    GLOBAL_HEADER_Charge_Metrics_Accept:
      description: |
        Expressed as MIME types that the client is able to understand. Using content negotiation, the server then selects one of the proposals, uses it and informs the client of its choice with the `Content-Type` response header. The possible response MIME types are `application/json-seq` compatible with http://jsonlines.org/, and `text/csv` compatible with RFC 4180. `application/json-seq` is the default response MIME type. If the `Accept` header is not sepecified, or set */*, the response body is returned in application/json-seq MIME type.
      in: header
      name: Accept
      required: false
      schema:
        type: string
    GLOBAL_HEADER_Cursor:
      description: |
        The cursor indicator of the data page you want to retrieve. By default, the first page of data is returned in the response. If more data pages are available, the operation returns `true` in the `hasMore` response body field. The `cursor` response body field specifies the cursor indicator of the next page of data. If there is no data after the current page, the value of `cursor` is `null`.
      in: query
      name: cursor
      required: false
      schema:
        type: string
    GLOBAL_HEADER_If_Match:
      description: |
        The expected ETag of the resource. You can use this header to perform a conditional request. Zuora responds with 412 Precondition Failed if the ETag of the resource does not match the value of this header. 
      in: header
      name: If-Match
      required: false
      schema:
        type: string
    GLOBAL_HEADER_X_Zuora_WSDL_Version:
      description: |
        Zuora WSDL version number.
      in: header
      name: X-Zuora-WSDL-Version
      required: false
      schema:
        default: 79
        type: string
    GLOBAL_HEADER_Zuora_Entity_Ids_Single:
      description: |
        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.
      in: header
      name: Zuora-Entity-Ids
      required: false
      schema:
        type: string
    GLOBAL_HEADER_Zuora_Track_Id:
      description: |
        A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue.

        The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`"`), and quote (`'`).
      in: header
      name: Zuora-Track-Id
      required: false
      schema:
        maxLength: 64
        type: string
    GLOBAL_HEADER_entityId:
      description: The Id of the entity that you want to access. Note that you must have permission to access the entity. For more information, see [REST Authentication](https://www.zuora.com/developer/api-reference/#section/Authentication/Entity-Id-and-Entity-Name).
      in: header
      name: entityId
      required: false
      schema:
        type: string
    GLOBAL_HEADER_entityName:
      description: The [name of the entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity/B_Introduction_to_Entity_and_Entity_Hierarchy#Name_and_Display_Name) that you want to access. Note that you must have permission to access the entity. For more information, see [REST Authentication](https://www.zuora.com/developer/api-reference/#section/Authentication/Entity-Id-and-Entity-Name).
      in: header
      name: entityName
      required: false
      schema:
        type: string
    GLOBAL_HEADER_pageSize_Usage:
      description: |
        The maximum number of rows in a page to return in a response. 
      in: query
      name: pageSize
      required: false
      schema:
        default: 100
        format: int32
        maximum: 2000
        minimum: 25
        type: integer
    GLOBAL_HEADER_page_Usage:
      description: |
        The index number of the page you want to retrieve. By default, the first page is returned in the response. 
      in: query
      name: page
      required: false
      schema:
        default: 0
        format: int32
        type: integer
    GLOBAL_REQUEST_page:
      description: |
        Page number.
      in: query
      name: page
      required: false
      schema:
        default: 1
        minimum: 1
        type: integer
    GLOBAL_REQUEST_pageSize:
      description: |
        Number of rows returned per page.
      in: query
      name: pageSize
      required: false
      schema:
        default: 20
        maximum: 40
        type: integer
    GLOBAL_REQUEST_pageSize_catalog:
      description: |
        Number of rows returned per page.
      in: query
      name: pageSize
      required: false
      schema:
        default: 10
        maximum: 40
        type: integer
    GLOBAL_REQUEST_pageSize_entityConnection:
      description: |
        Number of rows returned per page.
      in: query
      name: pageSize
      required: false
      schema:
        default: 30
        maximum: 300
        type: integer
    GLOBAL_REQUEST_pageSize_finance_accounting:
      description: |
        Number of rows returned per page.
      in: query
      name: pageSize
      required: false
      schema:
        default: 300
        maximum: 300
        type: integer
    GLOBAL_REQUEST_pageSize_finance_revenue:
      description: |
        Number of rows returned per page.
      in: query
      name: pageSize
      required: false
      schema:
        default: 8
        maximum: 300
        type: integer
    GLOBAL_REQUEST_rejectUnknownFields:
      description: |
        Specifies whether the call fails if the request body contains unknown fields.
        With `rejectUnknownFields` set to `true`, Zuora returns a 400 response if
        the request body contains unknown fields. The body of the 400 response is:

        ```json
        {
            "message": "Error - unrecognised fields"
        }
        ```

        By default, Zuora ignores unknown fields in the request body.
      in: query
      name: rejectUnknownFields
      required: false
      schema:
        default: false
        type: boolean
  requestBodies:
    POSTOrderPreviewRequestType:
      content:
        application/json; charset=utf-8:
          schema:
            $ref: "#/components/schemas/POSTOrderPreviewRequestType"
      required: true
    POSTOrderRequestType:
      content:
        application/json; charset=utf-8:
          schema:
            $ref: "#/components/schemas/POSTOrderRequestType"
      required: true
    POSTRevenueScheduleByDateRangeType:
      content:
        application/json; charset=utf-8:
          schema:
            $ref: "#/components/schemas/POSTRevenueScheduleByDateRangeType"
      required: true
    POSTRevenueScheduleByTransactionType:
      content:
        application/json; charset=utf-8:
          schema:
            $ref: "#/components/schemas/POSTRevenueScheduleByTransactionType"
      required: true
    PUTSubscriptionPatchRequestType:
      content:
        application/json; charset=utf-8:
          schema:
            $ref: "#/components/schemas/PUTSubscriptionPatchRequestType"
      required: true
  schemas:
    Account:
      allOf:
        - description: |
            The information of the new account to be created with the order. Note that this actually specifies the invoice owner account of the subscriptions included in this order. To create the new account, either a **creditCard** structure or the **hpmCreditCardPaymentMethodId** field (but not both) should be provided. The one provided becomes the default payment method for this account. If the credit card information is declined or can't be verified, then the account is not created.
          properties:
            accountNumber:
              maxLength: 70
              type: string
            additionalEmailAddresses:
              description: |
                List of additional email addresses to receive emailed invoices. Values should be a comma-separated list of email addresses.
              maxLength: 1200
              type: string
            allowInvoiceEdit:
              description: |
                Indicates if associated invoices can be edited.
                Values are: 

                * `true`
                * `false` (default)
              type: boolean
            autoPay:
              description: Specifies whether future payments are to be automatically billed when they are due. Possible values are `true`, `false`.
              type: boolean
            batch:
              type: string
            billCycleDay:
              description: Day of the month that the account prefers billing periods to begin on. If set to 0, the bill cycle day will be set as "AutoSet".
              maximum: 31
              minimum: 0
              type: integer
            billToContact:
              $ref: "#/components/schemas/BillToContactPostOrder"
            communicationProfileId:
              type: string
            creditCard:
              $ref: "#/components/schemas/creditCard"
            creditMemoTemplateId:
              description: |
                **Note:** This field is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

                The unique ID of the credit memo template, configured in **Billing Settings** > **Manage Billing Document Configuration** through the Zuora UI. For example, 2c92c08a6246fdf101626b1b3fe0144b.
              type: string
            crmId:
              maxLength: 100
              type: string
            currency:
              description: |
                3 uppercase character currency code.

                For payment method authorization, if the `paymentMethod` > `currencyCode` field is specified, `currencyCode` is used. Otherwise, this `currency` field is used for payment method authorization. If no currency is specified for the account, the default currency of the account is then used.
              type: string
            customFields:
              $ref: "#/components/schemas/AccountObjectCustomFields"
            customerServiceRepName:
              description: |
                Name of the account's customer service representative, if applicable.
              maxLength: 50
              type: string
            debitMemoTemplateId:
              description: |
                **Note:** This field is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

                The unique ID of the debit memo template, configured in **Billing Settings** > **Manage Billing Document Configuration** through the Zuora UI. For example, 2c92c08d62470a8501626b19d24f19e2.
              type: string
            hpmCreditCardPaymentMethodId:
              description: |
                The ID of the payment method associated with this account. The payment method specified for this field will be set as the default payment method of the account.

                If the `autoPay` field is set to `true`, you must provide the credit card payment method ID for either this field or the `creditCard` field,
                but not both.     
              type: string
            invoiceDeliveryPrefsEmail:
              description: |
                Specifies whether to turn on the invoice delivery method 'Email' for the new account. 
                Values are: 

                * `true` (default). Turn on the invoice delivery method 'Email' for the new account.
                * `false`. Turn off the invoice delivery method 'Email' for the new account.
              type: boolean
            invoiceDeliveryPrefsPrint:
              description: |
                Specifies whether to turn on the invoice delivery method 'Print' for the new account.
                Values are: 

                * `true`. Turn on the invoice delivery method 'Print' for the new account.
                * `false` (default). Turn off the invoice delivery method 'Print' for the new account.
              type: boolean
            invoiceTemplateId:
              type: string
            name:
              maxLength: 255
              type: string
            notes:
              maxLength: 65535
              type: string
            parentId:
              description: Identifier of the parent customer account for this Account object. Use this field if you have customer hierarchy enabled.
              type: string
            paymentGateway:
              maxLength: 40
              type: string
            paymentMethod:
              $ref: "#/components/schemas/PaymentMethod"
            paymentTerm:
              type: string
            purchaseOrderNumber:
              description: |
                The number of the purchase order associated with this account. Purchase order information generally comes from customers.
              maxLength: 100
              type: string
            salesRep:
              description: |
                The name of the sales representative associated with this account, if applicable.
              maxLength: 50
              type: string
            sequenceSetId:
              description: |
                The ID of the billing document sequence set to assign to the customer account. 

                The billing documents to generate for this account will adopt the prefix and starting document number configured in the sequence set.
              type: string
            soldToContact:
              $ref: "#/components/schemas/SoldToContactPostOrder"
            taxInfo:
              $ref: "#/components/schemas/TaxInfo"
          required:
            - name
            - currency
            - billCycleDay
            - billToContact
          type: object
        - $ref: "#/components/schemas/DataAccessControlField"
    AccountCreditCardHolder:
      description: |
        Information about the cardholder of a credit card payment method associated with an account. If you do not provide information about the cardholder, Zuora uses the account's bill-to contact.
      properties:
        addressLine1:
          description: |
            First line of the cardholder's address.
          maxLength: 255
          type: string
        addressLine2:
          description: |
            Second line of the cardholder's address.
          maxLength: 255
          type: string
        cardHolderName:
          description: |
            Full name of the cardholder as it appears on the card. For example, "John J Smith".
          maxLength: 50
          type: string
        city:
          description: |
            City of the cardholder's address.
          maxLength: 40
          type: string
        country:
          description: |
            Country of the cardholder's address. The value of this field must be a valid country name or abbreviation.
          maxLength: 64
          type: string
        email:
          description: |
            Email address of the cardholder.
          maxLength: 80
          type: string
        phone:
          description: |
            Phone number of the cardholder.
          maxLength: 40
          type: string
        state:
          description: |
            State or province of the cardholder's address.
          maxLength: 50
          type: string
        zipCode:
          description: |
            ZIP code or other postal code of the cardholder's address.
          maxLength: 20
          type: string
      type: object
    AccountObjectCustomFields:
      additionalProperties:
        description: |
          Custom fields of the Account object. The name of each custom field has the form <code>*customField*__c</code>. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
      description: |
        Container for custom fields of an Account object.
      title: accountFieldsCustom
      type: object
    AccountObjectNSFields:
      description: |
        Container for Account fields provided by the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
      properties:
        Class__NS:
          description: |
            Value of the Class field for the corresponding customer account in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        CustomerType__NS:
          description: |
            Value of the Customer Type field for the corresponding customer account in NetSuite. The Customer Type field is used when the customer account is created in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          enum:
            - Company
            - Individual
          type: string
        Department__NS:
          description: |
            Value of the Department field for the corresponding customer account in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        IntegrationId__NS:
          description: |
            ID of the corresponding object in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        IntegrationStatus__NS:
          description: |
            Status of the account's synchronization with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        Location__NS:
          description: |
            Value of the Location field for the corresponding customer account in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        Subsidiary__NS:
          description: |
            Value of the Subsidiary field for the corresponding customer account in NetSuite. The Subsidiary field is required if you use NetSuite OneWorld. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        SyncDate__NS:
          description: |
            Date when the account was sychronized with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        SynctoNetSuite__NS:
          description: |
            Specifies whether the account should be synchronized with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          enum:
            - Yes
            - No
          type: string
      title: accountFieldsNetSuite
      type: object
    AccountingCodeObjectCustomFields:
      additionalProperties:
        description: |
          Custom fields of the Accounting Code object. The name of each custom field has the form <code>*customField*__c</code>. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
      description: |
        Container for custom fields of an Accounting Code object.
      title: accountingCodeFieldsCustom
      type: object
    AccountingPeriodObjectCustomFields:
      additionalProperties:
        description: |
          Custom fields of the Accounting Period object. The name of each custom field has the form <code>*customField*__c</code>. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
      description: |
        Container for custom fields of an Accounting Period object.
      title: accountingPeriodFieldsCustom
      type: object
    ActionAmendCreditMemo:
      description: |
        Container for credit memos.

        **Note:** This container is only available if you set the WSDL minor version to 107.0 or later in the request header, and you have  [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 
      properties:
        TaxAmount:
          description: |
            Tax amount on the credit memo.
          format: double
          type: number
        TotalAmount:
          description: |
            Credit memo amount.
          format: double
          type: number
        TotalAmountWithoutTax:
          description: |
            Credit memo amount minus tax.
          format: double
          type: number
      title: CreditMemo
      type: object
    ActionAmendCreditMemoData:
      properties:
        CreditMemo:
          $ref: "#/components/schemas/ActionAmendCreditMemo"
        CreditMemoItem:
          description: ""
          items:
            $ref: "#/components/schemas/ActionAmendCreditMemoItem"
          type: array
      title: CreditMemoDatas
      type: object
    ActionAmendCreditMemoItem:
      properties:
        AmountWithoutTax:
          description: |
            The credit memo item amount excluding tax.
          format: double
          type: number
        ChargeName:
          description: |
            Name of this credit memo item.
          type: string
        Description:
          description: |
            Description of this credit memo item.
          type: string
        ProductRatePlanChargeId:
          description: |
            ID of the product rate plan charge associated with this credit memo item.
          type: string
        Quantity:
          description: |
            Quantity of the charge associated with this credit memo item.
          type: integer
        ServiceEndDate:
          description: |
            End date of the service period for this credit memo item, as yyyy-mm-dd.
          format: date
          type: string
        ServiceStartDate:
          description: |
            Service start date of this credit memo item, as yyyy-mm-dd.
          format: date
          type: string
        TaxAmount:
          description: |
            The tax amount of the credit memo item.
          format: double
          type: number
        UnitOfMeasure:
          description: |
            Unit used to measure consumption.
          type: string
      title: CreditMemoItem
      type: object
    ActionAmendInvoiceData:
      properties:
        Invoice:
          $ref: "#/components/schemas/Invoice"
        InvoiceItem:
          description: ""
          items:
            $ref: "#/components/schemas/ActionAmendInvoiceItem"
          type: array
      type: object
    ActionAmendInvoiceItem:
      properties:
        AccountingCode:
          description: |2-
             The accounting code for the item's charge. Accounting codes group transactions that contain similar accounting attributes.


            **Character limit**: 100

            **Values**: inherited from `RatePlanCharge.AccountingCode` 
          type: string
        AppliedToInvoiceItemId:
          description: |2-
             Associates a discount invoice item to a specific invoice item.


            **Character limit**: 32

            **Values**: inherited from the ID of the charge that a discount applies to 
          type: string
        ChargeAmount:
          description: |2-
             The amount being charged for the invoice item. This amount doesn't include taxes regardless if the charge's tax mode is inclusive or exclusive.


            **Character limit**:

            **Values**: automatically calculated from multiple fields in multiple objects 
          format: double
          type: number
        ChargeDate:
          description: |2-
             The date when the Invoice Item is created .


            **Character limit**: 29

            **Values**: automatically generated 
          format: date-time
          type: string
        ChargeDescription:
          description: |2-
             A description of the invoice item's charge.


            **Character limit**: 500

            **Values**: inherited from `RatePlanCharge.Description` 
          type: string
        ChargeId:
          description: |2-
             The ID of the rate plan charge that is associated with this invoice item upon object creation.


            **Character limit**: 32

            **Values**: inherited from `RatePlanCharge.Id` 
          type: string
        ChargeName:
          description: |2-
             The name of the invoice item's charge.
            **Character limi**t: 50

            **Values: **inherited from `RatePlanCharge.Name` 
          type: string
        ChargeNumber:
          description: |2-
             The unique identifier of the invoice item's charge.


            **Character limit:** 50

            **Values:** inherited from `RatePlanCharge.ChargeNumber` 
          type: string
        ChargeType:
          description: |2
             Specifies the type of charge.


            **Character limit**: 9

            **Values**: one of the following:

            - `OneTime`
            - `Recurring`
            - `Usage`
          type: string
        CreatedById:
          description: |2-
             The user ID of the person who created the invoice item.


            **Character limit**: 32

            **Values**: automatically generated 
          type: string
        CreatedDate:
          description: |2-
             The date the invoice item was created.


            **Character limit:** 29

            **Values**: automatically generated 
          format: date-time
          type: string
        InvoiceId:
          description: |2-
             The ID of the invoice that's associated with this invoice item.


            **Character limit**: 32

            **Values**: inherited from `Invoice.Id` 
          type: string
        ProcessingType:
          description: |2
             Identifies the kind of charge where 0 is a charge, 1 is a discount, 2 is a prepayment, and 3 is a tax. The returned value is text not decimal on data sources.


            **Character limit**:

            **Values: **

            - 0: charge
            - 1: discount
            - 2: prepayment
            - 3: tax
          format: double
          type: number
        ProductDescription:
          description: |2-
             A description of the product associated with this invoice item.


            **Character limit**: 500

            **Values**: inherited from `Product.Description` 
          type: string
        ProductId:
          description: |2-
             The ID of the product associated with this invoice item.


            **Character limit**: 32

            **Values**: inherited from `Product.Id` 
          type: string
        ProductName:
          description: |2-
             The name of the product associated with this invoice item.


            **Character limit**: 255

            **Values: **inherited from `Product.Name` 
          type: string
        ProductRatePlanChargeId:
          description: |2-
             The ID of the rate plan charge that's associated with this invoice item.


            **Character limit**: 32

            **Values**: inherited from `ProductRatePlanCharge.Id` You cannot query for this field. Only the subscribe preview and the amend preview calls will return the value of this field in the response.
          type: string
        Quantity:
          description: |2-
             The number of units for this invoice item.


            **Values**: inherited from `RatePlanCharge.Quantity` 
          format: double
          type: number
        RatePlanChargeId:
          description: |2-
             The ID of the rate plan charge that's associated with this invoice item.


            **Character limit**: 32

            **Values**: inherited from `RatePlanCharge.Id` 
          type: string
        RevRecCode:
          description: |2-
             Associates this invoice item with a specific revenue recognition code.


            **Character limit**: 32

            **Values**: inherited from `ProductRatePlanCharge.RevRecCode` 
          type: string
        RevRecStartDate:
          description: |2-
             The date when revenue recognition is triggered.


            **Character limit**: 29

            **Values**: generated from `InvoiceItem.RevRecTriggerCondition` 
          format: date
          type: string
        RevRecTriggerCondition:
          description: |2-
             Specifies when revenue recognition begins based on a triggering event.


            **Character limit**:

            **Values**: inherited from `ProductRatePlanCharge`.`RevRecTriggerCondition` 
          type: string
        SKU:
          description: |2-
             The unique SKU for the product associated with this invoice item.


            **Character limit**: 255

            **Values**: inherited from `Product.SKU` 
          type: string
        ServiceEndDate:
          description: |2-
             The end date of the service period associated with this invoice item. Service ends one second before the date in this value.


            **Character limit**: 29

            **Values**: automatically generated 
          format: date
          type: string
        ServiceStartDate:
          description: |2-
             The start date of the service period associated with this invoice item. If the associated charge is a one-time fee, then this date is the date of that charge.


            **Character limit:** 29

            **Values**: automatically generated 
          format: date
          type: string
        SubscriptionId:
          description: |2-
             The ID of the subscription associated with the invoice item.


            **Character limit**: 32

            **Values**: inherited from `Subscription.Id` 
          type: string
        SubscriptionNumber:
          description: |2-
             The number of the subscription associated with the invoice item.


            **Character limit**:

            **Values**: 
          type: string
        TaxAmount:
          description: |2-
             The amount of tax applied to the invoice item's charge.


            **Character limit**:

            **Values**: calculated from multiple fields in the ProductRatePlanCharge object 
          format: double
          type: number
        TaxCode:
          description: |2-
             Specifies the tax code for taxation rules.


            **Character limit**: 6

            **Values**: inherited from `ProductRatePlanCharge.TaxCode` 
          type: string
        TaxExemptAmount:
          description: |2-
             The amount of the invoice item's charge that's tax exempt.


            **Character limit**:

            **Values**: calculated from multiple fields in the ProductRatePlanCharge object 
          format: double
          type: number
        TaxMode:
          description: |2-
             The tax mode of the invoice item.


            **Character limit**: 12

            **Values**: `TaxExclusive`, `TaxInclusive` 
          type: string
        UOM:
          description: |2-
             Specifies the units to measure usage. Units of measure are configured in the web-based UI: **Z-Billing > Settings**

            **Character limit**:

            **Values**: inherited from `ProductRatePlanCharge.UOM` 
          type: string
        UnitPrice:
          description: |2-
             The per-unit price of the invoice item.


            **Character limit**:

            **Values**: calculated from multiple fields in ProductRatePlanCharge and ProductRatePlanChargeTier objets 
          format: double
          type: number
        UpdatedById:
          description: |2-
             The ID of the user who last updated the invoice item.


            **Character limit**: 32

            **Values**: automatically generated 
          type: string
        UpdatedDate:
          description: |2-
             The date when the invoice item was last updated.


            **Character limit**: 29

            **Values**: automatically generated 
          format: date-time
          type: string
      type: object
    ActionAmendSubscriptionProductFeature:
      properties:
        CreatedById:
          description: ""
          type: string
        CreatedDate:
          description: |2-
             Date and time when the product feature was added to the subscription.


            **Character limit**: 29

            **Values**: 
          format: date-time
          type: string
        Description:
          description: |2-
             Description of the subscription product feature.


            **Character limit**: 500

            **Values**: 
          type: string
        FeatureCode:
          description: |2-
             Unique code of the feature.


            **Character limit**: 255

            **Values**: 
          type: string
        FeatureId:
          description: |2-
             Internal Zuora ID of the feature.


            **Character limit**: 32

            **Values**: 
          type: string
        Name:
          description: |2-
             Name of the feature.


            **Character limit**: 255

            **Values**: 
          type: string
        RatePlanId:
          description: |2-
             Id of the product rate plan to which the feature belongs.


            **Character limit**: 32

            **Values**: 
          type: string
        UpdatedById:
          description: |2-
             Internal Zuora ID of the user who last updated the subscription product feature.


            **Character limit**: 32

            **Values**: 
          type: string
        UpdatedDate:
          description: |2-
             Date and time when the subscription product feature was last updated.


            **Character limit**: 29

            **Values**: 
          format: date-time
          type: string
      type: object
    ActionSubscribeCreditMemo:
      description: |
        Container for credit memos.

        **Note**: This field is only available if you have the Invoice Settlement feature enabled and set the `X-Zuora-WSDL-Version` request header to `107` or later.
      properties:
        TaxAmount:
          description: |
            Tax amount on the credit memo.
          format: double
          type: number
        TotalAmount:
          description: |
            Credit memo amount.
          format: double
          type: number
        TotalAmountWithoutTax:
          description: |
            Credit memo amount minus tax.
          format: double
          type: number
      title: CreditMemo
      type: object
    ActionSubscribeCreditMemoData:
      properties:
        CreditMemo:
          $ref: "#/components/schemas/ActionSubscribeCreditMemo"
        CreditMemoItem:
          description: ""
          items:
            $ref: "#/components/schemas/ActionSubscribeCreditMemoItem"
          type: array
      title: CreditMemoData
      type: object
    ActionSubscribeCreditMemoItem:
      properties:
        AmountWithoutTax:
          description: |
            The credit memo item amount excluding tax.
          format: double
          type: number
        ChargeName:
          description: |
            Name of this credit memo item.
          type: string
        Description:
          description: |
            Description of this credit memo item.
          type: string
        ProductRatePlanChargeId:
          description: |
            ID of the product rate plan charge associated with this credit memo item.
          type: string
        Quantity:
          description: |
            Quantity of the charge associated with this credit memo item.
          type: integer
        ServiceEndDate:
          description: |
            End date of the service period for this credit memo item, as yyyy-mm-dd.
          format: date
          type: string
        ServiceStartDate:
          description: |
            Service start date of this credit memo item, as yyyy-mm-dd.
          format: date
          type: string
        TaxAmount:
          description: |
            The tax amount of the credit memo item.
          format: double
          type: number
        UnitOfMeasure:
          description: |
            Unit used to measure consumption.
          type: string
      title: CreditMemoItem
      type: object
    ActionSubscribeInvoiceData:
      properties:
        Invoice:
          $ref: "#/components/schemas/InvoiceDataInvoice"
        InvoiceItem:
          description: ""
          items:
            $ref: "#/components/schemas/ActionSubscribeInvoiceItem"
          type: array
      type: object
    ActionSubscribeInvoiceItem:
      allOf:
        - properties:
            AccountingCode:
              description: |2-
                 The accounting code for the item's charge. Accounting codes group transactions that contain similar accounting attributes.


                **Character limit**: 100


                **Values**: inherited from `RatePlanCharge.AccountingCode` 
              type: string
            AppliedToChargeNumber:
              description: |2-
                 The charge number that the discount charge is applied to. This field is only for the invoice items that are discount charges. This field is only returned in subscription previews.
                This field will be returned in the response if you specify the charge number in the rate plan charges in the request.

                **Character limit**: 32

                **Values**: inherited from `RatePlanCharge.ChargeNumber` for the charge associated with the invoice item that the discount charge is applied to 
              type: string
            AppliedToInvoiceItemId:
              description: |2-
                 Associates a discount invoice item to a specific invoice item.

                **Character limit**: 32

                **Values**: inherited from the ID of the charge that a discount applies to 
              type: string
            ChargeAmount:
              description: |2-
                 The amount being charged for the invoice item. This amount doesn't include taxes regardless if the charge's tax mode is inclusive or exclusive.


                **Character limit**:


                **Values**: automatically calculated from multiple fields in multiple objects 
              format: double
              type: number
            ChargeDate:
              description: |2-
                 The date when the Invoice Item is created .


                **Character limit**: 29


                **Values**: automatically generated 
              format: date-time
              type: string
            ChargeDescription:
              description: |2-
                 A description of the invoice item's charge.


                **Character limit**: 500


                **Values**: inherited from `RatePlanCharge.Description` 
              type: string
            ChargeId:
              description: |2-
                 The ID of the rate plan charge that is associated with this invoice item upon object creation.


                **Character limit**: 32


                **Values**: inherited from `RatePlanCharge.Id` 
              type: string
            ChargeName:
              description: |2-
                 The name of the invoice item's charge.
                **Character limi**t: 50 **Values: **inherited from `RatePlanCharge.Name` 
              type: string
            ChargeNumber:
              description: |2-
                 The unique identifier of the invoice item's charge.
                **Character limit:** 50 **Values:** inherited from `RatePlanCharge.ChargeNumber` 
              type: string
            ChargeType:
              description: |2
                 Specifies the type of charge.


                **Character limit**: 9


                **Values**: one of the following:

                - `OneTime`
                - `Recurring`
                - `Usage`
              type: string
            CreatedById:
              description: |2-
                 The user ID of the person who created the invoice item.


                **Character limit**: 32


                **Values**: automatically generated 
              type: string
            CreatedDate:
              description: |2-
                 The date the invoice item was created.
                **Character limit:** 29


                **Values**: automatically generated 
              format: date-time
              type: string
            InvoiceId:
              description: |2-
                 The ID of the invoice that's associated with this invoice item.


                **Character limit**: 32


                **Values**: inherited from `Invoice.Id` 
              type: string
            ProcessingType:
              description: |2
                 Identifies the kind of charge where 0 is a charge, 1 is a discount, 2 is a prepayment, and 3 is a tax. The returned value is text not decimal on data sources.


                **Character limit**: **Values: **

                - 0: charge
                - 1: discount
                - 2: prepayment
                - 3: tax
              format: double
              type: number
            ProductDescription:
              description: |2-
                 A description of the product associated with this invoice item.


                **Character limit**: 500


                **Values**: inherited from `Product.Description` 
              type: string
            ProductId:
              description: |2-
                 The ID of the product associated with this invoice item.


                **Character limit**: 32


                **Values**: inherited from `Product.Id` 
              type: string
            ProductName:
              description: |2-
                 The name of the product associated with this invoice item.


                **Character limit**: 255 **Values: **inherited from `Product.Name` 
              type: string
            ProductRatePlanChargeId:
              description: |2-
                 The ID of the rate plan charge that's associated with this invoice item.


                **Character limit**: 32


                **Values**: inherited from `ProductRatePlanCharge.Id` You cannot `query
                ` for this field. Only the s`ubscribe
                ` preview and the `amend
                ` preview calls will return the value of this field in the response.
              type: string
            Quantity:
              description: |2-
                 The number of units for this invoice item.



                **Values**: inherited from `RatePlanCharge.Quantity` 
              format: double
              type: number
            RatePlanChargeId:
              description: |2-
                 The ID of the rate plan charge that's associated with this invoice item.


                **Character limit**: 32


                **Values**: inherited from `RatePlanCharge.Id` 
              type: string
            RevRecCode:
              description: |2-
                 Associates this invoice item with a specific revenue recognition code.


                **Character limit**: 32


                **Values**: inherited from `ProductRatePlanCharge.RevRecCode` 
              type: string
            RevRecStartDate:
              description: |2-
                 The date when revenue recognition is triggered.


                **Character limit**: 29


                **Values**: generated from `InvoiceItem.RevRecTriggerCondition` 
              format: date
              type: string
            RevRecTriggerCondition:
              description: |2-
                 Specifies when revenue recognition begins based on a triggering event.


                **Character limit**:


                **Values**: inherited from `ProductRatePlanCharge`.`RevRecTriggerCondition` 
              type: string
            SKU:
              description: |2-
                 The unique SKU for the product associated with this invoice item.


                **Character limit**: 255


                **Values**: inherited from `Product.SKU` 
              type: string
            ServiceEndDate:
              description: |2-
                 The end date of the service period associated with this invoice item. Service ends one second before the date in this value.


                **Character limit**: 29


                **Values**: automatically generated 
              format: date
              type: string
            ServiceStartDate:
              description: |2-
                 The start date of the service period associated with this invoice item. If the associated charge is a one-time fee, then this date is the date of that charge.
                **Character limit:** 29


                **Values**: automatically generated 
              format: date
              type: string
            SubscriptionId:
              description: |2-
                 The ID of the subscription associated with the invoice item.


                **Character limit**: 32


                **Values**: inherited from `Subscription.Id` 
              type: string
            SubscriptionNumber:
              description: |2-
                 The number of the subscription associated with the invoice item.


                **Character limit**:


                **Values**: 
              type: string
            TaxAmount:
              description: |2-
                 The amount of tax applied to the invoice item's charge.


                **Character limit**:


                **Values**: calculated from multiple fields in the ProductRatePlanCharge object 
              format: double
              type: number
            TaxCode:
              description: |2-
                 Specifies the tax code for taxation rules.


                **Character limit**: 6


                **Values**: inherited from `ProductRatePlanCharge.TaxCode` 
              type: string
            TaxExemptAmount:
              description: |2-
                 The amount of the invoice item's charge that's tax exempt.


                **Character limit**:


                **Values**: calculated from multiple fields in the ProductRatePlanCharge object 
              format: double
              type: number
            TaxMode:
              description: |2-
                 The tax mode of the invoice item.


                **Character limit**: 12


                **Values**: `TaxExclusive`, `TaxInclusive` 
              type: string
            UOM:
              description: |2-
                 Specifies the units to measure usage. Units of measure are configured in the web-based UI: **Z-Billing > Settings**

                **Character limit**:


                **Values**: inherited from `ProductRatePlanCharge.UOM` 
              type: string
            UnitPrice:
              description: |2-
                 The per-unit price of the invoice item.


                **Character limit**:


                **Values**: calculated from multiple fields in ProductRatePlanCharge and ProductRatePlanChargeTier objets 
              format: double
              type: number
            UpdatedById:
              description: |2-
                 The ID of the user who last updated the invoice item.


                **Character limit**: 32


                **Values**: automatically generated 
              type: string
            UpdatedDate:
              description: |2-
                 The date when the invoice item was last updated.


                **Character limit**: 29


                **Values**: automatically generated 
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/InvoiceItemObjectNSFields"
        - $ref: "#/components/schemas/InvoiceItemObjectCustomFields"
    ActionsErrorResponse:
      properties:
        Code:
          description: ""
          type: string
        Message:
          description: ""
          type: string
      type: object
    AmendRequest:
      properties:
        AmendOptions:
          description: |
            Use the `AmendOptions` container to specify billing options, such as invoice generation and when to process payments.
          properties:
            ApplicationOrder:
              description: |
                The priority order to apply credit memos and/or unapplied payments to an invoice. Possible item values are: `CreditMemo`, `UnappliedPayment`.

                **Note:**
                  - This field is only available if you have the Invoice Settlement feature enabled and set the `X-Zuora-WSDL-Version` request header to `107` or later.
                  - This field is valid only if the `applyCredit` field is set to `true`.
                  - If no value is specified for this field, the default priority order is used, ["CreditMemo", "UnappliedPayment"], to apply credit memos first and then apply unapplied payments.
                  - If only one item is specified, only the items of the spedified type are applied to invoices. For example, if the value is `["CreditMemo"]`, only credit memos are used to apply to invoices.
              items:
                type: string
              type: array
            ApplyCredit:
              description: |
                Whether to automatically apply credit memos or unapplied payments, or both to an invoice.

                If the value is `true`, the credit memo or unapplied payment, or both will be automatically applied to the invoice. If no value is specified or the value is `false`, no action is taken.

                **Note**: This field is only available if you have the Invoice Settlement feature enabled and set the `X-Zuora-WSDL-Version` request header to `107` or later.
              type: boolean
            ApplyCreditBalance:
              description: ""
              type: boolean
            ElectronicPaymentOptions:
              $ref: "#/components/schemas/ElectronicPaymentOptions"
            ExternalPaymentOptions:
              $ref: "#/components/schemas/ExternalPaymentOptions"
            GenerateInvoice:
              description: |
                Determines whether to generate an invoice to immediately bill the customer for a new product or changes of Terms And Conditions. As a best practice, set this value to true to prevent any errors that might occur if the account has a balance.

                **Note:** 
                * Even if you do not include this field in the amend action, Zuora still parses this field with the default value - `true`, when processing the amend action. If you do not want to generate the invoice after creating the New Product or Term And Condition amendment, set the value of this field to `false` in the request.
                * If `EnablePreviewMode=true` is specified in the PreviewOptions container, then preview mode will be enabled and an invoice will not be generated, regardless of whether `GenerateInvoice` is specified as `true` or `false`.
              type: boolean
            InvoiceProcessingOptions:
              $ref: "#/components/schemas/InvoiceProcessingOptions"
            ProcessPayments:
              description: |
                Determines whether to collect payment against the invoice generated by the amend() call. 

                **Note:** 
                * Even if you do not include this field in the amend action, Zuora still parses this field with the default value, true, when processing the amend action. If you do not want to collect payment against the generated invoice after creating the New Product or Term And Condition amendment, set the value of this field to `false` in the request. 
                * If you have the [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) feature enabled, Zuora does not support using this field to collect payments against invoices.

                If a temporary error that Zuora cannot create or submit a payment to the gateway is seen, Zuora will automatically retry the action to collect the payment.

                You can contact [Zuora Global Support](https://support.zuora.com/) to set the maximum number of retries that Zuora can perform. The number can range from 0 to 2 with a default value of 0. However, retrying the request can make the API call take longer than expected. Zuora does not guarantee the retry could be completed within the timeout limit. 

                **Note**: The retry mechanism does not support the preview mode of the amend() call.
              type: boolean
          type: object
        Amendments:
          description: |
            The `Amendment` object holds the changes that you want to make to the Subscription specified by the `SubscriptionId`, 
            including its `RatePlan`, `RatePlanCharge`, and `RatePlanChargeTier`.
          items:
            $ref: "#/components/schemas/Amendment"
          type: array
        PreviewOptions:
          description: |
            Use the `PreviewOptions` container to preview an amendment before committing its changes to a subscription. 
            You can use a preview to provide a quote of the new charges to a customer before the customer commits to the amended subscription. 
            For example, make an Amend call with an Amendment object that removes an existing rate plan, 
            another Amendment object that adds a new rate plan, and turn on the preview options.
          properties:
            EnablePreviewMode:
              description: " Determines whether to create an amendment or display a preview of the change."
              type: boolean
            IncludeExistingDraftInvoiceItems:
              description: " Specifies whether to include draft invoice items in amendment previews."
              type: boolean
            NumberOfPeriods:
              description: " Indicates the number of invoice periods to show in a preview."
              format: int32
              type: integer
            PreviewThroughTermEnd:
              description: " Request to preview the charge through the end of the subscription term."
              type: boolean
            PreviewType:
              description: " The type of preview you will receive from a preview request."
              type: string
          type: object
      required:
        - Amendments
      type: object
    AmendResult:
      properties:
        AmendmentIds:
          description: |
            A list of the IDs of the associated amendments. There can be as many as three amendment IDs. Use a comma to separate each amendment ID.
          items:
            type: string
          type: array
        ChargeMetricsData:
          $ref: "#/components/schemas/ChargeMetricsData"
        CreditMemoDatas:
          description: ""
          items:
            $ref: "#/components/schemas/ActionAmendCreditMemoData"
          type: array
        CreditMemoId:
          description: ""
          type: string
        Errors:
          description: ""
          items:
            $ref: "#/components/schemas/ActionsErrorResponse"
          type: array
        GatewayResponse:
          description: ""
          type: string
        GatewayResponseCode:
          description: ""
          type: string
        InvoiceDatas:
          description: |
            This array of invoices contains one invoice only as one invoice is generated for one subscription.
          items:
            $ref: "#/components/schemas/ActionAmendInvoiceData"
          type: array
        InvoiceId:
          description: ""
          type: string
        PaymentId:
          description: ""
          type: string
        PaymentTransactionNumber:
          description: ""
          type: string
        SubscriptionId:
          description: ""
          type: string
        Success:
          description: ""
          type: boolean
        TotalDeltaMrr:
          description: ""
          format: double
          type: number
        TotalDeltaTcv:
          description: ""
          format: double
          type: number
      type: object
    Amendment:
      properties:
        AutoRenew:
          description: |2-
             Determines whether the subscription is automatically renewed, or whether it expires at the end of the term and needs to be manually renewed. For amendment of type `TermsAndConditions`, this field is only required if you change the automatic renewal status of a subscription.


            **Values**: true, false 
          type: boolean
        Code:
          description: |2
             A unique alphanumeric string that identifies the amendment.


            **Character limit**: 50

            **Values**: automatically generated
          type: string
        ContractEffectiveDate:
          description: |2
             The date when the amendment's changes become effective for billing purposes.
          format: date
          type: string
        CreatedById:
          description: |2-
             The user ID of the person who created the amendment.


            **Character limit**: 32

            **Values**: automatically generated 
          type: string
        CreatedDate:
          description: |2-
             The date when the amendment was created.


            **Values**: automatically generated 
          format: date-time
          type: string
        CurrentTerm:
          description: |2-
             The length of the period for the current subscription term. This field can be updated when Status is `Draft`.

            This field is only required if the `Type` field is set to `TermsAndConditions` and `TermType` is set to `TERMED`. This field is not required if `TermType` is set to `EVERGREEN`.


            **Values**: a valid number 
          format: int64
          type: integer
        CurrentTermPeriodType:
          description: |2
             The period type for the current subscription term. This field is only required if the `Type` field is set to `TermsAndConditions` and `TermType` is set to `TERMED`. This field is not required if `TermType` is set to `EVERGREEN`.

            **Values**:

            - `Month` (default)
            - `Year`
            - `Day`
            - `Week`


            **Note**:

            - This field can be updated when Status is `Draft`.
            - This field is used with the CurrentTerm field to specify the current subscription term.
          type: string
        CustomerAcceptanceDate:
          description: |
            The date when the customer accepts the amendment's changes to the subscription.

            This field is only required if [Zuora is configured to require customer acceptance in Z-Billing](https://knowledgecenter.zuora.com/CB_Billing/W_Billing_and_Payments_Settings/Define_Default_Subscription_Settings) and the subscription is currently in the Pending Acceptance status (the value of the `Status` field is currently `PendingAcceptance`).

            Use this field together with the `Status` field. When you set a date in this field as a customer acceptance date, you should also set the `Status` field as `Completed`.
          format: date
          type: string
        Description:
          description: |2-
             A description of the amendment.


            **Character limit**: 500

            **Values**: maximum 500 characters 
          type: string
        DestinationAccountId:
          description: |2-
             The ID of the subscription owner that the subscription is being transferred to.


            **Character limit**: 32

            **Values**: a valid account ID 
          type: string
        DestinationInvoiceOwnerId:
          description: |2-
             The ID of the invoice owner that the subscription is being transferred to.


            **Character limit**: 32

            **Values**: a valid invoice ID 
          type: string
        EffectiveDate:
          description: |2+
             The date when the amendment's changes take effective. This field validates that the amendment's changes are within valid ranges of products and product rate plans.
            This field is only required if the `Type` field is set to `Cancellation`.

          format: date
          type: string
        Name:
          description: |2-
             The name of the amendment.


            **Character limit**: 100

            **Values**: a string of 100 characters or fewer 
          type: string
        RatePlanData:
          description: |
            A container for one `RatePlanData`. This field is only required if the `Type` field is set to `NewProduct`, `RemoveProduct`, or `UpdateProduct`.
          properties:
            RatePlan:
              $ref: "#/components/schemas/RatePlan"
            RatePlanChargeData:
              description: ""
              items:
                $ref: "#/components/schemas/RatePlanChargeDataInRatePlanData"
              type: array
            SubscriptionProductFeatureList:
              $ref: "#/components/schemas/SubscriptionProductFeatureList"
          required:
            - RatePlan
          type: object
        RenewalSetting:
          description: |2-
             Specifies whether a termed subscription will remain termed or change to evergreen when it is renewed.

            This field is only required if the `TermType` field is set to `Termed`.


            **Values**: RENEW_WITH_SPECIFIC_TERM (default), RENEW_TO_EVERGREEN 
          type: string
        RenewalTerm:
          description: |2-
             The term of renewal for the amended subscription. This field can be updated when Status is `Draft`.
            This field is only required if the `Type` field is set to `TermsAndConditions`.


            **Values:** a valid number 
          format: int64
          type: integer
        RenewalTermPeriodType:
          description: |2
             The period type for the subscription renewal term. This field can be updated when Status is `Draft`.
            **Required**: Only if the value of the Type field is set to `TermsAndConditions`. This field is used with the RenewalTerm field to specify the subscription renewal term.


            **Values**:

            - `Month` (default)
            - `Year`
            - `Day`
            - `Week`
          type: string
        ResumeDate:
          description: |
            The date when the subscription resumption takes effect. See [Resume Date](https://knowledgecenter.zuora.com/BC_Subscription_Management/Subscriptions/Resume_a_Subscription#Resume_Date) for more information.

            This field is only required if you resume a suspended subscription.
          format: date
          type: string
        ServiceActivationDate:
          description: |
            The date when service is activated.

            This field is only required if [Zuora is configured to require service activation in Z-Billing](https://knowledgecenter.zuora.com/CB_Billing/W_Billing_and_Payments_Settings/Define_Default_Subscription_Settings) and the subscription is currently in the Pending Activation status (the value of the `Status` field is currently `PendingActivation`).

            Use this field together with the `Status` field. When you set a date in this field as a service activation date, you should also set the `Status` field as the expected next phase status: `Completed` or `PendingAcceptance`.
          format: date
          type: string
        SpecificUpdateDate:
          description: |
            The date when the UpdateProduct amendment takes effect. This field is only applicable if there is already a future-dated UpdateProduct amendment on the subscription.


            For the UpdateProduct amendments, this field is only required if there is already a future-dated UpdateProduct amendment on the subscription.
          format: date
          type: string
        Status:
          description: |2
             The status of the amendment. Type: string (enum)



            **Values**: one of the following:

            - Draft (default, if left null)
            - Pending Activation
            - Pending Acceptance
            - Completed
          type: string
        SubscriptionId:
          description: |2-
             The ID of the subscription that the amendment changes.


            **Character limit**: 32

            **Values**: a valid subscription ID 
          type: string
        SuspendDate:
          description: |
            The date when the subscription suspension takes effect. See [Suspend Date](https://knowledgecenter.zuora.com/BC_Subscription_Management/Subscriptions/Suspend_a_Subscription#Suspend_Date) for more information.

            This field is only required if you suspend an active subscription.
          format: date
          type: string
        TermStartDate:
          description: |2
             The date when the new terms and conditions take effect.
            This field is only required if the `Type` field is set to `TermsAndConditions`.
          format: date
          type: string
        TermType:
          description: |2-
             Indicates if the subscription isTERMED or EVERGREEN.

            - A TERMED subscription has an expiration date, and must be manually renewed.
            - An EVERGREEN subscription doesn't have an expiration date, and must be manually ended.

            When as part of an amendment of type `TermsAndConditions`, this field is required to change the term type of a subscription.


            **Character limit**: 9

            **Values**: TERMED, EVERGREEN 
          type: string
        Type:
          description: |2
             The type of amendment.


            **Character limit**: 18



            **Values**: one of the following:

            - Cancellation
            - NewProduct
            - OwnerTransfer (If this value is chosen, the `ContractEffectiveDate`, `ServiceActivationDate`, and `CustomerAcceptanceDate` fields will all be automatically set to today's date, and any values passed from the API are ignored.)
            - RemoveProduct
            - Renewal
            - UpdateProduct
            - TermsAndConditions
            - SuspendSubscription
            - ResumeSubscription
          type: string
        UpdatedById:
          description: |2-
             The ID of the user who last updated the amendment.


            **Character limit**: 32

            **Values**: automatically generated 
          type: string
        UpdatedDate:
          description: |2-
             The date when the amendment was last updated.


            **Values**: automatically generated 
          format: date-time
          type: string
      required:
        - SubscriptionId
        - Type
        - ContractEffectiveDate
        - Name
      type: object
    AmendmentObjectCustomFields:
      additionalProperties:
        description: |
          Custom fields of the Amendment object. The name of each custom field has the form <code>*customField*__c</code>. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
      description: |
        Container for custom fields of an Amendment object.
      title: amendmentFieldsCustom
      type: object
    AmendmentRatePlanChargeData:
      properties:
        RatePlanCharge:
          $ref: "#/components/schemas/AmendmentRatePlanChargeDataRatePlanCharge"
        RatePlanChargeTier:
          description: ""
          items:
            $ref: "#/components/schemas/AmendmentRatePlanChargeTier"
          type: array
      required:
        - RatePlanCharge
      type: object
    AmendmentRatePlanChargeDataRatePlanCharge:
      allOf:
        - properties:
            BillCycleType:
              description: |2-
                 Specifies how to determine the billing day for the charge.


                **Character limit**: 20


                **Values**: inherited from `ProductRatePlanCharge.BillCycleType` **Note:** You can override the value inherited from the Product Rate Plan Charge, but only when creating a new subscription or a New Product amendment. 
              type: string
            BillingPeriod:
              description: |2-
                 Allows billing period to be overridden on rate plan charge.



                **Values**: inherited from `ProductRatePlanCharge.BillingPeriod` **Note:** You can override the value inherited from the Product Rate Plan Charge, but only when creating a new subscription or a New Product amendment. 
              type: string
            BillingTiming:
              description: |2+
                 The billing timing for the charge. You can choose to bill in advance or in arrears for recurring charge types. This field is not used in one-time or usage based charge types.


                **Character limit**:


                **Values**: one of the following:

                - I`n Advance`
                - `In Arrears`
                **Note:** You can override the value inherited from the Product Rate Plan Charge when a subscription has a recurring charge type.
                This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).

              type: string
            ChargeNumber:
              description: |2
                 A unique number that identifies the charge. This number is returned as a string.


                **Character limit**: 50


                **Values**: one of the following:

                - automatically generated if left null
                - a unique number of 50 characters or fewer
              type: string
            DiscountAmount:
              description: |2-
                 Specifies the amount of a fixed-amount discount. You can provide a value for this field if the `ChargeModel` field value is `Discount-Fixed Amount`. If this field is included in a query, the query will filter out the rate plans whose `ChargeModel` field is not of a Discount type. You cannot query this field with the following fields in a single query:

                - Price
                - IncludedUnits
                - DiscountPercentage
                - OveragePrice


                **Character limit**: 16


                **Values**: a valid currency amount 
              format: decimal
              type: string
            DiscountPercentage:
              description: " Query Filter "
              format: decimal
              type: string
            EndDateCondition:
              description: |2-
                 Defines when the charge ends after the charge trigger date. This field can be updated when **Status** is `Draft`.



                **Values**: one of the following:

                - `SubscriptionEnd`: The charge ends on the subscription end date after the charge trigger date. This is the default value.
                - `FixedPeriod`: The charge ends after a specified period based on the trigger date of the charge. If you set this field to `FixedPeriod`, you must specify the length of the period and a period type by defining the `UpToPeriods` and `UpToPeriodsType` fields.
                - `SpecificEndDate`: The specific date on which the charge ends. If you set this field to `SpecificEndDate`, you must specify the specific date by defining the `SpecificEndDate` field.



                **Note**: If the subscription ends before the charge end date, the charge ends when the subscription ends. But if the subscription end date is subsequently changed through a Renewal, or Terms and Conditions amendment, the charge will end on the charge end date. 
              type: string
            ListPriceBase:
              description: |
                The list price base for the product rate plan charge.


                **Values**: one of the following:

                - `Per Month`
                - `Per Billing Period`
                - `Per Week`
              type: string
            Price:
              description: " Query Filter "
              format: decimal
              type: string
            PriceChangeOption:
              description: |2
                 Applies an automatic price change when a termed subscription is renewed.


                **Character limit**:


                **Values**: one of the following:

                - `NoChange` (default)
                - `SpecificPercentageValue`
                - `UseLatestProductCatalogPricing`
              type: string
            PriceIncreasePercentage:
              description: |2-
                 Specifies the percentage to increase or decrease the price of renewed subscriptions. Use this field if the `ProductRatePlanCharge`.`PriceChangeOption` value is set to `SpecificPercentageValue`.


                **Character limit**: 16


                **Values**: a decimal value between -100 and 100 
              format: decimal
              type: string
            ProductRatePlanChargeId:
              description: ""
              type: string
            Quantity:
              description: |2-
                 The default quantity of units, such as the number of authors in a hosted wiki service. Valid for all charge models except for Flat Fee pricing. This field is only rquired if the charge model is tiered pricing or volume pricing.


                **Character limit**: 16


                **Values**: a valid quantity value 
              format: double
              type: number
            RatingGroup:
              description: |
                Specifies a rating group based on which usage records are rated. 

                Values:

                * `ByBillingPeriod` (default): The rating is based on all the usages in a billing period.       
                * `ByUsageStartDate`: The rating is based on all the usages on the same usage start date. 
                * `ByUsageRecord`: The rating is based on each usage record.
                * `ByUsageUpload`: The rating is based on all the usages in a uploaded usage file (.xls or .csv).

                **Note:**

                The `ByBillingPeriod` value can be applied for all charge models.
                The `ByUsageStartDate`, `ByUsageRecord`, and `ByUsageUpload` values can only be applied for per unit, volume pricing, and tiered pricing charge models.
                Use this field only for Usage charges. One-Time Charges and Recurring Charges return `NULL`.
              type: string
            RevRecCode:
              description: |2-
                 Associates this product rate plan charge with a specific revenue recognition code.


                **Character limit**: 70


                **Values**: a valid revenue recognition code 
              type: string
            RevRecTriggerCondition:
              description: |2+
                 Specifies when revenue recognition begins.


                **Character limit**: 22


                **Values**: one of the following:

                -  `ContractEffectiveDate`

                -  `ServiceActivationDate`

                -  `CustomerAcceptanceDate`

              type: string
            RevenueRecognitionRuleName:
              description: |2-
                 Specifies the Revenue Recognition Rule that you want the Rate Plan Charge to use. This field can be updated when **Status** is `Draft`. By default, the Revenue Recognition Rule is inherited from the Product Rate Plan Charge. For Amend
                calls, you can use this field only for NewProduct amendments. For Update
                calls, you can use this field only to update subscriptions in draft status. Note that if you use this field to specify a Revenue Recognition Rule for the Rate Plan Charge, the rule will remain as specified even if you later change the rule used by the corresponding Product Rate Plan Charge. See [Z-Billing User Role](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/A_Administrator_Settings/User_Roles/d_Billing_Roles) permission enabled to use this field.



                **Character limit**: n/a


                **Values**: name of an active Revenue Recognition Rule 
              type: string
            SpecificBillingPeriod:
              description: |2-
                 Customizes the number of months or weeks for the charges billing period. This field is only required if you set the value of the `BillingPeriod` field to `Specific Months` or `Specific Weeks`.


                **Character limit**: 5


                **Values**: inherited from `ProductRatePlanCharge.BillingPeriod` **Note:** You can override the value inherited from the Product Rate Plan Charge, but only when creating a new subscription or a New Product amendment. 
              format: int64
              type: integer
            SpecificEndDate:
              description: |2
                 The specific date on which the charge ends, in `yyyy-mm-dd` format.


                **Character limit**: 29



                **Note**:

                - This field is only applicable when the `EndDateCondition` field is set to `SpecificEndDate`.
                - If the subscription ends before the specific end date, the charge ends when the subscription ends. But if the subscription end date is subsequently changed through a Renewal, or Terms and Conditions amendment, the charge will end on the specific end date.
              format: date
              type: string
            TriggerDate:
              description: |2+
                 The date when the charge becomes effective and billing begins, in `yyyy-mm-dd` format. This field is only required if the `TriggerEvent` field is set to `SpecificDate`.


                **Character limit**: 29

              format: date
              type: string
            TriggerEvent:
              description: |2
                 Specifies when to start billing the customer for the charge.
                **Note: **This field can be passed through the subscribe
                and amend
                calls and will override the default value set on the Product Rate Plan Charge.


                **Character limit**: 18


                **Values**: inherited from `ProductRatePlanCharge.TriggerEvent` and can be one of the following values:

                - `ContractEffective `is the date when the subscription's contract goes into effect and the charge is ready to be billed.
                - `ServiceActivationDate `is when the services or products for a subscription have been activated and the customers have access.
                - `CustomerAcceptance `is when the customer accepts the services or products for a subscription.
                - SpecificDate is valid only on the RatePlanCharge.
              type: string
            UpToPeriods:
              description: |2
                 Specifies the length of the period during which the charge is active. If this period ends before the subscription ends, the charge ends when this period ends.


                **Character limit**: 5


                **Values**: inherited from `ProductRatePlanCharge.UpToPeriods`

                **Note**:

                - You must use this field together with the `UpToPeriodsType` field to specify the time period. This field is only applicable only when the `EndDateCondition` field is set to `FixedPeriod`.
                - You can override the value inherited from the Product Rate Plan Charge, but only when creating a new subscription or a New Product amendment.
                - Use this field to override the value in `ProductRatePlanCharge.UpToPeriod`.
                - If you override the value in this field, enter a whole number between 0 and 65535, exclusive.
                - If the subscription end date is subsequently changed through a Renewal, or Terms and Conditions amendment, the charge end date will change accordingly up to the original period end.
              format: int64
              type: integer
            UpToPeriodsType:
              description: |2
                 The period type used to define when the charge ends. This field can be updated when **Status** is `Draft`.


                **Values**: one of the following:

                - `Billing Periods` (default)
                - `Days`
                - `Weeks`
                - `Months`
                - `Years`


                **Note**:

                - You must use this field together with the `UpToPeriods` field to specify the time period.
                - This field is only applicable only when the `EndDateCondition` field is set to `FixedPeriod`.
              type: string
            WeeklyBillCycleDay:
              description: |2
                 Specifies which day of the week as the bill cycle day (BCD) for the charge.
                This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).




                **Values**: one of the following:

                - `Sunday`
                - `Monday`
                - `Tuesday`
                - `Wednesday`
                - `Thursday`
                - `Friday`
                - `Saturday`
              type: string
          required:
            - ProductRatePlanChargeId
          type: object
        - $ref: "#/components/schemas/RatePlanChargeObjectCustomFields"
      title: RatePlanCharge
    AmendmentRatePlanChargeTier:
      properties:
        PriceFormat:
          description: |2-
             Indicates if the price is a flat fee or is per unit.


            **Character limit**: 8


            **Values**: `Flat Fee`, `Per Unit` 
          type: string
        RatePlanChargeId:
          description: |2-
             The ID of the subscription or amendment rate plan charge associated with this tier. You can't create an unassociated tier.


            **Character limit**: 32


            **Values**: inherited from `RatePlanCharge`.`Id` 
          type: string
      required:
        - RatePlanChargeId
      type: object
    ApplyCreditMemoType:
      example:
        effectiveDate: 2017-03-02
        invoices:
          - amount: 1
            invoiceId: 4028905f5a87c0ff015a87d3f8f10043
            items:
              - amount: 0.9
                creditMemoItemId: 4028905f5a890526015a8d73f74b0016
                invoiceItemId: 4028905f5a87c0ff015a87d3f90c0045
              - amount: 0.1
                creditTaxItemId: 4028905f5a890526015a8d73f90c0018
                taxItemId: 4028905f5a87c0ff015a87d3f884003f
      properties:
        debitMemos:
          description: |
            Container for debit memos that the credit memo is applied to. The maximum number of debit memos is 1,000.
          items:
            $ref: "#/components/schemas/CreditMemoApplyDebitMemoRequestType"
          type: array
        effectiveDate:
          description: |
            The date when the credit memo is applied.
          format: date
          type: string
        invoices:
          description: |
            Container for invoices that the credit memo is applied to. The maximum number of invoices is 1,000.
          items:
            $ref: "#/components/schemas/CreditMemoApplyInvoiceRequestType"
          type: array
      type: object
    ApplyPaymentType:
      example:
        debitMemos:
          - amount: 1.02
            debitMemoId: 4028905f5a87c0ff015a87e49e6b0062
            items:
              - amount: 1
                debitMemoItemId: 4028905f5a87c0ff015a87e49e7a0063
              - amount: 0.02
                taxItemId: 4028905f5a87c0ff015a87e49f5e0065
        effectiveDate: 2017-03-01
        invoices:
          - amount: 10.1
            invoiceId: 4028905f5a87c0ff015a87d3f8f10043
            items:
              - amount: 10
                invoiceItemId: 4028905f5a87c0ff015a87d3f90c0045
              - amount: 0.1
                taxItemId: 4028905f5a87c0ff015a87d3f884003f
      properties:
        debitMemos:
          description: |
            Container for debit memos. The maximum number of debit memos is 1,000.
          items:
            $ref: "#/components/schemas/PaymentDebitMemoApplicationApplyRequestType"
          type: array
        effectiveDate:
          description: |
            The date when the payment application takes effect, in `yyyy-mm-dd` format.
          format: date
          type: string
        invoices:
          description: |
            Container for invoices. The maximum number of invoices is 1,000.
          items:
            $ref: "#/components/schemas/PaymentInvoiceApplicationApplyRequestType"
          type: array
      type: object
    BadRequestResponse:
      properties:
        Errors:
          items:
            properties:
              code:
                description: The error code.
                type: string
              status:
                description: The status of the response.
                type: string
              title:
                description: The reason for the error.
                type: string
            type: object
          type: array
      type: object
    BatchDebitMemoType:
      properties:
        dueDate:
          description: |
            The date by which the payment for the debit memo is due, in `yyyy-mm-dd` format.
          format: date
          type: string
        id:
          description: |
            The ID of the debit memo to be updated.
          type: string
      title: debitMemos
      type: object
    BatchInvoiceType:
      allOf:
        - properties:
            autoPay:
              description: |
                Whether invoices are automatically picked up for processing in the corresponding payment run.

                By default, invoices are automatically picked up for processing in the corresponding payment run.
              type: boolean
            comments:
              description: |
                Additional information related to the invoice that a Zuora user added to the invoice.
              maxLength: 255
              type: string
            dueDate:
              description: |
                The date by which the payment for this invoice is due.
              format: date
              type: string
            id:
              description: |
                The ID of the invoice to be updated.
              type: string
            invoiceDate:
              description: |
                The new invoice date of the invoice. The new invoice date cannot fall in a closed accounting period.

                You can only specify `invoiceDate` or `dueDate` in one request. Otherwise, an error occurs.
              format: date
              type: string
            invoiceItems:
              description: |
                Container for invoice items. The maximum number of items is 1,000.

                **Note:** Invoice items can only be updated if you have Unified Invoicing is enabled and the invoice is a standalone invoice.
              items:
                $ref: "#/components/schemas/PutInvoiceItemType"
              type: array
            transferredToAccounting:
              description: |
                Whether the invoice was transferred to an external accounting system.
              enum:
                - Processing
                - Yes
                - Error
                - Ignore
              type: string
          type: object
        - $ref: "#/components/schemas/InvoiceObjectNSFields"
        - $ref: "#/components/schemas/InvoiceObjectCustomFields"
      title: invoices
    BillToContact:
      allOf:
        - description: |
            Contact details associated with an account.
          properties:
            address1:
              description: |
                First line of the contact's address. This is often a street address or a business name.
              maxLength: 255
              type: string
            address2:
              description: |
                Second line of the contact's address.
              maxLength: 255
              type: string
            city:
              description: |
                City of the contact's address.
              maxLength: 40
              type: string
            country:
              description: |
                Country; must be a valid country name or abbreviation. If using Zuora Tax, you must specify a country in the bill-to contact to calculate tax.
              maxLength: 64
              type: string
            county:
              description: |
                County of the contact's address.
              maxLength: 32
              type: string
            fax:
              description: |
                Fax number of the contact.
              maxLength: 40
              type: string
            firstName:
              description: |
                First name of the contact.
              maxLength: 100
              type: string
            homePhone:
              description: |
                Home phone number of the contact.
              maxLength: 40
              type: string
            lastName:
              description: |
                Last name of the contact.
              maxLength: 100
              type: string
            mobilePhone:
              description: |
                Mobile phone number of the contact.
              maxLength: 40
              type: string
            nickname:
              description: |
                Nickname of the contact.
              maxLength: 100
              type: string
            otherPhone:
              description: |
                Additional phone number of the contact. Use the `otherPhoneType` field to specify the type of phone number.
              maxLength: 40
              type: string
            otherPhoneType:
              description: |
                Specifies the type of phone number in the `otherPhone` field.
              enum:
                - Work
                - Mobile
                - Home
                - Other
              type: string
            personalEmail:
              description: |
                Personal email address of the contact.
              format: email
              maxLength: 80
              type: string
            postalCode:
              description: |
                ZIP code or other postal code of the contact's address.
              maxLength: 20
              type: string
            state:
              description: |
                State or province of the contact's address.
              maxLength: 40
              type: string
            taxRegion:
              description: |
                Region defined in your taxation rules. Only applicable if you use Zuora Tax.
              maxLength: 32
              type: string
            workEmail:
              description: |
                Business email address of the contact.
              format: email
              maxLength: 80
              type: string
            workPhone:
              description: |
                Business phone number of the contact.
              maxLength: 40
              type: string
          required:
            - firstName
            - lastName
          type: object
        - $ref: "#/components/schemas/ContactObjectCustomFields"
    BillToContactPostOrder:
      allOf:
        - description: |
            Contact details associated with an account.
          properties:
            address1:
              description: |
                First line of the contact's address. This is often a street address or a business name.
              maxLength: 255
              type: string
            address2:
              description: |
                Second line of the contact's address.
              maxLength: 255
              type: string
            city:
              description: |
                City of the contact's address.
              maxLength: 40
              type: string
            contactDescription:
              description: |
                A description for the contact.
              maxLength: 100
              type: string
            country:
              description: |
                Country; must be a valid country name or abbreviation. If using Zuora Tax, you must specify a country in the bill-to contact to calculate tax.
              maxLength: 64
              type: string
            county:
              description: |
                County of the contact's address.
              maxLength: 32
              type: string
            fax:
              description: |
                Fax number of the contact.
              maxLength: 40
              type: string
            firstName:
              description: |
                First name of the contact.
              maxLength: 100
              type: string
            homePhone:
              description: |
                Home phone number of the contact.
              maxLength: 40
              type: string
            lastName:
              description: |
                Last name of the contact.
              maxLength: 100
              type: string
            mobilePhone:
              description: |
                Mobile phone number of the contact.
              maxLength: 40
              type: string
            nickname:
              description: |
                Nickname of the contact.
              maxLength: 100
              type: string
            otherPhone:
              description: |
                Additional phone number of the contact. Use the `otherPhoneType` field to specify the type of phone number.
              maxLength: 40
              type: string
            otherPhoneType:
              description: |
                Specifies the type of phone number in the `otherPhone` field.
              enum:
                - Work
                - Mobile
                - Home
                - Other
              type: string
            personalEmail:
              description: |
                Personal email address of the contact.
              format: email
              maxLength: 80
              type: string
            postalCode:
              description: |
                ZIP code or other postal code of the contact's address.
              maxLength: 20
              type: string
            state:
              description: |
                State or province of the contact's address.
              maxLength: 40
              type: string
            taxRegion:
              description: |
                Region defined in your taxation rules. Only applicable if you use Zuora Tax.
              maxLength: 32
              type: string
            workEmail:
              description: |
                Business email address of the contact.
              format: email
              maxLength: 80
              type: string
            workPhone:
              description: |
                Business phone number of the contact.
              maxLength: 40
              type: string
          required:
            - firstName
            - lastName
          type: object
        - $ref: "#/components/schemas/ContactObjectCustomFields"
    BillingDocumentQueryResponseElementType:
      properties:
        documents:
          description: |
            Container for billing documents.
          items:
            $ref: "#/components/schemas/GETBillingDocumentsResponseType"
          type: array
        nextPage:
          description: |
            URL to retrieve the next page of the response if it exists; otherwise absent.
          format: URL
          type: string
        success:
          description: Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    BillingOptions:
      properties:
        documentDate:
          description: The invoice date displayed on the invoice.
          format: date
          type: string
        targetDate:
          description: Date through which to calculate charges if an invoice is generated. See [What is a Target Date?](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/J_Billing_Operations/G_Bill_Runs/Creating_Bill_Runs#What_is_a_Target_Date.3F).
          format: date
          type: string
      type: object
    BillingPreviewResult:
      properties:
        accountId:
          description: |
            ID of the customer account to which the billing preview applies.
          type: string
        creditMemoItems:
          description: |
            An array of credit memo items returned as the result of the billing preivew request.

            **Note:** The credit memo items are only available if you have Invoice Settlement feature enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
          items:
            $ref: "#/components/schemas/POSTBillingPreviewCreditMemoItem"
          type: array
        invoiceItems:
          description: |
            An array of invoice items returned as the result of the billing preview request.
          items:
            $ref: "#/components/schemas/POSTBillingPreviewInvoiceItem"
          type: array
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    BillingUpdate:
      properties:
        billingPeriodAlignment:
          enum:
            - AlignToCharge
            - AlignToSubscriptionStart
            - AlignToTermStart
          type: string
      type: object
    BodyInSettingValueReponse:
      additionalProperties: true
      description: Response body if the request is executed successfully.
      title: settingsResponseBody
      type: object
    BodyInSettingValueRequest:
      additionalProperties: true
      description: Request payload if any
      title: settingsRequestBody
      type: object
    CalloutAuth:
      description: If requiredAuth is true, this object is required.
      properties:
        domain:
          description: The domain of the callout auth.
          type: string
        password:
          description: The field is required when requiredAuth is true.
          type: string
        preemptive:
          description: Set this field to `true` if you want to enable the preemptive authentication.
          type: boolean
        username:
          description: The field is required when requiredAuth is true.
          type: string
      type: object
    CalloutMergeFields:
      additionalProperties:
        description: |
          The key is the parameter name. The value is a merge field with angle brackets.
        type: string
      description: |
        A key-value map of merge fields of this callout.
      title: calloutParams
      type: object
    CancelSubscription:
      description: |
        Information about an order action of type `CancelSubscription`.
      properties:
        cancellationEffectiveDate:
          format: date
          type: string
        cancellationPolicy:
          enum:
            - EndOfCurrentTerm
            - EndOfLastInvoicePeriod
            - SpecificDate
          type: string
      required:
        - cancellationPolicy
      title: cancelSubscription
      type: object
    ChargeMetricsData:
      properties:
        ChargeMetrics:
          description: ""
          items:
            $ref: "#/components/schemas/NewChargeMetrics"
          type: array
      type: object
    ChargeMetricsDiscountAllocationDetailResponse:
      properties:
        amendmentId:
          description: |
            The amendment id that result in the discount allocation detail record.
          type: string
        amendmentType:
          description: |
            The ID of the corresponding amendment that result in the discount allocation detail record.
          type: string
        chargeMetricsId:
          description: |
            The ID of the corresponding charge metrics record.
          type: string
        chargeNumber:
          description: |
            The corresponding charge number of the discount allocation details record.
          type: string
        createdOn:
          description: |
            The date and time when the discount allocation detail record.
          format: date-time
          type: string
        currency:
          description: |
            The currency of the discount allocation detail record.
          type: string
        deleted:
          description: |
            Whether the discount allocation detail record is deleted.
          type: boolean
        discountChargeNumber:
          description: |
            The number of the corresponding discount charge that leads to the discount allocation detail record.
          type: string
        discountMrr:
          description: |
            The discount amount for the MRR of the discount allocation detail record.

            See [Monthly Recurring Revenue](https://knowledgecenter.zuora.com/Billing/Subscriptions/Customer_Accounts/A_How_to_Manage_Customer_Accounts/E_Key_Metrics/B_Monthly_Recurring_Revenue) for more MRR information.
          type: number
        discountTcv:
          description: |
            The discount amount for the TCV of the discount allocation detail record.
          type: number
        endDate:
          description: |
            The end date of the discount allocation detail record.
          format: date
          type: string
        id:
          description: |
            The ID of the discount allocation details record.
          type: string
        invoiceOwnerAccountNumber:
          description: |
            The account number of the corresponding invoice owner.
          type: string
        productId:
          description: |
            The corresponding product ID of the discount allocation details record.
          type: string
        productRatePlanChargeId:
          description: |
            The corresponding product rate plan charge ID of the discount allocation detail record.
          type: string
        productRatePlanId:
          description: |
            The corresponding product rate plan ID of the discount allocation details record.
          type: string
        ratePlanChargeId:
          description: |
            The corresponding rate plan charge ID of the discount allocation details record.
          type: string
        startDate:
          description: |
            The start date of the discount allocation detail record.
          format: date
          type: string
        subscriptionName:
          description: |
            The name of the corresponding subscription.
          type: string
        subscriptionOwnerAccountNumber:
          description: |
            The account number of the corresponding subscription owner.
          type: string
        updatedOn:
          description: |
            The date and time when the discount allocation detail record.
          format: date-time
          type: string
      type: object
    ChargeMetricsResponse:
      properties:
        amendmentId:
          description: |
            The ID of the corresponding amendment that results in the charge metrics record.
          type: string
        amendmentType:
          description: |
            The type of the corresponding amendment that results in the charge metrics record.
          type: string
        chargeNumber:
          description: |
            The corresponding charge number of the charge metrics record.
          type: string
        createdOn:
          description: |
            The date and time when the charge metrics record was created, in `yyyy-mm-ddThh:mm:ssZ` format.
          format: date-time
          type: string
        currency:
          description: |
            The currency of the charge metrics record.
          type: string
        deleted:
          description: |
            Whether the charge metrics record is deleted.
          type: boolean
        endDate:
          description: |
            The end date of the charge metrics record.
          format: date
          type: string
        id:
          description: |
            The ID of the charge metrics record.
          type: string
        invoiceOwnerAccountNumber:
          description: |
            The account number of the corresponding invoice owner.
          type: string
        mrrDiscountAmount:
          description: |
            The discount amount for the MRR.

            See [Monthly Recurring Revenue](https://knowledgecenter.zuora.com/Billing/Subscriptions/Customer_Accounts/A_How_to_Manage_Customer_Accounts/E_Key_Metrics/B_Monthly_Recurring_Revenue) for more MRR information.
          type: number
        mrrGrossAmount:
          description: |
            The Gross MRR amount before discounts charges are applied. 

            See [Monthly Recurring Revenue](https://knowledgecenter.zuora.com/Billing/Subscriptions/Customer_Accounts/A_How_to_Manage_Customer_Accounts/E_Key_Metrics/B_Monthly_Recurring_Revenue) for more MRR information.
          type: number
        mrrNetAmount:
          description: |
            The NET MRR amount after discounts charges are applied.

            See [Monthly Recurring Revenue](https://knowledgecenter.zuora.com/Billing/Subscriptions/Customer_Accounts/A_How_to_Manage_Customer_Accounts/E_Key_Metrics/B_Monthly_Recurring_Revenue) for more MRR information.
          type: number
        productId:
          description: |
            The corresponding product ID of the charge metrics record.
          type: string
        productRatePlanChargeId:
          description: |
            The corresponding product rate plan charge ID of the charge metrics record.
          type: string
        productRatePlanId:
          description: |
            The corresponding product rate plan ID of the charge metrics record.
          type: string
        ratePlanChargeId:
          description: |
            The corresponding rate plan charge ID of the charge metrics record.
          type: string
        startDate:
          description: |
            The start date of the charge metrics record.
          format: date
          type: string
        subscriptionName:
          description: |
            The name of the corresponding subscription.
          type: string
        subscriptionOwnerAccountNumber:
          description: |
            The account number of the corresponding subscription owner.
          type: string
        tcvDiscountAmount:
          description: |
            The discount amount for the TCV.
          type: number
        tcvGrossAmount:
          description: |
            The Gross TCV amount before discount charges are applied.
          type: number
        tcvNetAmount:
          description: |
            The Net TCV amount after discount charges are applied.
          type: number
        updatedOn:
          description: |
            The date and time when the charge metrics record was last updated, in `yyyy-mm-ddThh:mm:ssZ` format.
          format: date-time
          type: string
      type: object
    ChargeModelConfigurationType:
      description: |
        Container for charge model configuration data.

        **Note**: This field is only available if you have the High Water Mark, Pre-Rated Pricing, or Multi-Attribute Pricing charge models enabled. These charge models are available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information.
      properties:
        customFieldPerUnitRate:
          description: |
            The custom field that carries the per-unit rate for each usage record. For example, `perUnitAmount__c`.
                
            This field is only available for the usage-based charges that use the Pre-Rated Per Unit Pricing charge model. The charge model is available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information.
          type: string
        customFieldTotalAmount:
          description: |
            The custom field that carries the total amount to charge for a usage record. For example, `totalAmount__c`. 
                
            This field is only available for the usage-based charges that use the Pre-Rated Pricing charge model. The charge model is available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information.
          type: string
        formula:
          description: |
            The pricing formula to calculate actual rating amount for each usage record.

            This field is only available for the usage-based charges that use the Multi-Attribute Pricing charge model. The charge model is available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information.
          type: string
      title: chargeModelConfiguration
      type: object
    ChargeModelDataOverride:
      description: |
        Container for charge model configuration data.

        **Note**: This field is only available if you have the High Water Mark, Pre-Rated Pricing, or Multi-Attribute Pricing charge models enabled. The charge models are available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information.
      properties:
        chargeModelConfiguration:
          properties:
            customFieldPerUnitRate:
              description: |
                The custom field that carries the per-unit rate for each usage record. For example, `perUnitAmount__c`.

                This field is only available for the usage-based charges that use the Pre-Rated Per Unit Pricing charge model. The charge model is available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information.
              type: string
            customFieldTotalAmount:
              description: |
                The custom field that carries the total amount to charge for a usage record. For example, `totalAmount__c`. 

                This field is only available for the usage-based charges that use the Pre-Rated Pricing charge model. The charge model is available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information.
              type: string
            formula:
              description: |
                The pricing formula to calculate actual rating amount for each usage record.

                This field is only available for the usage-based charges that use the Multi-Attribute Pricing charge model. The charge model is available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information.
              type: string
          type: object
        tiers:
          description: |
            List of cumulative pricing tiers in the charge.

            **Note**: When you override tiers of the charge with a High Water Mark Pricing charge model, you have to provide all of the tiers, including the ones you do not want to change. The new tiers will completely override the previous ones. The High Water Mark Pricing charge models are available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information.
          items:
            $ref: "#/components/schemas/ChargeTier"
          type: array
      title: chargeModelData
      type: object
    ChargeOverride:
      description: |
        Charge associated with a rate plan.
      properties:
        billing:
          description: |
            Billing information about the charge.
          properties:
            billCycleDay:
              description: |
                Day of the month that each billing period begins on. Only applicable if the value of the `billCycleType` field is `SpecificDayofMonth`.
              maximum: 31
              minimum: 0
              type: integer
            billCycleType:
              description: |
                Specifies how Zuora determines the day that each billing period begins on.

                  * `DefaultFromCustomer` - Each billing period begins on the bill cycle day of the account that owns the subscription.
                  * `SpecificDayofMonth` - Use the `billCycleDay` field to specify the day of the month that each billing period begins on.
                  * `SubscriptionStartDay` - Each billing period begins on the same day of the month as the start date of the subscription.
                  * `ChargeTriggerDay` - Each billing period begins on the same day of the month as the date when the charge becomes active.
                  * `SpecificDayofWeek` - Use the `weeklyBillCycleDay` field to specify the day of the week that each billing period begins on.
              enum:
                - DefaultFromCustomer
                - SpecificDayofMonth
                - SubscriptionStartDay
                - ChargeTriggerDay
                - SpecificDayofWeek
              type: string
            billingPeriod:
              description: |
                Billing frequency of the charge. The value of this field controls the duration of each billing period.

                If the value of this field is `Specific_Months` or `Specific_Weeks`, use the `specificBillingPeriod` field to specify the duration of each billing period.
              enum:
                - Month
                - Quarter
                - Semi_Annual
                - Annual
                - Eighteen_Months
                - Two_Years
                - Three_Years
                - Five_Years
                - Specific_Months
                - Subscription_Term
                - Week
                - Specific_Weeks
              type: string
            billingPeriodAlignment:
              description: |
                Specifies how Zuora determines when to start new billing periods. You can use this field to align the billing periods of different charges.

                * `AlignToCharge` - Zuora starts a new billing period on the first billing day that falls on or after the date when the charge becomes active.
                * `AlignToSubscriptionStart` - Zuora starts a new billing period on the first billing day that falls on or after the start date of the subscription.
                * `AlignToTermStart` - For each term of the subscription, Zuora starts a new billing period on the first billing day that falls on or after the start date of the term.

                See the `billCycleType` field for information about how Zuora determines the billing day.
              enum:
                - AlignToCharge
                - AlignToSubscriptionStart
                - AlignToTermStart
              type: string
            billingTiming:
              description: |
                Specifies whether to invoice for a billing period on the first day of the billing period (billing in advance) or the first day of the next billing period (billing in arrears).
              enum:
                - IN_ADVANCE
                - IN_ARREARS
              type: string
            specificBillingPeriod:
              description: |
                Duration of each billing period in months or weeks, depending on the value of the `billingPeriod` field. Only applicable if the value of the `billingPeriod` field is `Specific_Months` or `Specific_Weeks`.
              type: integer
            weeklyBillCycleDay:
              description: |
                Day of the week that each billing period begins on. Only applicable if the value of the `billCycleType` field is `SpecificDayofWeek`.
              enum:
                - Sunday
                - Monday
                - Tuesday
                - Wednesday
                - Thursday
                - Friday
                - Saturday
              type: string
          type: object
        chargeNumber:
          description: |
            Charge number of the charge. For example, C-00000307.

            If you do not set this field, Zuora will generate the charge number.
          maxLength: 50
          type: string
        customFields:
          $ref: "#/components/schemas/RatePlanChargeObjectCustomFields"
        description:
          description: |
            Description of the charge.
          maxLength: 500
          type: string
        endDate:
          $ref: "#/components/schemas/EndConditions"
        pricing:
          description: |
            Pricing information about the charge.
          properties:
            chargeModelData:
              $ref: "#/components/schemas/ChargeModelDataOverride"
            discount:
              $ref: "#/components/schemas/DiscountPricingOverride"
            oneTimeFlatFee:
              $ref: "#/components/schemas/OneTimeFlatFeePricingOverride"
            oneTimePerUnit:
              $ref: "#/components/schemas/OneTimePerUnitPricingOverride"
            oneTimeTiered:
              $ref: "#/components/schemas/OneTimeTieredPricingOverride"
            oneTimeVolume:
              $ref: "#/components/schemas/OneTimeVolumePricingOverride"
            recurringFlatFee:
              $ref: "#/components/schemas/RecurringFlatFeePricingOverride"
            recurringPerUnit:
              $ref: "#/components/schemas/RecurringPerUnitPricingOverride"
            recurringTiered:
              $ref: "#/components/schemas/RecurringTieredPricingOverride"
            recurringVolume:
              $ref: "#/components/schemas/RecurringVolumePricingOverride"
            usageFlatFee:
              $ref: "#/components/schemas/UsageFlatFeePricingOverride"
            usageOverage:
              $ref: "#/components/schemas/UsageOveragePricingOverride"
            usagePerUnit:
              $ref: "#/components/schemas/UsagePerUnitPricingOverride"
            usageTiered:
              $ref: "#/components/schemas/UsageTieredPricingOverride"
            usageTieredWithOverage:
              $ref: "#/components/schemas/UsageTieredWithOveragePricingOverride"
            usageVolume:
              $ref: "#/components/schemas/UsageVolumePricingOverride"
          type: object
        productRatePlanChargeId:
          description: |
            Internal identifier of the product rate plan charge that the charge is based on.
          type: string
        revRecCode:
          description: |
            Revenue Recognition Code
          maxLength: 70
          type: string
        revRecTriggerCondition:
          description: |
            Specifies the revenue recognition trigger condition.

              * `Contract Effective Date` 
              * `Service Activation Date`
              * `Customer Acceptance Date`
          enum:
            - Contract Effective Date
            - Service Activation Date
            - Customer Acceptance Date
          type: string
        revenueRecognitionRuleName:
          description: |
            Specifies the revenue recognition rule.

              * `Recognize upon invoicing` 
              * `Recognize daily over time`
          enum:
            - Recognize upon invoicing
            - Recognize daily over time
          type: string
        startDate:
          $ref: "#/components/schemas/TriggerParams"
        uniqueToken:
          description: |
            Unique identifier for the charge. This identifier enables you to refer to the charge before the charge has an internal identifier in Zuora.

            For instance, suppose that you want to use a single order to add a product to a subscription and later update the same product. When you add the product, you can set a unique identifier for the charge. Then when you update the product, you can use the same unique identifier to specify which charge to modify.
          maxLength: 50
          type: string
      required:
        - productRatePlanChargeId
      title: charge
      type: object
    ChargeOverrideForEvergreen:
      description: |
        Charge associated with a rate plan.
      properties:
        billing:
          description: |
            Billing information about the charge.
          properties:
            billCycleDay:
              description: |
                Day of the month that each billing period begins on. Only applicable if the value of the `billCycleType` field is `SpecificDayofMonth`.
              maximum: 31
              minimum: 0
              type: integer
            billCycleType:
              description: |
                Specifies how Zuora determines the day that each billing period begins on.

                  * `DefaultFromCustomer` - Each billing period begins on the bill cycle day of the account that owns the subscription.
                  * `SpecificDayofMonth` - Use the `billCycleDay` field to specify the day of the month that each billing period begins on.
                  * `SubscriptionStartDay` - Each billing period begins on the same day of the month as the start date of the subscription.
                  * `ChargeTriggerDay` - Each billing period begins on the same day of the month as the date when the charge becomes active.
                  * `SpecificDayofWeek` - Use the `weeklyBillCycleDay` field to specify the day of the week that each billing period begins on.
              enum:
                - DefaultFromCustomer
                - SpecificDayofMonth
                - SubscriptionStartDay
                - ChargeTriggerDay
                - SpecificDayofWeek
              type: string
            billingPeriod:
              description: |
                Billing frequency of the charge. The value of this field controls the duration of each billing period.

                If the value of this field is `Specific_Months` or `Specific_Weeks`, use the `specificBillingPeriod` field to specify the duration of each billing period.
              enum:
                - Month
                - Quarter
                - Semi_Annual
                - Annual
                - Eighteen_Months
                - Two_Years
                - Three_Years
                - Five_Years
                - Specific_Months
                - Subscription_Term
                - Week
                - Specific_Weeks
              type: string
            billingPeriodAlignment:
              description: |
                Specifies how Zuora determines when to start new billing periods. You can use this field to align the billing periods of different charges.

                * `AlignToCharge` - Zuora starts a new billing period on the first billing day that falls on or after the date when the charge becomes active.
                * `AlignToSubscriptionStart` - Zuora starts a new billing period on the first billing day that falls on or after the start date of the subscription.
                * `AlignToTermStart` - For each term of the subscription, Zuora starts a new billing period on the first billing day that falls on or after the start date of the term.

                See the `billCycleType` field for information about how Zuora determines the billing day.
              enum:
                - AlignToCharge
                - AlignToSubscriptionStart
                - AlignToTermStart
              type: string
            billingTiming:
              description: |
                Specifies whether to invoice for a billing period on the first day of the billing period (billing in advance) or the first day of the next billing period (billing in arrears).
              enum:
                - IN_ADVANCE
                - IN_ARREARS
              type: string
            specificBillingPeriod:
              description: |
                Duration of each billing period in months or weeks, depending on the value of the `billingPeriod` field. Only applicable if the value of the `billingPeriod` field is `Specific_Months` or `Specific_Weeks`.
              type: integer
            weeklyBillCycleDay:
              description: |
                Day of the week that each billing period begins on. Only applicable if the value of the `billCycleType` field is `SpecificDayofWeek`.
              enum:
                - Sunday
                - Monday
                - Tuesday
                - Wednesday
                - Thursday
                - Friday
                - Saturday
              type: string
          type: object
        chargeNumber:
          description: |
            Charge number of the charge. For example, C-00000307.

            If you do not set this field, Zuora will generate the charge number.
          maxLength: 50
          type: string
        customFields:
          $ref: "#/components/schemas/RatePlanChargeObjectCustomFields"
        description:
          description: |
            Description of the charge.
          maxLength: 500
          type: string
        endDate:
          $ref: "#/components/schemas/EndConditions"
        pricing:
          description: |
            Pricing information about the charge.
          properties:
            chargeModelData:
              $ref: "#/components/schemas/ChargeModelDataOverride"
            discount:
              $ref: "#/components/schemas/DiscountPricingOverride"
            oneTimeFlatFee:
              $ref: "#/components/schemas/OneTimeFlatFeePricingOverride"
            oneTimePerUnit:
              $ref: "#/components/schemas/OneTimePerUnitPricingOverride"
            oneTimeTiered:
              $ref: "#/components/schemas/OneTimeTieredPricingOverride"
            oneTimeVolume:
              $ref: "#/components/schemas/OneTimeVolumePricingOverride"
            recurringFlatFee:
              $ref: "#/components/schemas/RecurringFlatFeePricingOverride"
            recurringPerUnit:
              $ref: "#/components/schemas/RecurringPerUnitPricingOverride"
            recurringTiered:
              $ref: "#/components/schemas/RecurringTieredPricingOverride"
            recurringVolume:
              $ref: "#/components/schemas/RecurringVolumePricingOverride"
            usageFlatFee:
              $ref: "#/components/schemas/UsageFlatFeePricingOverride"
            usageOverage:
              $ref: "#/components/schemas/UsageOveragePricingOverride"
            usagePerUnit:
              $ref: "#/components/schemas/UsagePerUnitPricingOverride"
            usageTiered:
              $ref: "#/components/schemas/UsageTieredPricingOverride"
            usageTieredWithOverage:
              $ref: "#/components/schemas/UsageTieredWithOveragePricingOverride"
            usageVolume:
              $ref: "#/components/schemas/UsageVolumePricingOverride"
          type: object
        productRatePlanChargeId:
          description: |
            Internal identifier of the product rate plan charge that the charge is based on.
          type: string
        revRecCode:
          description: |
            Revenue Recognition Code
          maxLength: 70
          type: string
        revRecTriggerCondition:
          description: |
            Specifies the revenue recognition trigger condition.

              * `Contract Effective Date` 
              * `Service Activation Date`
              * `Customer Acceptance Date`
          enum:
            - Contract Effective Date
            - Service Activation Date
            - Customer Acceptance Date
          type: string
        revenueRecognitionRuleName:
          description: |
            Specifies the revenue recognition rule.

              * `Recognize upon invoicing` 
              * `Recognize daily over time`
          enum:
            - Recognize upon invoicing
            - Recognize daily over time
          type: string
        startDate:
          $ref: "#/components/schemas/TriggerParams"
        uniqueToken:
          description: |
            Unique identifier for the charge. This identifier enables you to refer to the charge before the charge has an internal identifier in Zuora.

            For instance, suppose that you want to use a single order to add a product to a subscription and later update the same product. When you add the product, you can set a unique identifier for the charge. Then when you update the product, you can use the same unique identifier to specify which charge to modify.
          maxLength: 50
          type: string
      required:
        - productRatePlanChargeId
      title: charge
      type: object
    ChargePreviewMetrics:
      properties:
        chargeNumber:
          type: string
        cmrr:
          properties:
            discount:
              description: Total discountCmrr of all discount charges which are applied to one specific recurring charge. This value is calculated from the rating results for the latest subscription version in the order. Only selects the applied discount charge when its endDateCondition is "Subscription_End".
              type: number
            discountDelta:
              description: Delta discountCmrr value between the order base and the latest subscription version.
              type: number
            regular:
              type: number
            regularDelta:
              type: number
          type: object
        originRatePlanId:
          type: string
        productRatePlanChargeId:
          type: string
        productRatePlanId:
          type: string
        tax:
          properties:
            discount:
              description: Total tax amount of all discount charges which are applied to one specific recurring charge. This value is calculated from the rating results for the latest subscription version in the order.
              type: number
            discountDelta:
              description: Delta discount TAX value between the base and the latest subscription version in the order for the specific recurring charge.
              type: number
            regular:
              type: number
            regularDelta:
              description: Delta tax value between the base and the latest subscription version in the order.
              type: number
          type: object
        tcb:
          properties:
            discount:
              description: Total contract billing amount of all discount charges which are applied to one specific recurring charge. This value is calculated from the rating results for the latest subscription version in the order.
              type: number
            discountDelta:
              description: Delta discount TCB value between the base and the latest subscription version for specific recurring charge in the order.
              type: number
            regular:
              type: number
            regularDelta:
              description: Delta TCB value between the base and the latest subscription version in the order.
              type: number
          type: object
        tcv:
          properties:
            discount:
              description: Always equals to discountTcb.
              type: number
            discountDelta:
              description: Always equals to delta discountTcb.
              type: number
            regular:
              type: number
            regularDelta:
              type: number
          type: object
      type: object
    ChargeTier:
      properties:
        endingUnit:
          description: |
            Limit on the number of units for which the tier is effective.
          type: number
        price:
          description: |
            Price or per-unit price of the tier, depending on the value of the `priceFormat` field.
          type: number
        priceFormat:
          description: |
            Specifies whether the tier has a fixed price or a per-unit price.
          enum:
            - FlatFee
            - PerUnit
          type: string
        startingUnit:
          description: |
            Number of units at which the tier becomes effective.
          type: number
        tier:
          description: |
            Index of the tier in the charge.
          minimum: 1
          type: integer
      required:
        - tier
        - startingUnit
        - price
        - priceFormat
      title: chargeTier
      type: object
    ChargeUpdate:
      description: The JSON object containing the information for a charge update in the 'UpdateProduct' type order action.
      properties:
        billing:
          $ref: "#/components/schemas/BillingUpdate"
        chargeNumber:
          description: |
            Read only. Identifies the charge to be updated.
          type: string
        customFields:
          $ref: "#/components/schemas/RatePlanChargeObjectCustomFields"
        description:
          type: string
        effectiveDate:
          $ref: "#/components/schemas/TriggerParams"
        pricing:
          $ref: "#/components/schemas/PricingUpdate"
        uniqueToken:
          description: |
            description: |
              A unique string to represent the rate plan charge in the order. The unique token is used to perform multiple actions against a newly added rate plan. For example, if you want to add and update a product in the same order, you would assign a unique token to the product rate plan when added and use that token in future order actions.
          type: string
      type: object
    ChargeUpdateForEvergreen:
      description: The JSON object containing the information for a charge update in the 'UpdateProduct' type order action.
      properties:
        billing:
          $ref: "#/components/schemas/BillingUpdate"
        chargeNumber:
          description: |
            Read only. Identifies the charge to be updated.
          type: string
        customFields:
          $ref: "#/components/schemas/RatePlanChargeObjectCustomFields"
        description:
          type: string
        effectiveDate:
          $ref: "#/components/schemas/TriggerParams"
        pricing:
          $ref: "#/components/schemas/PricingUpdateForEvergreen"
        uniqueToken:
          description: |
            A unique string to represent the rate plan charge in the order. The unique token is used to perform multiple actions against a newly added rate plan. For example, if you want to add and update a product in the same order, you would assign a unique token to the product rate plan when added and use that token in future order actions.
          type: string
      type: object
    ChildrenSettingValueRequest:
      properties:
        body:
          $ref: "#/components/schemas/BodyInSettingValueRequest"
        id:
          description: |
            The id of the request. You can set it to any string. It must be unique within the whole batch.
          type: string
        method:
          description: |
            One of the HTTP methods supported by the setting endpoint, for example, GET,PUT,POST or DELETE.
          enum:
            - GET
            - HEAD
            - POST
            - PUT
            - PATCH
            - DELETE
            - OPTIONS
            - TRACE
          type: string
        url:
          description: |
            The relative URL of the setting. It is the same as in the `pathPattern` field in the response body of [Listing all settings](https://www.zuora.com/developer/api-reference/#operation/GET_ListAllSettings). For example, `/billing-rules`.
          type: string
      title: childSettingsRequest
      type: object
    CommonErrorResponse:
      properties:
        code:
          description: |
            The error code.
          format: int32
          type: integer
        message:
          description: |
            The error message.
          type: string
      type: object
    CommonReasonsErrorResponse:
      properties:
        reasons:
          items:
            properties:
              code:
                description: |
                  The error code of response.
                type: string
              message:
                description: |
                  The detail information of the error response.
                type: string
            type: object
          type: array
      type: object
    CommonResponseType:
      properties:
        processId:
          description: |
            The Id of the process that handle the operation.
          type: string
        reasons:
          items:
            properties:
              code:
                description: |
                  The error code of response.
                type: string
              message:
                description: |
                  The detail information of the error response
                type: string
            type: object
          type: array
        success:
          description: |
            Indicates whether the call succeeded.
          type: boolean
      type: object
    Contact:
      description: |
        Contact details associated with an account.
      properties:
        address1:
          description: |
            First line of the contact's address. This is often a street address or a business name.
          maxLength: 255
          type: string
        address2:
          description: |
            Second line of the contact's address.
          maxLength: 255
          type: string
        city:
          description: |
            City of the contact's address.
          maxLength: 40
          type: string
        country:
          description: |
            Country of the contact's address. 
          maxLength: 64
          type: string
        county:
          description: |
            County of the contact's address.
          maxLength: 32
          type: string
        fax:
          description: |
            Fax number of the contact.
          maxLength: 40
          type: string
        firstName:
          description: |
            First name of the contact.
          maxLength: 100
          type: string
        homePhone:
          description: |
            Home phone number of the contact.
          maxLength: 40
          type: string
        lastName:
          description: |
            Last name of the contact.
          maxLength: 100
          type: string
        mobilePhone:
          description: |
            Mobile phone number of the contact.
          maxLength: 40
          type: string
        nickname:
          description: |
            Nickname of the contact.
          maxLength: 100
          type: string
        otherPhone:
          description: |
            Additional phone number of the contact. Use the `otherPhoneType` field to specify the type of phone number.
          maxLength: 40
          type: string
        otherPhoneType:
          description: |
            Specifies the type of phone number in the `otherPhone` field.
          enum:
            - Work
            - Mobile
            - Home
            - Other
          type: string
        personalEmail:
          description: |
            Personal email address of the contact.
          format: email
          maxLength: 80
          type: string
        postalCode:
          description: |
            ZIP code or other postal code of the contact's address.
          maxLength: 20
          type: string
        state:
          description: |
            State or province of the contact's address.
          maxLength: 40
          type: string
        taxRegion:
          description: |
            Region defined in your taxation rules. Only applicable if you use Zuora Tax.
          maxLength: 32
          type: string
        workEmail:
          description: |
            Business email address of the contact.
          format: email
          maxLength: 80
          type: string
        workPhone:
          description: |
            Business phone number of the contact.
          maxLength: 40
          type: string
      required:
        - firstName
        - lastName
      type: object
    ContactObjectCustomFields:
      additionalProperties:
        description: |
          Custom fields of the Contact object. The name of each custom field has the form <code>*customField*__c</code>. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
      description: |
        Container for custom fields of a Contact object.
      title: contactFieldsCustom
      type: object
    CreateEntityResponseType:
      properties:
        displayName:
          description: The display name of the entity that is shown in the Zuora UI and APIs.
          type: string
        id:
          description: The entity Id.
          type: string
        locale:
          description: The locale that is used in this entity.
          type: string
        name:
          description: The name of the entity.
          type: string
        parentId:
          description: The Id of the parent entity.
          type: string
        status:
          description: The status of the entity.
          enum:
            - Provisioned
            - Unprovisioned
          type: string
        success:
          description: Returns `true` if the request is successful.
          type: boolean
        tenantId:
          description: The Id of the tenant that the entity belongs to.
          type: string
        timezone:
          description: The time zone that is used in this entity.
          type: string
      type: object
    CreateEntityType:
      example:
        displayName: Acme-Asia
        locale: zh_CN
        name: Acme-Asia
        parentId: 8a808255557baba1015580e12fa5083a
        timezone: Asia/Harbin
      properties:
        displayName:
          description: |-
            The display name of the entity that is shown in the Zuora UI and APIs

            **Note:** If you do not specify the display name in the request, the entity name is used as the display name.
          maxLength: 255
          type: string
        locale:
          description: The locale that is used in this entity.
          type: string
        name:
          description: |-
            The name of the entity that is the entity identifier and is unique across all entities in a multi-entity hierarchy.

            **Note:** Only alphanumeric characters (letters A–Z and a–z, and digits 0–9), space, period, and hyphen are allowed to be used in entity names. 
          maxLength: 255
          type: string
        parentId:
          description: |-
            The Id of the entity under which you want to create an entity.
            You can get the parent entity Id by using the GET Entities call. 
          type: string
        timezone:
          description: The time zone that is used in this entity.
          type: string
      required:
        - name
        - parentId
        - locale
        - timezone
      type: object
    CreateOrderChargeOverride:
      description: |
        Charge associated with a rate plan.
      properties:
        billing:
          description: |
            Billing information about the charge.
          properties:
            billCycleDay:
              description: |
                Day of the month that each billing period begins on. Only applicable if the value of the `billCycleType` field is `SpecificDayofMonth`.
              maximum: 31
              minimum: 0
              type: integer
            billCycleType:
              description: |
                Specifies how Zuora determines the day that each billing period begins on.

                  * `DefaultFromCustomer` - Each billing period begins on the bill cycle day of the account that owns the subscription.
                  * `SpecificDayofMonth` - Use the `billCycleDay` field to specify the day of the month that each billing period begins on.
                  * `SubscriptionStartDay` - Each billing period begins on the same day of the month as the start date of the subscription.
                  * `ChargeTriggerDay` - Each billing period begins on the same day of the month as the date when the charge becomes active.
                  * `SpecificDayofWeek` - Use the `weeklyBillCycleDay` field to specify the day of the week that each billing period begins on.
              enum:
                - DefaultFromCustomer
                - SpecificDayofMonth
                - SubscriptionStartDay
                - ChargeTriggerDay
                - SpecificDayofWeek
              type: string
            billingPeriod:
              description: |
                Billing frequency of the charge. The value of this field controls the duration of each billing period.

                If the value of this field is `Specific_Months` or `Specific_Weeks`, use the `specificBillingPeriod` field to specify the duration of each billing period.
              enum:
                - Month
                - Quarter
                - Semi_Annual
                - Annual
                - Eighteen_Months
                - Two_Years
                - Three_Years
                - Five_Years
                - Specific_Months
                - Subscription_Term
                - Week
                - Specific_Weeks
              type: string
            billingPeriodAlignment:
              description: |
                Specifies how Zuora determines when to start new billing periods. You can use this field to align the billing periods of different charges.

                * `AlignToCharge` - Zuora starts a new billing period on the first billing day that falls on or after the date when the charge becomes active.
                * `AlignToSubscriptionStart` - Zuora starts a new billing period on the first billing day that falls on or after the start date of the subscription.
                * `AlignToTermStart` - For each term of the subscription, Zuora starts a new billing period on the first billing day that falls on or after the start date of the term.

                See the `billCycleType` field for information about how Zuora determines the billing day.
              enum:
                - AlignToCharge
                - AlignToSubscriptionStart
                - AlignToTermStart
              type: string
            billingTiming:
              description: |
                Specifies whether to invoice for a billing period on the first day of the billing period (billing in advance) or the first day of the next billing period (billing in arrears).
              enum:
                - IN_ADVANCE
                - IN_ARREARS
              type: string
            specificBillingPeriod:
              description: |
                Duration of each billing period in months or weeks, depending on the value of the `billingPeriod` field. Only applicable if the value of the `billingPeriod` field is `Specific_Months` or `Specific_Weeks`.
              type: integer
            weeklyBillCycleDay:
              description: |
                Day of the week that each billing period begins on. Only applicable if the value of the `billCycleType` field is `SpecificDayofWeek`.
              enum:
                - Sunday
                - Monday
                - Tuesday
                - Wednesday
                - Thursday
                - Friday
                - Saturday
              type: string
          type: object
        chargeNumber:
          description: |
            Charge number of the charge. For example, C-00000307.

            If you do not set this field, Zuora will generate the charge number.
          maxLength: 50
          type: string
        customFields:
          $ref: "#/components/schemas/RatePlanChargeObjectCustomFields"
        description:
          description: |
            Description of the charge.
          maxLength: 500
          type: string
        endDate:
          $ref: "#/components/schemas/EndConditions"
        pricing:
          description: |
            Pricing information about the charge.
          properties:
            chargeModelData:
              $ref: "#/components/schemas/ChargeModelDataOverride"
            discount:
              $ref: "#/components/schemas/DiscountPricingOverride"
            oneTimeFlatFee:
              $ref: "#/components/schemas/OneTimeFlatFeePricingOverride"
            oneTimePerUnit:
              $ref: "#/components/schemas/OneTimePerUnitPricingOverride"
            oneTimeTiered:
              $ref: "#/components/schemas/OneTimeTieredPricingOverride"
            oneTimeVolume:
              $ref: "#/components/schemas/OneTimeVolumePricingOverride"
            recurringFlatFee:
              $ref: "#/components/schemas/RecurringFlatFeePricingOverride"
            recurringPerUnit:
              $ref: "#/components/schemas/RecurringPerUnitPricingOverride"
            recurringTiered:
              $ref: "#/components/schemas/RecurringTieredPricingOverride"
            recurringVolume:
              $ref: "#/components/schemas/RecurringVolumePricingOverride"
            usageFlatFee:
              $ref: "#/components/schemas/UsageFlatFeePricingOverride"
            usageOverage:
              $ref: "#/components/schemas/UsageOveragePricingOverride"
            usagePerUnit:
              $ref: "#/components/schemas/UsagePerUnitPricingOverride"
            usageTiered:
              $ref: "#/components/schemas/UsageTieredPricingOverride"
            usageTieredWithOverage:
              $ref: "#/components/schemas/UsageTieredWithOveragePricingOverride"
            usageVolume:
              $ref: "#/components/schemas/UsageVolumePricingOverride"
          type: object
        productRatePlanChargeId:
          description: |
            Internal identifier of the product rate plan charge that the charge is based on.
          type: string
        revRecCode:
          description: |
            Revenue Recognition Code
          maxLength: 70
          type: string
        revRecTriggerCondition:
          description: |
            Specifies the revenue recognition trigger condition.

              * `Contract Effective Date` 
              * `Service Activation Date`
              * `Customer Acceptance Date`
          enum:
            - Contract Effective Date
            - Service Activation Date
            - Customer Acceptance Date
          type: string
        revenueRecognitionRuleName:
          description: |
            Specifies the revenue recognition rule.

              * `Recognize upon invoicing` 
              * `Recognize daily over time`
          enum:
            - Recognize upon invoicing
            - Recognize daily over time
          type: string
        startDate:
          $ref: "#/components/schemas/CreateOrderTriggerParams"
        uniqueToken:
          description: |
            Unique identifier for the charge. This identifier enables you to refer to the charge before the charge has an internal identifier in Zuora.

            For instance, suppose that you want to use a single order to add a product to a subscription and later update the same product. When you add the product, you can set a unique identifier for the charge. Then when you update the product, you can use the same unique identifier to specify which charge to modify.
          maxLength: 50
          type: string
      required:
        - productRatePlanChargeId
      title: charge
      type: object
    CreateOrderChargeUpdate:
      description: The JSON object containing the information for a charge update in the 'UpdateProduct' type order action.
      properties:
        billing:
          $ref: "#/components/schemas/BillingUpdate"
        chargeNumber:
          description: |
            Read only. Identifies the charge to be updated.
          type: string
        customFields:
          $ref: "#/components/schemas/RatePlanChargeObjectCustomFields"
        description:
          type: string
        effectiveDate:
          $ref: "#/components/schemas/CreateOrderUpdateProductTriggerParams"
        pricing:
          $ref: "#/components/schemas/CreateOrderPricingUpdate"
        uniqueToken:
          description: |
            A unique string to represent the rate plan charge in the order. The unique token is used to perform multiple actions against a newly added rate plan. For example, if you want to add and update a product in the same order, you would assign a unique token to the product rate plan when added and use that token in future order actions.
          type: string
      type: object
    CreateOrderCreateSubscription:
      description: |
        Information about an order action of type `CreateSubscription`.
      properties:
        invoiceSeparately:
          description: |
            Specifies whether the subscription appears on a separate invoice when Zuora generates invoices.
          type: boolean
        newSubscriptionOwnerAccount:
          $ref: "#/components/schemas/CreateOrderCreateSubscriptionNewSubscriptionOwnerAccount"
        notes:
          description: |
            Notes about the subscription. These notes are only visible to Zuora users.
          maxLength: 500
          type: string
        subscribeToRatePlans:
          description: |
            List of rate plans associated with the subscription.
          items:
            $ref: "#/components/schemas/CreateOrderRatePlanOverride"
          type: array
        subscriptionNumber:
          description: |
            Subscription number of the subscription. For example, A-S00000001.

            If you do not set this field, Zuora will generate the subscription number.
          maxLength: 100
          type: string
        subscriptionOwnerAccountNumber:
          description: |
            Account number of an existing account that will own the subscription. For example, A00000001.

            If you do not set this field or the `newSubscriptionOwnerAccount` field, the account that owns the order will also own the subscription. Zuora will return an error if you set this field and the `newSubscriptionOwnerAccount` field.
          maxLength: 70
          type: string
        terms:
          description: |
            Container for the terms and renewal settings of the subscription.
          properties:
            autoRenew:
              description: |
                Specifies whether the subscription automatically renews at the end of the each term. Only applicable if the type of the first term is `TERMED`.
              type: boolean
            initialTerm:
              description: |
                Information about the first term of the subscription.
              properties:
                period:
                  description: |
                    Duration of the first term in months, years, days, or weeks, depending on the value of the `periodType` field. Only applicable if the value of the `termType` field is `TERMED`.
                  type: integer
                periodType:
                  description: |
                    Unit of time that the first term is measured in. Only applicable if the value of the `termType` field is `TERMED`.
                  enum:
                    - Month
                    - Year
                    - Day
                    - Week
                  type: string
                startDate:
                  description: |
                    Start date of the first term, in YYYY-MM-DD format.
                  format: date
                  type: string
                termType:
                  description: |
                    Type of the first term. If the value of this field is `TERMED`, the first term has a predefined duration based on the value of the `period` field. If the value of this field is `EVERGREEN`, the first term does not have a predefined duration.
                  enum:
                    - TERMED
                    - EVERGREEN
                  type: string
              required:
                - termType
              type: object
            renewalSetting:
              description: |
                Specifies the type of the terms that follow the first term if the subscription is renewed. Only applicable if the type of the first term is `TERMED`.

                * `RENEW_WITH_SPECIFIC_TERM` - Each renewal term has a predefined duration. The first entry in `renewalTerms` specifies the duration of the second term of the subscription, the second entry in `renewalTerms` specifies the duration of the third term of the subscription, and so on. The last entry in `renewalTerms` specifies the ultimate duration of each renewal term.
                * `RENEW_TO_EVERGREEN` - The second term of the subscription does not have a predefined duration.
              enum:
                - RENEW_WITH_SPECIFIC_TERM
                - RENEW_TO_EVERGREEN
              type: string
            renewalTerms:
              description: |
                List of renewal terms of the subscription. Only applicable if the type of the first term is `TERMED` and the value of the `renewalSetting` field is `RENEW_WITH_SPECIFIC_TERM`.
              items:
                $ref: "#/components/schemas/RenewalTerm"
              type: array
          required:
            - initialTerm
          type: object
      title: createSubscription
      type: object
    CreateOrderCreateSubscriptionNewSubscriptionOwnerAccount:
      allOf:
        - description: |
            Information about a new account that will own the subscription. Only available if you have enabled the Owner Transfer feature.

            **Note:** The Owner Transfer feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).

            If you do not set this field or the `subscriptionOwnerAccountNumber` field, the account that owns the order will also own the subscription. Zuora will return an error if you set this field and the `subscriptionOwnerAccountNumber` field.
          properties:
            accountNumber:
              description: |
                Account number. For example, A00000001.
              maxLength: 70
              type: string
            additionalEmailAddresses:
              description: |
                List of additional email addresses to receive emailed invoices. Values should be a comma-separated list of email addresses.
              maxLength: 1200
              type: string
            allowInvoiceEdit:
              description: |
                Indicates if associated invoices can be edited.
                Values are: 

                * `true`
                * `false` (default)
              type: boolean
            autoPay:
              description: |
                Specifies whether future payments are automatically billed when they are due.
              type: boolean
            batch:
              description: |
                Name of the billing batch that the account belongs to. For example, Batch1.
              type: string
            billCycleDay:
              description: |
                Day of the month that the account prefers billing periods to begin on. If set to 0, the bill cycle day will be set as "AutoSet".
              maximum: 31
              minimum: 0
              type: integer
            billToContact:
              $ref: "#/components/schemas/BillToContactPostOrder"
            communicationProfileId:
              description: |
                Internal identifier of the communication profile that Zuora uses when sending notifications to the account's contacts.
              type: string
            creditCard:
              $ref: "#/components/schemas/creditCard"
            creditMemoTemplateId:
              description: |
                **Note:** This field is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

                The unique ID of the credit memo template, configured in **Billing Settings** > **Manage Billing Document Configuration** through the Zuora UI. For example, 2c92c08a6246fdf101626b1b3fe0144b.
              type: string
            crmId:
              description: |
                External identifier of the account in a CRM system.
              maxLength: 100
              type: string
            currency:
              description: |
                ISO 3-letter currency code (uppercase). For example, USD.
              type: string
            customFields:
              $ref: "#/components/schemas/AccountObjectCustomFields"
            customerServiceRepName:
              description: |
                Name of the account's customer service representative, if applicable.
              maxLength: 50
              type: string
            debitMemoTemplateId:
              description: |
                **Note:** This field is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

                The unique ID of the debit memo template, configured in **Billing Settings** > **Manage Billing Document Configuration** through the Zuora UI. For example, 2c92c08d62470a8501626b19d24f19e2.
              type: string
            hpmCreditCardPaymentMethodId:
              description: |
                The ID of the payment method associated with this account. The payment method specified for this field will be set as the default payment method of the account.

                If the `autoPay` field is set to `true`, you must provide the credit card payment method ID for either this field or the `creditCard` field,
                but not both.  
              type: string
            invoiceDeliveryPrefsEmail:
              description: |
                Specifies whether to turn on the invoice delivery method 'Email' for the new account. 
                Values are: 

                * `true` (default). Turn on the invoice delivery method 'Email' for the new account.
                * `false`. Turn off the invoice delivery method 'Email' for the new account.         
              type: boolean
            invoiceDeliveryPrefsPrint:
              description: |
                Specifies whether to turn on the invoice delivery method 'Print' for the new account.
                Values are: 

                * `true`. Turn on the invoice delivery method 'Print' for the new account.
                * `false` (default). Turn off the invoice delivery method 'Print' for the new account.
              type: boolean
            invoiceTemplateId:
              description: |
                Internal identifier of the invoice template that Zuora uses when generating invoices for the account.
              type: string
            name:
              description: |
                Account name.
              maxLength: 255
              type: string
            notes:
              description: |
                Notes about the account. These notes are only visible to Zuora users.
              maxLength: 65535
              type: string
            parentId:
              description: Identifier of the parent customer account for this Account object. Use this field if you have customer hierarchy enabled.
              type: string
            paymentGateway:
              description: |
                The payment gateway that Zuora uses when processing electronic payments and refunds for the account. If you do not specify this field or if the value of this field is null, Zuora uses your default payment gateway.
              maxLength: 40
              type: string
            paymentMethod:
              $ref: "#/components/schemas/PaymentMethod"
            paymentTerm:
              description: |
                Name of the payment term associated with the account. For example, "Net 30". The payment term determines the due dates of invoices.
              type: string
            purchaseOrderNumber:
              description: |
                The number of the purchase order associated with this account. Purchase order information generally comes from customers.
              maxLength: 100
              type: string
            salesRep:
              description: |
                The name of the sales representative associated with this account, if applicable.
              maxLength: 50
              type: string
            soldToContact:
              $ref: "#/components/schemas/SoldToContactPostOrder"
            taxInfo:
              $ref: "#/components/schemas/TaxInfo"
          required:
            - name
            - currency
            - billCycleDay
            - billToContact
          type: object
        - $ref: "#/components/schemas/DataAccessControlField"
    CreateOrderOrderAction:
      properties:
        addProduct:
          $ref: "#/components/schemas/CreateOrderRatePlanOverride"
        cancelSubscription:
          $ref: "#/components/schemas/CancelSubscription"
        createSubscription:
          $ref: "#/components/schemas/CreateOrderCreateSubscription"
        customFields:
          $ref: "#/components/schemas/OrderActionObjectCustomFields"
        ownerTransfer:
          $ref: "#/components/schemas/OwnerTransfer"
        removeProduct:
          $ref: "#/components/schemas/RemoveProduct"
        resume:
          $ref: "#/components/schemas/CreateOrderResume"
        suspend:
          $ref: "#/components/schemas/CreateOrderSuspend"
        termsAndConditions:
          $ref: "#/components/schemas/CreateOrderTermsAndConditions"
        triggerDates:
          description: |
            Container for the contract effective, service activation, and customer acceptance dates of the order action. 

            If [Zuora is configured to require service activation](https://knowledgecenter.zuora.com/CB_Billing/Billing_Settings/Define_Default_Subscription_Settings#Require_Service_Activation_of_Orders.3F) and the `ServiceActivation` field is not set for a `CreateSubscription` order action, a `Pending` order and a `Pending Activation` subscription are created.

            If [Zuora is configured to require customer acceptance](https://knowledgecenter.zuora.com/CB_Billing/Billing_Settings/Define_Default_Subscription_Settings#Require_Customer_Acceptance_of_Orders.3F) and the `CustomerAcceptance` field is not set for a `CreateSubscription` order action, a `Pending` order and a `Pending Acceptance` subscription are created. At the same time, if the service activation date field is also required and not set, a `Pending` order and a `Pending Activation` subscription are created instead.

            If [Zuora is configured to require service activation](https://knowledgecenter.zuora.com/CB_Billing/Billing_Settings/Define_Default_Subscription_Settings#Require_Service_Activation_of_Orders.3F) and the `ServiceActivation` field is not set for either of the following order actions, a `Pending` order is created. The subscription status is not impacted. **Note:** This feature is in **Limited Availability**. If you want to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).
             * AddProduct
             * UpdateProduct
             * RemoveProduct
             * RenewSubscription
             * TermsAndConditions

            If [Zuora is configured to require customer acceptance](https://knowledgecenter.zuora.com/CB_Billing/Billing_Settings/Define_Default_Subscription_Settings#Require_Customer_Acceptance_of_Orders.3F) and the `CustomerAcceptance` field is not set for either of the following order actions, a `Pending` order is created. The subscription status is not impacted. **Note:** This feature is in **Limited Availability**. If you want to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).
             * AddProduct
             * UpdateProduct
             * RemoveProduct
             * RenewSubscription
             * TermsAndConditions
          items:
            $ref: "#/components/schemas/TriggerDate"
          type: array
        type:
          description: |
            Type of order action.

            Unless the type of order action is `RenewSubscription`, you must use the corresponding field to provide information about the order action. For example, if the type of order action is `AddProduct`, you must set the `addProduct` field.

            Zuora returns an error if you set a field that corresponds to a different type of order action. For example, if the type of order action is `AddProduct`, Zuora returns an error if you set the `updateProduct` field.

            A [pending order](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/Pending_Order_and_Subscription) supports the following order actions:
             * CreateSubscription
             * AddProduct
             * UpdateProduct
             * RemoveProduct
             * RenewSubscription
             * TermsAndConditions

            However, pending orders created through all order actions except for "Create new subscription":
             * Do not impact the subscription status.
             * Are in **Limited Availability**. If you want to have access to the feature, submit a request at [Zuora Global Support](https://support.zuora.com). 

            A pending order is created in either of the following conditions:
             * [Zuora is configured to require service activation](https://knowledgecenter.zuora.com/CB_Billing/Billing_Settings/Define_Default_Subscription_Settings#Require_Service_Activation_of_Orders.3F) and the service activation date is not set in your "Create an order" call.
             * [Zuora is configured to require customer acceptance](https://knowledgecenter.zuora.com/CB_Billing/Billing_Settings/Define_Default_Subscription_Settings#Require_Customer_Acceptance_of_Orders.3F) and the customer acceptance date is not set in your "Create an order" call.
             * When a charge in the subscription has its `triggerEvent` field set as `SpecificDate` and the `specificTriggerDate` field is not set in your "Create an order" API call.
          enum:
            - CreateSubscription
            - TermsAndConditions
            - AddProduct
            - UpdateProduct
            - RemoveProduct
            - RenewSubscription
            - CancelSubscription
            - OwnerTransfer
            - Suspend
            - Resume
          type: string
        updateProduct:
          $ref: "#/components/schemas/CreateOrderRatePlanUpdate"
      required:
        - type
      type: object
    CreateOrderOrderLineItem:
      allOf:
        - $ref: "#/components/schemas/OrderLineItemCommonPostOrder"
    CreateOrderPricingUpdate:
      properties:
        chargeModelData:
          $ref: "#/components/schemas/ChargeModelDataOverride"
        discount:
          $ref: "#/components/schemas/DiscountPricingUpdate"
        recurringFlatFee:
          $ref: "#/components/schemas/RecurringFlatFeePricingUpdate"
        recurringPerUnit:
          $ref: "#/components/schemas/RecurringPerUnitPricingUpdate"
        recurringTiered:
          $ref: "#/components/schemas/RecurringTieredPricingUpdate"
        recurringVolume:
          $ref: "#/components/schemas/RecurringVolumePricingUpdate"
        usageFlatFee:
          $ref: "#/components/schemas/UsageFlatFeePricingUpdate"
        usageOverage:
          $ref: "#/components/schemas/UsageOveragePricingUpdate"
        usagePerUnit:
          $ref: "#/components/schemas/UsagePerUnitPricingUpdate"
        usageTiered:
          $ref: "#/components/schemas/UsageTieredPricingUpdate"
        usageTieredWithOverage:
          $ref: "#/components/schemas/UsageTieredWithOveragePricingUpdate"
        usageVolume:
          $ref: "#/components/schemas/UsageVolumePricingUpdate"
      type: object
    CreateOrderRatePlanOverride:
      description: |
        Information about an order action of type `addProduct`. 

        If you want to create a pending order through the "Add product" order action, and if the charge's trigger condition is `Specific Date`, you must set a charge number in the `chargeNumber` field for the "Add product" order action. In this case, if you do not set it, Zuora will not generate the charge number for you.

        See more information about pending orders in [Pending Order and Subscription](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/Pending_Order_and_Subscription). 
      properties:
        chargeOverrides:
          description: |
            List of charges associated with the rate plan.
          items:
            $ref: "#/components/schemas/CreateOrderChargeOverride"
          type: array
        customFields:
          $ref: "#/components/schemas/RatePlanObjectCustomFields"
        productRatePlanId:
          description: |
            Internal identifier of the product rate plan that the rate plan is based on.
          type: string
        uniqueToken:
          description: |
            Unique identifier for the rate plan. This identifier enables you to refer to the rate plan before the rate plan has an internal identifier in Zuora.

            For instance, suppose that you want to use a single order to add a product to a subscription and later update the same product. When you add the product, you can set a unique identifier for the rate plan. Then when you update the product, you can use the same unique identifier to specify which rate plan to modify.
          maxLength: 50
          type: string
      required:
        - productRatePlanId
      title: ratePlan
      type: object
    CreateOrderRatePlanUpdate:
      description: |
        Information about an order action of type `UpdateProduct`.
      properties:
        chargeUpdates:
          items:
            $ref: "#/components/schemas/CreateOrderChargeUpdate"
          type: array
        customFields:
          $ref: "#/components/schemas/RatePlanObjectCustomFields"
        ratePlanId:
          description: |
            The id of the rate plan to be updated. It can be the latest version or any history version id.
          type: string
        specificUpdateDate:
          description: |
            
            The date when the Update Product order action takes effect. This field is only applicable if there is already a future-dated Update Product order action on the subscription. The format of the date is yyyy-mm-dd.

            See [Update a Product on Subscription with Future-dated Updates](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AC_Orders_Tutorials/C_Update_a_Product_in_a_Subscription/Update_a_Product_on_Subscription_with_Future-dated_Updates) for more information about this feature.
          format: date
          type: string
        uniqueToken:
          description: |
            A unique string to represent the rate plan charge in the order. The unique token is used to perform multiple actions against a newly added rate plan. For example, if you want to add and update a product in the same order, you would assign a unique token to the product rate plan when added and use that token in future order actions.
          type: string
      title: updateProduct
      type: object
    CreateOrderResume:
      description: |
        Information about an order action of type `Resume`.
      properties:
        extendsTerm:
          description: |
            Specifies whether to extend the subscription term by the length of time the suspension is in effect.
          type: boolean
        resumePeriods:
          description: |
            This field is applicable only when the `resumePolicy` field is set to `FixedPeriodsFromToday` or `FixedPeriodsFromSuspendDate`. It must be used together with the `resumePeriodsType` field. 

            The total number of the periods used to specify when a subscription resumption takes effect. The subscription resumption will take place after the specified time frame (`suspendPeriods` multiplied by `suspendPeriodsType`) from today's date. 
          type: integer
        resumePeriodsType:
          description: |
            This field is applicable only when the `resumePolicy` field is set to `FixedPeriodsFromToday` or `FixedPeriodsFromSuspendDate`. It must be used together with the `resumePeriods` field.

            The period type used to specify when a subscription resumption takes effect. The subscription suspension will take place after the specified time frame (`suspendPeriods` multiplied by `suspendPeriodsType`) from today's date. 
          enum:
            - Day
            - Week
            - Month
            - Year
          type: string
        resumePolicy:
          description: |
            Resume methods. Specify a way to resume a subscription. See [Resume Date](https://knowledgecenter.zuora.com/BC_Subscription_Management/Subscriptions/Resume_a_Subscription#Resume_Date) for more information.

            If `SuspendDate` is specfied, the resumption will take place on the same day as the suspension. 
          enum:
            - Today
            - FixedPeriodsFromSuspendDate
            - FixedPeriodsFromToday
            - SpecificDate
            - SuspendDate
          type: string
        resumeSpecificDate:
          description: |
            This field is applicable only when the `resumePolicy` field is set to `SpecificDate`.

            A specific date when the subscription resumption takes effect, in YYYY-MM-DD format. The value should not be earlier than the subscription suspension date.
          format: date
          type: string
      required:
        - resumePolicy
      title: Resume
      type: object
    CreateOrderSuspend:
      description: |
        Information about an order action of type `Suspend`.
      properties:
        suspendPeriods:
          description: |
            This field is applicable only when the `suspendPolicy` field is set to `FixedPeriodsFromToday`. It must be used together with the `suspendPeriodsType` field. 

            The total number of the periods used to specify when a subscription suspension takes effect. The subscription suspension will take place after the specified time frame (`suspendPeriods` multiplied by `suspendPeriodsType`) from today's date. 
          type: integer
        suspendPeriodsType:
          description: |
            This field is applicable only when the `suspendPolicy` field is set to `FixedPeriodsFromToday`. It must be used together with the `suspendPeriods` field.

            The period type used to specify when a subscription suspension takes effect. The subscription suspension will take place after the specified time frame (`suspendPeriods` multiplied by `suspendPeriodsType`) from today's date. 
          enum:
            - Day
            - Week
            - Month
            - Year
          type: string
        suspendPolicy:
          description: |
            Suspend methods. Specify a way to suspend a subscription. See [Suspend Date](https://knowledgecenter.zuora.com/BC_Subscription_Management/Subscriptions/Suspend_a_Subscription#Suspend_Date) for more information.
          enum:
            - Today
            - EndOfLastInvoicePeriod
            - FixedPeriodsFromToday
            - SpecificDate
          type: string
        suspendSpecificDate:
          description: |
            This field is applicable only when the `suspendPolicy` field is set to `SpecificDate`.

            A specific date when the subscription suspension takes effect, in YYYY-MM-DD format. The value should not be earlier than the subscription's contract effective date or later than the subscription's term end date.
          format: date
          type: string
      required:
        - suspendPolicy
      title: Suspend
      type: object
    CreateOrderTermsAndConditions:
      description: |
        Information about an order action of type `TermsAndConditions`.
      properties:
        autoRenew:
          type: boolean
        lastTerm:
          $ref: "#/components/schemas/LastTerm"
        renewalSetting:
          enum:
            - RENEW_WITH_SPECIFIC_TERM
            - RENEW_TO_EVERGREEN
          type: string
        renewalTerms:
          items:
            $ref: "#/components/schemas/RenewalTerm"
          type: array
      title: termsAndConditions
      type: object
    CreateOrderTriggerParams:
      description: |
        Specifies when a charge becomes active.
      properties:
        specificTriggerDate:
          description: |
            Date in YYYY-MM-DD format. Only applicable if the value of the `triggerEvent` field is `SpecificDate`. 

            While this field is applicable, if this field is not set, your `CreateSubscription` order action creates a `Pending` order and a `Pending Acceptance` subscription. If at the same time the service activation date is required and not set, a `Pending Activation` subscription is created.

            While this field is applicable, if this field is not set, the following order actions create a `Pending` order but do not impact the subscription status. **Note**: This feature is in **Limited Availability**. If you want to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).
             * AddProduct
             * UpdateProduct
             * RemoveProduct
             * RenewSubscription
             * TermsAndConditions
          format: date
          type: string
        triggerEvent:
          description: |
            Condition for the charge to become active.

            If the value of this field is `SpecificDate`, use the `specificTriggerDate` field to specify the date when the charge becomes active.
          enum:
            - ContractEffective
            - ServiceActivation
            - CustomerAcceptance
            - SpecificDate
          type: string
      title: startDate
      type: object
    CreateOrderUpdateProductTriggerParams:
      description: |
        Specifies when a charge becomes active.
      properties:
        specificTriggerDate:
          description: |
            Date in YYYY-MM-DD format. Only applicable if the value of the `triggerEvent` field is `SpecificDate`. 

            While this field is applicable, if this field is not set, your `CreateSubscription` order action creates a `Pending` order and a `Pending Acceptance` subscription. If at the same time the service activation date is required and not set, a `Pending Activation` subscription is created.

            While this field is applicable, if this field is not set, the following order actions create a `Pending` order but do not impact the subscription status. **Note**: This feature is in **Limited Availability**. If you want to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).
             * AddProduct
             * UpdateProduct
             * RemoveProduct
             * RenewSubscription
             * TermsAndConditions

            While this field is applicable, for the `updateProduct` order action, if the Pending order feature as above is not enabled, this field must not be set to null.
          format: date
          type: string
        triggerEvent:
          description: |
            Condition for the charge to become active. If this field is not specified, the value of the field will be defaulted to the trigger event value defined in the product catalog.

            If the value of this field is `SpecificDate`, use the `specificTriggerDate` field to specify the date when the charge becomes active.
          enum:
            - ContractEffective
            - ServiceActivation
            - CustomerAcceptance
            - SpecificDate
          type: string
      title: startDate
      type: object
    CreatePMPayPalECPayPalNativeEC:
      properties:
        BAID:
          description: |
            ID of a PayPal billing agreement. For example, I-1TJ3GAGG82Y9.
          type: string
        email:
          description: |
            Email address associated with the payment method. This field is required if you want to create a PayPal Express Checkout payment method or a PayPal Adaptive payment method.
          type: string
      type: object
    CreatePaymentMethodACH:
      properties:
        addressLine1:
          description: |
            First address line, 255 characters or less.
          type: string
        addressLine2:
          description: |
            Second address line, 255 characters or less.
          type: string
        bankABACode:
          description: |
            The nine-digit routing number or ABA number used by banks. This field is only required if the `type` field is set to `ACH`.
          type: string
        bankAccountName:
          description: |
            The name of the account holder, which can be either a person or a company. This field is only required if the `type` field is set to `ACH`.
          maxLength: 70
          type: string
        bankAccountNumber:
          description: |
            The bank account number associated with the ACH payment. This field is only required if the `type` field is set to `ACH`.
          maxLength: 30
          type: string
        bankAccountType:
          description: |
            The type of bank account associated with the ACH payment. This field is only required if the `type` field is set to `ACH`.
          enum:
            - BusinessChecking
            - Checking
            - Saving
          type: string
        bankName:
          description: |
            The name of the bank where the ACH payment account is held. This field is only required if the `type` field is set to `ACH`.
          maxLength: 70
          type: string
        city:
          description: |+
            City, 40 characters or less.
                
          type: string
        country:
          description: |
            Country, must be a valid country name or abbreviation.
          type: string
        phone:
          description: |
            Phone number, 40 characters or less.
          type: string
        state:
          description: |
            State, must be a valid state name or 2-character abbreviation.
          type: string
        zipCode:
          description: |
            Zip code, 20 characters or less.
          type: string
      type: object
    CreatePaymentMethodBankTransfer:
      properties:
        IBAN:
          description: |
            The International Bank Account Number. This field is used to create the SEPA payment method.
          type: string
        accountHolderInfo:
          properties:
            accountHolderName:
              description: |
                The full name of the bank account holder.
              type: string
            addressLine1:
              description: |
                The first line of the address for the account holder.
              type: string
            addressLine2:
              description: |
                The second line of the address for the account holder. 
              type: string
            city:
              description: |
                The city where the account holder stays.
              type: string
            email:
              description: |
                The email address of the account holder.
              type: string
            firstName:
              description: |
                The first name of the account holder.
              type: string
            lastName:
              description: |
                The last name of the account holder.
              type: string
            phone:
              description: |
                The phone number of the account holder.
              type: string
            state:
              description: |
                The state where the account holder stays.
              type: string
            zipCode:
              description: |
                The zip code for the address of the account holder.
              type: string
          required:
            - accountHolderName
          type: object
        accountNumber:
          description: |
            The number of the customer's bank account. Use this field for direct debit payment methods.
          type: string
        bankCode:
          description: |
            The sort code or number that identifies the bank. This is also known as the sort code. 
          type: string
        branchCode:
          description: |
            The branch code of the bank used for direct debit.  
          type: string
        businessIdentificationCode:
          description: |
            The BIC code used for SEPA.
          type: string
        currencyCode:
          description: |
            The currency used for payment method authorization.

            If this field is not specified, `currency` specified for the account is used for payment method authorization. If no currency is specified for the account, the default currency of the account is then used.
          type: string
        identityNumber:
          description: |
            The identity number used for Bank Transfer.
          type: string
      type: object
    CreatePaymentMethodCardholderInfo:
      description: |
        Container for cardholder information. If provided, Zuora will
        only use this information for this card. Otherwise, Zuora will use
        the account''s existing bill-to contact information for this card.
      properties:
        addressLine1:
          description: |
            First address line, 255 characters or less.
          type: string
        addressLine2:
          description: |
            Second address line, 255 characters or less.
          type: string
        cardHolderName:
          description: |
            The card holder's full name as it appears on the card, e.g., "John J Smith", 50 characters or less.
          type: string
        city:
          description: |
            City, 40 characters or less.
          type: string
        country:
          description: |
            Country, must be a valid country name or abbreviation.
          type: string
        email:
          description: |
            Card holder's email address, 80 characters or less.
          type: string
        phone:
          description: |
            Phone number, 40 characters or less.
          type: string
        state:
          description: |
            State; must be a valid state name or 2-character abbreviation.
          type: string
        zipCode:
          description: |
            Zip code, 20 characters or less.
          type: string
      required:
        - cardHolderName
      title: cardHolderInfo
      type: object
    CreatePaymentMethodCommon:
      properties:
        accountKey:
          description: |
            Internal ID of the customer account that will own the payment method. 

            To create an orphan payment method that is not associated with any customer account, you do not need to specify this field during creation. However, you must associate the orphan payment method with a customer account within 10 days. Otherwise, this orphan payment method will be deleted.
          type: string
        authGateway:
          description: |
            Internal ID of the payment gateway that Zuora will use to authorize the payments that are made with the payment method.

            If you do not set this field, Zuora will use one of the following payment gateways instead:

            * The default payment gateway of the customer account that owns the payment method, if the `accountKey` field is set.
            * The default payment gateway of your Zuora tenant, if the `accountKey` field is not set.
          type: string
        makeDefault:
          default: false
          description: |
            Specifies whether the payment method will be the default payment method of the customer account that owns the payment method. Only applicable if the `accountKey` field is set.
          type: boolean
      type: object
    CreatePaymentMethodCreditCard:
      properties:
        cardHolderInfo:
          $ref: "#/components/schemas/CreatePaymentMethodCardholderInfo"
        cardNumber:
          description: |
            Credit card number.
          type: string
        cardType:
          description: |
            The type of the credit card.

            Possible values include `Visa`, `MasterCard`, `AmericanExpress`, `Discover`, `JCB`, and `Diners`. For more information about credit card types supported by different payment gateways, see [Supported Payment Gateways](https://knowledgecenter.zuora.com/CB_Billing/M_Payment_Gateways/Supported_Payment_Gateways).
          type: string
        checkDuplicated:
          description: |
            Indicates whether the duplication check is performed when you create a new credit card payment method. The default value is `false`.

            With this field set to `true`, Zuora will check all active payment methods associated with the same billing account to ensure that no duplicate credit card payment methods are created. An error is returned if a duplicate payment method is found.
                    
            The following fields are used for the duplication check:
              * `cardHolderName`
              * `expirationMonth`
              * `expirationYear`
              * `creditCardMaskNumber`. It is the masked credit card number generated by Zuora. For example, `****1234`. 
          type: boolean
        expirationMonth:
          description: |
            One or two digit expiration month (1-12) of the credit card.
          type: integer
        expirationYear:
          description: |
            Four-digit expiration year of the credit card.
          type: integer
        mitConsentAgreementRef:
          description: |
            Specifies your reference for the stored credential consent agreement that you have established with the customer. Only applicable if you set the `mitProfileAction` field.
          maxLength: 128
          type: string
        mitConsentAgreementSrc:
          description: |
            Required if you set the `mitProfileAction` field.
          enum:
            - External
          type: string
        mitNetworkTransactionId:
          description: |
            Specifies the ID of a network transaction. Only applicable if you set the `mitProfileAction` field to `Persist`.
          maxLength: 128
          type: string
        mitProfileAction:
          description: |
            If you set this field, Zuora creates a stored credential profile within the payment method.

            **Note:** This feature is in the **Early Adopters** phase. We are actively soliciting feedback from a small set of early adopters before releasing as generally available.

            * `Activate` - Use this value if you are creating the stored credential profile after receiving the customer's consent.

              Zuora will create the stored credential profile then send a cardholder-initiated transaction (CIT) to the payment gateway to validate the stored credential profile. If the CIT succeeds, the status of the stored credential profile will be `Active`. If the CIT does not succeed, Zuora will not create a stored credential profile.
              
              If the payment gateway does not support the stored credential transaction framework, the status of the stored credential profile will be `Agreed`.


            * `Persist` - Use this value if the stored credential profile represents a stored credential profile in an external system. The status of the payment method's stored credential profile will be `Active`.
          enum:
            - Activate
            - Persist
          type: string
        mitProfileAgreedOn:
          description: |
            The date on which the profile is agreed. The date format is `yyyy-mm-dd`.
          format: date
          type: string
        mitProfileType:
          description: |
            Required if you set the `mitProfileAction` field. Indicates the type of the stored credential profile to process recurring or unsecheduled transactions.
          enum:
            - Recurring
            - Unscheduled
          type: string
        securityCode:
          description: |
            CVV or CVV2 security code of the credit card.

            To ensure PCI compliance, this value is not stored and cannot be queried.
          type: string
      type: object
    CreatePaymentMethodPayPalAdaptive:
      properties:
        preapprovalKey:
          description: |
            The PayPal preapproval key.
          type: string
      type: object
    CreatePaymentType:
      allOf:
        - properties:
            accountId:
              description: |
                The ID of the customer account that the payment is created for.
              type: string
            amount:
              description: |
                The total amount of the payment.
              format: double
              type: number
            authTransactionId:
              description: |
                The authorization transaction ID from the payment gateway. Use this field for electronic payments, such as credit cards.

                When capturing the authorized funds after authorization enablement, `authTransactionId` must be used together with `gatewayOrderId`.
              maxLength: 50
              type: string
            comment:
              description: |
                Additional information related to the payment.
              maxLength: 255
              minLength: 0
              type: string
            currency:
              description: |
                When Standalone Payment is not enabled, the `currency` of the payment must be the same as the payment currency defined in the customer account settings through Zuora UI.

                When Standalone Payment is enabled and `standalone` is `true`, the `currency` of the standalone payment can be different from the payment currency defined in the customer account settings. The amount will not be summed up to the account balance or key metrics regardless of currency.
              type: string
            debitMemos:
              description: |
                Container for debit memos. The maximum number of debit memos is 1,000.
              items:
                $ref: "#/components/schemas/PaymentDebitMemoApplicationCreateRequestType"
              type: array
            effectiveDate:
              description: |
                The date when the payment takes effect, in `yyyy-mm-dd` format.
              format: date
              type: string
            financeInformation:
              description: |
                Container for the finance information related to the payment.
              properties:
                bankAccountAccountingCode:
                  description: |
                    The accounting code that maps to a bank account in your accounting system.
                  maxLength: 100
                  minLength: 0
                  type: string
                transferredToAccounting:
                  description: |
                    Whether the payment was transferred to an external accounting system. Use this field for integration with accounting systems, such as NetSuite. 
                  enum:
                    - Processing
                    - Yes
                    - No
                    - Error
                    - Ignore
                  type: string
                unappliedPaymentAccountingCode:
                  description: |
                    The accounting code for the unapplied payment.
                  maxLength: 100
                  minLength: 0
                  type: string
              type: object
            gatewayId:
              description: |
                The ID of the gateway instance that processes the payment. The ID must be a valid gateway instance ID and this gateway must support the specific payment method. 

                - When creating electronic payments, this field is required. 
                - When creating external payments, this field is optional.
              type: string
            gatewayOptions:
              description: |
                The field used to pass gateway-specific parameters and parameter values.
              properties:
                key:
                  description: |
                    The name of a gateway-specific parameter.
                  maxLength: 255
                  type: string
                value:
                  description: |
                    The value of the gateway-specific parameter.
                  maxLength: 255
                  type: string
              type: object
            gatewayOrderId:
              description: |
                A merchant-specified natural key value that can be passed to the electronic payment gateway when a payment is created. If not specified, the payment number will be passed in instead.

                Gateways check duplicates on the gateway order ID to ensure that the merchant do not accidentally enter the same transaction twice. This ID can also be used to do reconciliation and tie the payment to a natural key in external systems. The source of this ID varies by merchant. Some merchants use their shopping cart order IDs, and others use something different. Merchants use this ID to track transactions in their eCommerce systems.

                When capturing the authorized funds after authorization enablement, `gatewayOrderId` must be used together with `authTransactionId`.
              maxLength: 50
              type: string
            invoices:
              description: |
                Container for invoices. The maximum number of invoices is 1,000.
              items:
                $ref: "#/components/schemas/PaymentInvoiceApplicationCreateRequestType"
              type: array
            mitTransactionSource:
              description: |
                Payment transaction source used to differentiate the transaction source in Stored Credential Transaction framework.
                  - `C_Unscheduled`: Cardholder-initiated transaction (CIT) that does not occur on scheduled or regularly occurring dates.
                  - `M_Recurring`: Merchant-initiated transaction (MIT) that occurs at regular intervals.
                  - `M_Unscheduled`: Merchant-initiated transaction (MIT) that does not occur on scheduled or regularly occurring dates.
              enum:
                - C_Unscheduled
                - M_Recurring
                - M_Unscheduled
              type: string
            paymentMethodId:
              description: |
                The unique ID of the payment method that the customer used to make the payment. 

                If no payment method ID is specified in the request body, the default payment method for the customer account is used automatically. If the default payment method is different from the type of payments that you want to create, an error occurs.
              type: string
            referenceId:
              description: |
                The transaction ID returned by the payment gateway. Use this field to reconcile payments between your gateway and Zuora Payments.
              maxLength: 100
              minLength: 0
              type: string
            softDescriptor:
              description: A payment gateway-specific field that maps to Zuora for the gateways, Orbital, Vantiv and Verifi.
              maxLength: 35
              type: string
            softDescriptorPhone:
              description: A payment gateway-specific field that maps to Zuora for the gateways, Orbital, Vantiv and Verifi.
              maxLength: 20
              type: string
            standalone:
              default: false
              description: |
                This field is only available if support for standalone payments is enabled.

                Specify `true` to create a standalone payment that will be processed in Zuora through Zuora gateway integration but will be settled outside of Zuora.

                When `standalone` is set to `true`:
                  - `accountId`, `amount`, `currency`, and `type` are required. 
                  - `type` must be `Electronic`.
                  - `currency` of the payment can be different from the payment currency in the customer account settings.
                  - The amount will not be summed up into the account balance and key metrics regardless of the payment currency.
                  - No settlement data will be created.
                  - Either the applied amount or the unapplied amount of the payment is zero.
                  - The standalone payment cannot be applied, unapplied, or transferred.

                Specify `false` to create an ordinary payment that will be created, processed, and settled in Zuora. The `currency` of an ordinary payment must be the same as the currency in the customer account settings.
              type: boolean
            type:
              description: |
                The type of the payment.
              enum:
                - External
                - Electronic
              type: string
          required:
            - amount
            - currency
            - type
          type: object
        - $ref: "#/components/schemas/PaymentObjectNSFields"
        - $ref: "#/components/schemas/PaymentObjectCustomFields"
      example:
        accountId: 4028905f5a87c0ff015a87d25ae90025
        amount: 44.1
        comment: normal payment
        currency: USD
        debitMemos:
          - amount: 4.1
            debitMemoId: 4028905f5a87c0ff015a87e49e6b0062
            items:
              - amount: 4
                debitMemoItemId: 4028905f5a87c0ff015a87e49e7a0063
              - amount: 0.1
                taxItemId: 4028905f5a87c0ff015a87e49f5e0065
        effectiveDate: 2017-03-01
        invoices:
          - amount: 40
            invoiceId: 4028905f5a87c0ff015a87d3f8f10043
            items:
              - amount: 39
                invoiceItemId: 4028905f5a87c0ff015a87d3f90c0045
              - amount: 1
                taxItemId: 4028905f5a87c0ff015a87d3f884003f
        paymentMethodId: 402881e522cf4f9b0122cf5dc4020045
        type: External
    CreateStoredCredentialProfileRequest:
      example:
        authGateway: 4028905f5702783601570291e14c0015
        consentAgreementRef: ACCT1338AgreementV1.pdf
        consentAgreementSrc: External
        status: Active
        type: Recurring
      properties:
        action:
          description: |
            Specifies how Zuora activates the stored credential profile. Only applicable if you set the `status` field to `Active`.

            * `Activate` (default) - Use this value if you are creating the stored credential profile after receiving the customer's consent.

              Zuora will create the stored credential profile then send a cardholder-initiated transaction (CIT) to the payment gateway to validate the stored credential profile. If the CIT succeeds, the status of the stored credential profile will be `Active`. If the CIT does not succeed, Zuora will not create a stored credential profile.
              
              If the payment gateway does not support the stored credential transaction framework, the status of the stored credential profile will be `Agreed`.


            * `Persist` - Use this value if the stored credential profile represents a stored credential profile in an external system. The status of the payment method's stored credential profile will be `Active`.
          enum:
            - Activate
            - Persist
          type: string
        agreedOn:
          description: |
            The date on which the profile is agreed. The date format is `yyyy-mm-dd`.
          format: date
          type: string
        authGateway:
          description: |
            Specifies the ID of the payment gateway that Zuora will use when activating the stored credential profile.
          type: string
        cardSecurityCode:
          description: |
            The security code of the credit card.
          type: string
        consentAgreementRef:
          description: |
            Specifies your reference for the consent agreement that you have established with the customer.
          maxLength: 128
          type: string
        consentAgreementSrc:
          enum:
            - External
          type: string
        networkTransactionId:
          description: |
            The ID of a network transaction.
          maxLength: 128
          type: string
        status:
          description: |
            Specifies the status of the stored credential profile.

            * `Active` - Use this value if you are creating the stored credential profile after receiving the customer's consent, or if the stored credential profile represents a stored credential profile in an external system.

              You can use the `action` field to specify how Zuora activates the stored credential profile.


            * `Agreed` - Use this value if you are migrating the payment method to the stored credential transaction framework.

              In this case, Zuora will not send a cardholder-initiated transaction (CIT) to the payment gateway to validate the stored credential profile.
          enum:
            - Agreed
            - Active
          type: string
        type:
          enum:
            - Recurring
            - Unscheduled
          type: string
      required:
        - status
        - type
        - consentAgreementSrc
      type: object
    CreateSubscription:
      description: |
        Information about an order action of type `CreateSubscription`.
      properties:
        invoiceSeparately:
          description: |
            Specifies whether the subscription appears on a separate invoice when Zuora generates invoices.
          type: boolean
        newSubscriptionOwnerAccount:
          description: |
            Information about a new account that will own the subscription. Only available if you have enabled the Owner Transfer feature.

            **Note:** The Owner Transfer feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).

            If you do not set this field or the `subscriptionOwnerAccountNumber` field, the account that owns the order will also own the subscription. Zuora will return an error if you set this field and the `subscriptionOwnerAccountNumber` field.
          properties:
            accountNumber:
              description: |
                Account number. For example, A00000001.
              maxLength: 70
              type: string
            autoPay:
              description: |
                Specifies whether future payments are automatically billed when they are due.
              type: boolean
            batch:
              description: |
                Name of the billing batch that the account belongs to. For example, Batch1.
              type: string
            billCycleDay:
              description: |
                Day of the month that the account prefers billing periods to begin on. If set to 0, the bill cycle day will be set as "AutoSet".
              maximum: 31
              minimum: 0
              type: integer
            billToContact:
              $ref: "#/components/schemas/BillToContact"
            communicationProfileId:
              description: |
                Internal identifier of the communication profile that Zuora uses when sending notifications to the account's contacts.
              type: string
            creditCard:
              $ref: "#/components/schemas/creditCard"
            crmId:
              description: |
                External identifier of the account in a CRM system.
              maxLength: 100
              type: string
            currency:
              description: |
                ISO 3-letter currency code (uppercase). For example, USD.
              type: string
            customFields:
              $ref: "#/components/schemas/AccountObjectCustomFields"
            hpmCreditCardPaymentMethodId:
              description: |
                The ID of the payment method associated with this account. The payment method specified for this field will be set as the default payment method of the account.

                If the `autoPay` field is set to `true`, you must provide the credit card payment method ID for either this field or the `creditCard` field,
                but not both.        
              type: string
            invoiceDeliveryPrefsEmail:
              description: |
                Specifies whether to turn on the invoice delivery method 'Email' for the new account. 
                Values are: 

                * `true` (default). Turn on the invoice delivery method 'Email' for the new account.
                * `false`. Turn off the invoice delivery method 'Email' for the new account.         
              type: boolean
            invoiceDeliveryPrefsPrint:
              description: |
                Specifies whether to turn on the invoice delivery method 'Print' for the new account.
                Values are: 

                * `true`. Turn on the invoice delivery method 'Print' for the new account.
                * `false` (default). Turn off the invoice delivery method 'Print' for the new account.
              type: boolean
            invoiceTemplateId:
              description: |
                Internal identifier of the invoice template that Zuora uses when generating invoices for the account.
              type: string
            name:
              description: |
                Account name.
              maxLength: 70
              type: string
            notes:
              description: |
                Notes about the account. These notes are only visible to Zuora users.
              maxLength: 65535
              type: string
            parentId:
              description: Identifier of the parent customer account for this Account object. Use this field if you have customer hierarchy enabled.
              type: string
            paymentGateway:
              description: |
                The payment gateway that Zuora uses when processing electronic payments and refunds for the account. If you do not specify this field or if the value of this field is null, Zuora uses your default payment gateway.
              maxLength: 40
              type: string
            paymentMethod:
              $ref: "#/components/schemas/PaymentMethod"
            paymentTerm:
              description: |
                Name of the payment term associated with the account. For example, "Net 30". The payment term determines the due dates of invoices.
              type: string
            soldToContact:
              $ref: "#/components/schemas/SoldToContact"
            taxInfo:
              $ref: "#/components/schemas/TaxInfo"
          required:
            - name
            - currency
            - billCycleDay
            - billToContact
          type: object
        notes:
          description: |
            Notes about the subscription. These notes are only visible to Zuora users.
          maxLength: 500
          type: string
        subscribeToRatePlans:
          description: |
            List of rate plans associated with the subscription.
          items:
            $ref: "#/components/schemas/RatePlanOverride"
          type: array
        subscriptionNumber:
          description: |
            Subscription number of the subscription. For example, A-S00000001.

            If you do not set this field, Zuora will generate the subscription number.
          maxLength: 100
          type: string
        subscriptionOwnerAccountNumber:
          description: |
            Account number of an existing account that will own the subscription. For example, A00000001.

            If you do not set this field or the `newSubscriptionOwnerAccount` field, the account that owns the order will also own the subscription. Zuora will return an error if you set this field and the `newSubscriptionOwnerAccount` field.
          maxLength: 70
          type: string
        terms:
          description: |
            Container for the terms and renewal settings of the subscription.
          properties:
            autoRenew:
              description: |
                Specifies whether the subscription automatically renews at the end of the each term. Only applicable if the type of the first term is `TERMED`.
              type: boolean
            initialTerm:
              description: |
                Information about the first term of the subscription.
              properties:
                period:
                  description: |
                    Duration of the first term in months, years, days, or weeks, depending on the value of the `periodType` field. Only applicable if the value of the `termType` field is `TERMED`.
                  type: integer
                periodType:
                  description: |
                    Unit of time that the first term is measured in. Only applicable if the value of the `termType` field is `TERMED`.
                  enum:
                    - Month
                    - Year
                    - Day
                    - Week
                  type: string
                startDate:
                  description: |
                    Start date of the first term, in YYYY-MM-DD format.
                  format: date
                  type: string
                termType:
                  description: |
                    Type of the first term. If the value of this field is `TERMED`, the first term has a predefined duration based on the value of the `period` field. If the value of this field is `EVERGREEN`, the first term does not have a predefined duration.
                  enum:
                    - TERMED
                    - EVERGREEN
                  type: string
              required:
                - termType
              type: object
            renewalSetting:
              description: |
                Specifies the type of the terms that follow the first term if the subscription is renewed. Only applicable if the type of the first term is `TERMED`.

                * `RENEW_WITH_SPECIFIC_TERM` - Each renewal term has a predefined duration. The first entry in `renewalTerms` specifies the duration of the second term of the subscription, the second entry in `renewalTerms` specifies the duration of the third term of the subscription, and so on. The last entry in `renewalTerms` specifies the ultimate duration of each renewal term.
                * `RENEW_TO_EVERGREEN` - The second term of the subscription does not have a predefined duration.
              enum:
                - RENEW_WITH_SPECIFIC_TERM
                - RENEW_TO_EVERGREEN
              type: string
            renewalTerms:
              description: |
                List of renewal terms of the subscription. Only applicable if the type of the first term is `TERMED` and the value of the `renewalSetting` field is `RENEW_WITH_SPECIFIC_TERM`.
              items:
                $ref: "#/components/schemas/RenewalTerm"
              type: array
          required:
            - initialTerm
            - renewalTerms
          type: object
      title: createSubscription
      type: object
    CreateSubscriptionForEvergreen:
      description: |
        Information about an order action of type `CreateSubscription`.
      properties:
        invoiceSeparately:
          description: |
            Specifies whether the subscription appears on a separate invoice when Zuora generates invoices.
          type: boolean
        newSubscriptionOwnerAccount:
          description: |
            Information about a new account that will own the subscription. Only available if you have enabled the Owner Transfer feature.

            **Note:** The Owner Transfer feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).

            If you do not set this field or the `subscriptionOwnerAccountNumber` field, the account that owns the order will also own the subscription. Zuora will return an error if you set this field and the `subscriptionOwnerAccountNumber` field.
          properties:
            accountNumber:
              description: |
                Account number. For example, A00000001.
              maxLength: 70
              type: string
            autoPay:
              description: |
                Specifies whether future payments are automatically billed when they are due.
              type: boolean
            batch:
              description: |
                Name of the billing batch that the account belongs to. For example, Batch1.
              type: string
            billCycleDay:
              description: |
                Day of the month that the account prefers billing periods to begin on. If set to 0, the bill cycle day will be set as "AutoSet".
              maximum: 31
              minimum: 0
              type: integer
            billToContact:
              $ref: "#/components/schemas/BillToContact"
            communicationProfileId:
              description: |
                Internal identifier of the communication profile that Zuora uses when sending notifications to the account's contacts.
              type: string
            creditCard:
              $ref: "#/components/schemas/creditCard"
            crmId:
              description: |
                External identifier of the account in a CRM system.
              maxLength: 100
              type: string
            currency:
              description: |
                ISO 3-letter currency code (uppercase). For example, USD.
              type: string
            customFields:
              $ref: "#/components/schemas/AccountObjectCustomFields"
            hpmCreditCardPaymentMethodId:
              description: |
                The ID of the payment method associated with this account. The payment method specified for this field will be set as the default payment method of the account.

                If the `autoPay` field is set to `true`, you must provide the credit card payment method ID for either this field or the `creditCard` field,
                but not both.  
              type: string
            invoiceDeliveryPrefsEmail:
              description: |
                Specifies whether to turn on the invoice delivery method 'Email' for the new account. 
                Values are: 

                * `true` (default). Turn on the invoice delivery method 'Email' for the new account.
                * `false`. Turn off the invoice delivery method 'Email' for the new account.         
              type: boolean
            invoiceDeliveryPrefsPrint:
              description: |
                Specifies whether to turn on the invoice delivery method 'Print' for the new account.
                Values are: 

                * `true`. Turn on the invoice delivery method 'Print' for the new account.
                * `false` (default). Turn off the invoice delivery method 'Print' for the new account.
              type: boolean
            invoiceTemplateId:
              description: |
                Internal identifier of the invoice template that Zuora uses when generating invoices for the account.
              type: string
            name:
              description: |
                Account name.
              maxLength: 70
              type: string
            notes:
              description: |
                Notes about the account. These notes are only visible to Zuora users.
              maxLength: 65535
              type: string
            parentId:
              description: Identifier of the parent customer account for this Account object. Use this field if you have customer hierarchy enabled.
              type: string
            paymentGateway:
              description: |
                The payment gateway that Zuora uses when processing electronic payments and refunds for the account. If you do not specify this field or if the value of this field is null, Zuora uses your default payment gateway.
              maxLength: 40
              type: string
            paymentMethod:
              $ref: "#/components/schemas/PaymentMethod"
            paymentTerm:
              description: |
                Name of the payment term associated with the account. For example, "Net 30". The payment term determines the due dates of invoices.
              type: string
            soldToContact:
              $ref: "#/components/schemas/SoldToContact"
            taxInfo:
              $ref: "#/components/schemas/TaxInfo"
          required:
            - name
            - currency
            - billCycleDay
            - billToContact
          type: object
        notes:
          description: |
            Notes about the subscription. These notes are only visible to Zuora users.
          maxLength: 500
          type: string
        subscribeToRatePlans:
          description: |
            List of rate plans associated with the subscription.
          items:
            $ref: "#/components/schemas/RatePlanOverrideForEvergreen"
          type: array
        subscriptionNumber:
          description: |
            Subscription number of the subscription. For example, A-S00000001.

            If you do not set this field, Zuora will generate the subscription number.
          maxLength: 100
          type: string
        subscriptionOwnerAccountNumber:
          description: |
            Account number of an existing account that will own the subscription. For example, A00000001.

            If you do not set this field or the `newSubscriptionOwnerAccount` field, the account that owns the order will also own the subscription. Zuora will return an error if you set this field and the `newSubscriptionOwnerAccount` field.
          maxLength: 70
          type: string
        terms:
          description: |
            Container for the terms and renewal settings of the subscription.
          properties:
            autoRenew:
              description: |
                Specifies whether the subscription automatically renews at the end of the each term. Only applicable if the type of the first term is `TERMED`.
              type: boolean
            initialTerm:
              description: |
                Information about the first term of the subscription.
              properties:
                period:
                  description: |
                    Duration of the first term in months, years, days, or weeks, depending on the value of the `periodType` field. Only applicable if the value of the `termType` field is `TERMED`.
                  type: integer
                periodType:
                  description: |
                    Unit of time that the first term is measured in. Only applicable if the value of the `termType` field is `TERMED`.
                  enum:
                    - Month
                    - Year
                    - Day
                    - Week
                  type: string
                startDate:
                  description: |
                    Start date of the first term, in YYYY-MM-DD format.
                  format: date
                  type: string
                termType:
                  description: |
                    Type of the first term. If the value of this field is `TERMED`, the first term has a predefined duration based on the value of the `period` field. If the value of this field is `EVERGREEN`, the first term does not have a predefined duration.
                  enum:
                    - TERMED
                    - EVERGREEN
                  type: string
              required:
                - termType
              type: object
            renewalSetting:
              description: |
                Specifies the type of the terms that follow the first term if the subscription is renewed. Only applicable if the type of the first term is `TERMED`.

                * `RENEW_WITH_SPECIFIC_TERM` - Each renewal term has a predefined duration. The first entry in `renewalTerms` specifies the duration of the second term of the subscription, the second entry in `renewalTerms` specifies the duration of the third term of the subscription, and so on. The last entry in `renewalTerms` specifies the ultimate duration of each renewal term.
                * `RENEW_TO_EVERGREEN` - The second term of the subscription does not have a predefined duration.
              enum:
                - RENEW_WITH_SPECIFIC_TERM
                - RENEW_TO_EVERGREEN
              type: string
            renewalTerms:
              description: |
                List of renewal terms of the subscription. Only applicable if the type of the first term is `TERMED` and the value of the `renewalSetting` field is `RENEW_WITH_SPECIFIC_TERM`.
              items:
                $ref: "#/components/schemas/RenewalTerm"
              type: array
          required:
            - initialTerm
            - renewalTerms
          type: object
      title: createSubscription
      type: object
    CreditBalanceAdjustmentObjectCustomFields:
      additionalProperties:
        description: |
          Custom fields of the Credit Balance Adjustment object. The name of each custom field has the form <code>*customField*__c</code>. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
      description: |
        Container for custom fields of a Credit Balance Adjustment object.
      title: creditBalanceAdjustmentFieldsCustom
      type: object
    CreditBalanceAdjustmentObjectNSFields:
      description: |
        Container for Credit Balance Adjustment fields provided by the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
      properties:
        IntegrationId__NS:
          description: |
            ID of the corresponding object in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        IntegrationStatus__NS:
          description: |
            Status of the credit balance adjustment's synchronization with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        SyncDate__NS:
          description: |
            Date when the credit balance adjustment was sychronized with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
      title: creditBalanceAdjustmentFieldsNS
      type: object
    CreditMemoApplyDebitMemoItemRequestType:
      properties:
        amount:
          description: |
            The amount that is applied to the specific item. 
          format: double
          type: number
        creditMemoItemId:
          description: |
            The ID of the credit memo item.
          type: string
        creditTaxItemId:
          description: |
            The ID of the credit memo taxation item.
          type: string
        debitMemoItemId:
          description: |
            The ID of the debit memo item that the credit memo item is applied to.
          type: string
        taxItemId:
          description: |
            The ID of the debit memo taxation item that the credit memo taxation item is applied to.
          type: string
      required:
        - amount
      title: items
      type: object
    CreditMemoApplyDebitMemoRequestType:
      properties:
        amount:
          description: |
            The credit memo amount to be applied to the debit memo.
          format: double
          type: number
        debitMemoId:
          description: |
            The unique ID of the debit memo that the credit memo is applied to.
          type: string
        items:
          description: |
            Container for items. The maximum number of items is 1,000.
          items:
            $ref: "#/components/schemas/CreditMemoApplyDebitMemoItemRequestType"
          type: array
      required:
        - amount
        - debitMemoId
      title: debitMemos
      type: object
    CreditMemoApplyInvoiceItemRequestType:
      properties:
        amount:
          description: |
            The amount that is applied to the specific item. 
          format: double
          type: number
        creditMemoItemId:
          description: |
            The ID of the credit memo item.
          type: string
        creditTaxItemId:
          description: |
            The ID of the credit memo taxation item.
          type: string
        invoiceItemId:
          description: |
            The ID of the invoice item that the credit memo item is applied to.
          type: string
        taxItemId:
          description: |
            The ID of the invoice taxation item that the credit memo taxation item is applied to.
          type: string
      required:
        - amount
      title: items
      type: object
    CreditMemoApplyInvoiceRequestType:
      properties:
        amount:
          description: |
            The credit memo amount to be applied to the invoice.
          format: double
          type: number
        invoiceId:
          description: |
            The unique ID of the invoice that the credit memo is applied to.
          type: string
        items:
          description: |
            Container for items. The maximum number of items is 1,000.
          items:
            $ref: "#/components/schemas/CreditMemoApplyInvoiceItemRequestType"
          type: array
      required:
        - amount
        - invoiceId
      title: invoices
      type: object
    CreditMemoEntityPrefix:
      description: |
        Container for the prefix and starting document number of credit memos.

        **Note:** This field is only available if you have the Invoice Settlement feature enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
      properties:
        prefix:
          description: |
            The prefix of credit memos.
          example: CM
          type: string
        startNumber:
          description: |
            The starting document number of credit memos.
          example: 10
          type: integer
      title: creditMemo
      type: object
    CreditMemoFromChargeDetailType:
      allOf:
        - properties:
            amount:
              description: |
                The amount of the credit memo item.

                **Note**: This field is only available if you set the `zuora-version` request header to `224.0` or later.
              format: double
              type: number
            chargeId:
              description: |
                The ID of the product rate plan charge that the credit memo is created from.

                **Note**: This field is not available if you set the `zuora-version` request header to `257.0` or later.
              type: string
            comment:
              description: |
                Comments about the product rate plan charge.

                **Note**: This field is not available if you set the `zuora-version` request header to `257.0` or later.
              maxLength: 255
              minLength: 0
              type: string
            description:
              description: |
                The description of the product rate plan charge.

                **Note**: This field is only available if you set the `zuora-version` request header to `257.0` or later.
              maxLength: 255
              minLength: 0
              type: string
            financeInformation:
              description: |
                Container for the finance information related to the product rate plan charge associated with the credit memo.
              properties:
                deferredRevenueAccountingCode:
                  description: |
                    The accounting code for the deferred revenue, such as Monthly Recurring Liability.
                  maxLength: 100
                  minLength: 0
                  type: string
                onAccountAccountingCode:
                  description: |
                    The accounting code that maps to an on account in your accounting system.
                  maxLength: 100
                  minLength: 0
                  type: string
                recognizedRevenueAccountingCode:
                  description: |
                    The accounting code for the recognized revenue, such as Monthly Recurring Charges or Overage Charges.
                  maxLength: 100
                  minLength: 0
                  type: string
                revenueRecognitionRuleName:
                  description: |
                    The name of the revenue recognition rule governing the revenue schedule.
                  maxLength: 100
                  minLength: 0
                  type: string
              type: object
            memoItemAmount:
              description: |
                The amount of the credit memo item.

                **Note**: This field is not available if you set the `zuora-version` request header to `224.0` or later.
              format: double
              type: number
            productRatePlanChargeId:
              description: |
                The ID of the product rate plan charge that the credit memo is created from.

                **Note**: This field is only available if you set the `zuora-version` request header to `257.0` or later.
              type: string
            quantity:
              description: |
                The number of units for the credit memo item.
              format: double
              type: number
            serviceEndDate:
              description: |
                The service end date of the credit memo item. If not specified, the effective end date of the corresponding product rate plan will be used.
              format: date
              type: string
            serviceStartDate:
              description: |
                The service start date of the credit memo item. If not specified, the effective start date of the corresponding product rate plan will be used.
              format: date
              type: string
          required:
            - chargeId
            - productRatePlanChargeId
          type: object
        - $ref: "#/components/schemas/CreditMemoItemObjectCustomFields"
      title: charges
    CreditMemoFromChargeType:
      allOf:
        - properties:
            accountId:
              description: |
                The ID of the account associated with the credit memo.
              type: string
            autoPost:
              default: false
              description: |
                Whether to automatically post the credit memo after it is created. 

                Setting this field to `true`, you do not need to separately call the [Post a credit memo](https://www.zuora.com/developer/api-reference/#operation/PUT_PostCreditMemo) operation to post the credit memo.
              type: boolean
            charges:
              description: |
                Container for product rate plan charges. The maximum number of items is 1,000.
              items:
                $ref: "#/components/schemas/CreditMemoFromChargeDetailType"
              maxItems: 1000
              type: array
            comment:
              description: |
                Comments about the credit memo.
              type: string
            effectiveDate:
              description: |
                The date when the credit memo takes effect.
              format: date
              type: string
            reasonCode:
              description: |
                A code identifying the reason for the transaction. The value must be an existing reason code or empty. If you do not specify a value, Zuora uses the default reason code.
              type: string
          required:
            - accountId
          type: object
        - $ref: "#/components/schemas/CreditMemoObjectNSFields"
        - $ref: "#/components/schemas/CreditMemoObjectCustomFields"
      example:
        accountId: 402890555a7e9791015a7f15fe44001c
        autoPost: false
        charges:
          - amount: null
            chargeId: 402890555a87d7f5015a88c613c5001e
            comment: this is comment1
            quantity: 1
            serviceEndDate: 2018-10-17
            serviceStartDate: 2017-10-17
          - amount: 20
            chargeId: 402890555a7d4022015a7d90906b0067
            comment: this is comment2
            serviceEndDate: 2018-10-17
            serviceStartDate: 2017-10-17
        comment: the comment
        effectiveDate: 2017-10-17
        reasonCode: Correcting invoice error
    CreditMemoFromInvoiceType:
      allOf:
        - properties:
            autoApplyToInvoiceUponPosting:
              description: |
                Whether the credit memo automatically applies to the invoice upon posting.
              type: boolean
            autoPost:
              default: false
              description: |
                Whether to automatically post the credit memo after it is created. 

                Setting this field to `true`, you do not need to separately call the [Post credit memo](https://www.zuora.com/developer/api-reference/#operation/PUT_PostCreditMemo) operation to post the credit memo.
              type: boolean
            comment:
              description: |
                Comments about the credit memo.
              maxLength: 255
              minLength: 0
              type: string
            effectiveDate:
              description: |
                The date when the credit memo takes effect.
              format: date
              type: string
            excludeFromAutoApplyRules:
              description: |
                Whether the credit memo is excluded from the rule of automatically applying credit memos to invoices.
              type: boolean
            invoiceId:
              description: |
                The ID of the invoice that the credit memo is created from.

                * If this field is specified, its value must be the same as the value of the `invoiceId` path parameter. Otherwise, its value overrides the value of the `invoiceId` path parameter. 
                * If this field is not specified, the value of the `invoiceId` path parameter is used. 
              type: string
            items:
              description: |
                Container for items. The maximum number of items is 1,000.
              items:
                $ref: "#/components/schemas/CreditMemoItemFromInvoiceItemType"
              maxItems: 1000
              type: array
            reasonCode:
              description: |
                A code identifying the reason for the transaction. The value must be an existing reason code or empty. If you do not specify a value, Zuora uses the default reason code.
              type: string
            taxAutoCalculation:
              default: true
              description: |
                Whether to automatically calculate taxes in the credit memo.
              type: boolean
          type: object
        - $ref: "#/components/schemas/CreditMemoObjectNSFields"
        - $ref: "#/components/schemas/CreditMemoObjectCustomFields"
      example:
        autoApplyToInvoiceUponPosting: false
        autoPost: false
        comment: the comment
        effectiveDate: 2016-11-30
        excludeFromAutoApplyRules: false
        items:
          - amount: 1
            comment: This is comment!
            invoiceItemId: 4028905558b483220158b48983dd0015
            quantity: 1
            serviceEndDate: 2016-11-30
            serviceStartDate: 2016-11-01
            skuName: SKU-30
            taxItems:
              - amount: 0.01
                jurisdiction: CALIFORNIA
                locationCode: "06"
                sourceTaxItemId: 4028905558b483220158b48983150010
                taxCode: null
                taxCodeDescription: This is tax code description!
                taxDate: 2016-11-30
                taxExemptAmount: 0
                taxName: STATE TAX
                taxRate: 0.0625
                taxRateDescription: This is tax rate description!
                taxRateType: Percentage
            taxMode: TaxExclusive
            unitOfMeasure: Test_UOM
        reasonCode: Write-off
    CreditMemoItemFromInvoiceItemType:
      allOf:
        - properties:
            amount:
              description: |
                The amount of the credit memo item.
              format: double
              type: number
            comment:
              description: |
                Comments about the credit memo item.

                **Note**: This field is not available if you set the `zuora-version` request header to `257.0` or later.
              type: string
            description:
              description: |
                The description of the credit memo item.

                **Note**: This field is only available if you set the `zuora-version` request header to `257.0` or later.
              type: string
            financeInformation:
              description: |
                Container for the finance information related to the credit memo item.
              properties:
                deferredRevenueAccountingCode:
                  description: |
                    The accounting code for the deferred revenue, such as Monthly Recurring Liability.
                  maxLength: 100
                  minLength: 0
                  type: string
                onAccountAccountingCode:
                  description: |
                    The accounting code that maps to an on account in your accounting system.
                  maxLength: 100
                  minLength: 0
                  type: string
                recognizedRevenueAccountingCode:
                  description: |
                    The accounting code for the recognized revenue, such as Monthly Recurring Charges or Overage Charges.
                  maxLength: 100
                  minLength: 0
                  type: string
                revenueRecognitionRuleName:
                  description: |
                    The name of the revenue recognition rule governing the revenue schedule.
                  maxLength: 100
                  minLength: 0
                  type: string
              type: object
            invoiceItemId:
              description: |
                The ID of the invoice item.
              type: string
            quantity:
              description: |
                The number of units for the credit memo item.
              format: double
              type: number
            serviceEndDate:
              description: |
                The service end date of the credit memo item.
              format: date
              type: string
            serviceStartDate:
              description: |
                The service start date of the credit memo item.
              format: date
              type: string
            skuName:
              description: |
                The name of the charge associated with the invoice.
              type: string
            taxItems:
              description: |
                Container for taxation items.
              items:
                $ref: "#/components/schemas/CreditMemoTaxItemFromInvoiceTaxItemType"
              type: array
            taxMode:
              default: TaxExclusive
              description: |
                The tax mode of the credit memo item, indicating whether the amount of the credit memo item includes tax.

                **Note**: You can set this field to `TaxInclusive` only if the `taxAutoCalculation` field is set to `true`.

                If you set `taxMode` to `TaxInclusive`, you cannot input tax amounts for credit memo items. The corresponding invoice item must use the same tax engine as the credit memo item to calculate tax amounts.
              enum:
                - TaxExclusive
                - TaxInclusive
              type: string
            unitOfMeasure:
              description: |
                The definable unit that you measure when determining charges.
              type: string
          required:
            - skuName
            - amount
          type: object
        - $ref: "#/components/schemas/CreditMemoItemObjectCustomFields"
      title: items
    CreditMemoItemFromWriteOffInvoice:
      allOf:
        - properties:
            comment:
              description: |
                Comments about the credit memo item.
              type: string
            financeInformation:
              description: |
                Container for the finance information related to the credit memo item.
              properties:
                deferredRevenueAccountingCode:
                  description: |
                    The accounting code for the deferred revenue, such as Monthly Recurring Liability.
                  maxLength: 100
                  minLength: 0
                  type: string
                onAccountAccountingCode:
                  description: |
                    The accounting code that maps to an on account in your accounting system.
                  maxLength: 100
                  minLength: 0
                  type: string
                recognizedRevenueAccountingCode:
                  description: |
                    The accounting code for the recognized revenue, such as Monthly Recurring Charges or Overage Charges.
                  maxLength: 100
                  minLength: 0
                  type: string
                revenueRecognitionRuleName:
                  description: |
                    The name of the revenue recognition rule governing the revenue schedule.
                  maxLength: 100
                  minLength: 0
                  type: string
              type: object
            invoiceItemId:
              description: |
                The ID of the invoice item.
              type: string
            serviceEndDate:
              description: |
                The service end date of the credit memo item. 
              format: date
              type: string
            serviceStartDate:
              description: |
                The service start date of the credit memo item. 
              format: date
              type: string
            skuName:
              description: |
                The name of the charge associated with the invoice.
              type: string
            unitOfMeasure:
              description: |
                The definable unit that you measure when determining charges.
              type: string
          type: object
        - $ref: "#/components/schemas/CreditMemoItemObjectCustomFields"
      title: items
    CreditMemoItemObjectCustomFields:
      additionalProperties:
        description: |
          Custom fields of the Credit Memo Item object. The name of each custom field has the form <code>*customField*__c</code>. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
      description: |
        Container for custom fields of a Credit Memo Item object.
      title: creditMemoItemFieldsCustom
      type: object
    CreditMemoObjectCustomFields:
      additionalProperties:
        description: |
          Custom fields of the Credit Memo object. The name of each custom field has the form <code>*customField*__c</code>. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
      description: |
        Container for custom fields of a Credit Memo object.
      title: creditMemoFieldsCustom
      type: object
    CreditMemoObjectNSFields:
      description: |
        Container for Credit Memo fields provided by the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
      properties:
        IntegrationId__NS:
          description: |
            ID of the corresponding object in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        IntegrationStatus__NS:
          description: |
            Status of the credit memo's synchronization with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        Origin__NS:
          description: |
            Origin of the corresponding object in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        SyncDate__NS:
          description: |
            Date when the credit memo was synchronized with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        Transaction__NS:
          description: |
            Related transaction in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
      title: creditMemoFieldsNS
      type: object
    CreditMemoResponseType:
      properties:
        id:
          description: |
            The ID of the generated credit memo.
          type: string
      title: creditMemos
      type: object
    CreditMemoTaxItemFromInvoiceTaxItemType:
      properties:
        amount:
          description: |
            The amount of the credit memo taxation item.
          format: double
          type: number
        financeInformation:
          description: |
            Container for the finance information related to the source taxation item.
          properties:
            onAccountAccountingCode:
              description: |
                The accounting code that maps to an on account in your accounting system.
              maxLength: 100
              minLength: 0
              type: string
            salesTaxPayableAccountingCode:
              description: |
                The accounting code for the sales taxes payable.
              maxLength: 100
              minLength: 0
              type: string
          type: object
        jurisdiction:
          description: |
            The jurisdiction that applies the tax or VAT. This value is typically a state, province, county, or city. 
          type: string
        locationCode:
          description: |
            The identifier for the location based on the value of the `taxCode` field.
          type: string
        sourceTaxItemId:
          description: |
            The ID of the source taxation item.
          type: string
        taxCode:
          description: |
            The tax code identifies which tax rules and tax rates to apply to a specific credit memo. 
          type: string
        taxCodeDescription:
          description: |
            The description of the tax code.
          type: string
        taxDate:
          description: |
            The date that the tax is applied to the credit memo, in `yyyy-mm-dd` format.
          format: date
          type: string
        taxExemptAmount:
          description: |
            The amount of taxes or VAT for which the customer has an exemption.
          format: double
          type: number
        taxName:
          description: |
            The name of taxation.
          type: string
        taxRate:
          description: |
            The tax rate applied to the credit memo.
          format: double
          type: number
        taxRateDescription:
          description: |
            The description of the tax rate. 
          type: string
        taxRateType:
          description: |
            The type of the tax rate applied to the credit memo. 
          enum:
            - Percentage
            - FlatFee
          type: string
      title: taxItems
      type: object
    CreditMemoUnapplyDebitMemoItemRequestType:
      properties:
        amount:
          description: |
            The amount that is unapplied from the specific item. 
          format: double
          type: number
        creditMemoItemId:
          description: |
            The ID of the credit memo item.
          type: string
        creditTaxItemId:
          description: |
            The ID of the credit memo taxation item.
          type: string
        debitMemoItemId:
          description: |
            The ID of the debit memo item that the credit memo item is unapplied from.
          type: string
        taxItemId:
          description: |
            The ID of the debit memo taxation item that the credit memo taxation item is unapplied from.
          type: string
      required:
        - amount
      title: items
      type: object
    CreditMemoUnapplyDebitMemoRequestType:
      properties:
        amount:
          description: |
            The credit memo amount to be unapplied from the debit memo.
          format: double
          type: number
        debitMemoId:
          description: |
            The unique ID of the debit memo that the credit memo is unapplied from.
          type: string
        items:
          description: |
            Container for items. The maximum number of items is 1,000.
          items:
            $ref: "#/components/schemas/CreditMemoUnapplyDebitMemoItemRequestType"
          type: array
      required:
        - amount
        - debitMemoId
      title: debitMemos
      type: object
    CreditMemoUnapplyInvoiceItemRequestType:
      properties:
        amount:
          description: |
            The amount that is unapplied from the specific item. 
          format: double
          type: number
        creditMemoItemId:
          description: |
            The ID of the credit memo item.
          type: string
        creditTaxItemId:
          description: |
            The ID of the credit memo taxation item.
          type: string
        invoiceItemId:
          description: |
            The ID of the invoice item that the credit memo item is unapplied from.
          type: string
        taxItemId:
          description: |
            The ID of the invoice taxation item that the credit memo taxation item is unapplied from.
          type: string
      required:
        - amount
      title: items
      type: object
    CreditMemoUnapplyInvoiceRequestType:
      properties:
        amount:
          description: |
            The credit memo amount to be unapplied from the invoice.
          format: double
          type: number
        invoiceId:
          description: |
            The unique ID of the invoice that the credit memo is unapplied from.
          type: string
        items:
          description: |
            Container for items. The maximum number of items is 1,000.
          items:
            $ref: "#/components/schemas/CreditMemoUnapplyInvoiceItemRequestType"
          type: array
      required:
        - amount
        - invoiceId
      title: invoices
      type: object
    CreditTaxationItemObjectCustomFields:
      additionalProperties:
        description: |
          Custom fields of the Credit Taxation Item object. The name of each custom field has the form <code>*customField*__c</code>. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
      description: |
        Container for custom fields of a Credit Taxation Item object.
      title: creditTaxationItemFieldsCustom
      type: object
    CustomObjectAllFieldsDefinition:
      allOf:
        - properties:
            CreatedById:
              description: The `CreatedById` field definition
              properties:
                format:
                  description: The field data format
                  enum:
                    - uuid
                  type: string
                label:
                  description: The UI name of the field
                  type: string
                origin:
                  description: Specifies whether the field is a system field or a custom field
                  enum:
                    - system
                  type: string
                type:
                  description: The field data type
                  enum:
                    - string
                  type: string
              type: object
            CreatedDate:
              description: The `CreatedDate` field definition
              properties:
                format:
                  description: The field data format
                  enum:
                    - date-time
                  type: string
                origin:
                  description: Specifies the field is a system field
                  enum:
                    - system
                  type: string
                type:
                  description: The field data type
                  enum:
                    - string
                  type: string
              type: object
            Id:
              description: The `Id` field definition
              properties:
                format:
                  description: The field data format
                  enum:
                    - uuid
                  type: string
                label:
                  description: The UI name of the field
                  type: string
                origin:
                  description: Specifies whether the field is a system field or a custom field
                  enum:
                    - system
                  type: string
                type:
                  description: The field data type
                  enum:
                    - string
                  type: string
              type: object
            UpdatedById:
              description: The `UpdatedById` field definition
              properties:
                format:
                  description: The field data format
                  enum:
                    - uuid
                  type: string
                label:
                  description: The UI name of the field
                  type: string
                origin:
                  description: Specifies whether the field is a system field or a custom field
                  enum:
                    - system
                  type: string
                type:
                  description: The field data type
                  enum:
                    - string
                  type: string
              type: object
            UpdatedDate:
              description: The `UpdatedDate` field definition
              properties:
                format:
                  description: The field data format
                  enum:
                    - date-time
                  type: string
                origin:
                  description: Specifies the field is a system field
                  enum:
                    - system
                  type: string
                type:
                  description: The field data type
                  enum:
                    - string
                  type: string
              type: object
          type: object
        - $ref: "#/components/schemas/CustomObjectCustomFieldsDefinition"
      description: The definitions of all the fields in the custom object definition
      title: customObjectFieldDefinition
    CustomObjectBulkDeleteFilter:
      description: Filters to determine which records to be deleted in the bulk delete operation.
      properties:
        conditions:
          description: Group of field filter conditions that are evaluated in conjunction with each other using the AND operator. The minimum number of conditions is 1 and the maximum is 2.
          items:
            $ref: "#/components/schemas/CustomObjectBulkDeleteFilterCondition"
          type: array
      required:
        - conditions
      type: object
    CustomObjectBulkDeleteFilterCondition:
      description: Condition evaluated on a single object field
      properties:
        field:
          description: The object field that is evaluated. Only filterable fields can be evaluated in the filter.
          example: CreatedDate
          type: string
        operator:
          enum:
            - EQ
            - GT
            - LT
            - GE
            - LE
          example: LT
          type: string
        value:
          description: The value that the filterable `field` is evaluated against in the filter. The data type of `value` is consistent with that of the `field`.
          example: 2020-01-01T00:00:00.000Z
      required:
        - field
        - operator
        - value
      type: object
    CustomObjectBulkJobErrorResponse:
      properties:
        code:
          description: The error code.
          example: 71012520
          format: Int32
          type: integer
        message:
          description: The error message.
          example: input string "123" is not a valid UUID
          type: string
        record:
          $ref: "#/components/schemas/CustomObjectRecordWithAllFields"
        row:
          description: The CSV record row number. The custom object record data starts at the second row because the first row is the CSV header.
          example: 12
          format: Int32
          type: integer
      type: object
    CustomObjectBulkJobErrorResponseCollection:
      properties:
        errors:
          description: All errors for a custom object bulk job.
          items:
            $ref: "#/components/schemas/CustomObjectBulkJobErrorResponse"
          type: array
      required:
        - errors
      type: object
    CustomObjectBulkJobRequest:
      properties:
        filter:
          $ref: "#/components/schemas/CustomObjectBulkDeleteFilter"
        namespace:
          description: |
            The namespace of the object. Custom objects belong to the `default` namespace. Zuora standard objects belong to the `com_zuora` namespace. Bulk job operations on the following Zuora standard objects are supported:
            * SavedQuery
          enum:
            - default
            - com_zuora
          type: string
        object:
          description: The object that the bulk operation performs on.
          example: passenger
          type: string
        operation:
          description: The operation that the bulk job performs. Only the users that have the "Delete Custom Objects" permission can submit a `delete` bulk job request. Only the users that have the "Edit Custom Objects" permission can submit a `create` or `update` bulk job request. See [Platform Permissions](https://knowledgecenter.zuora.com/Billing/Tenant_Management/A_Administrator_Settings/User_Roles/h_Platform_Roles#Platform_Permissions) for more information.
          enum:
            - delete
            - create
          type: string
      required:
        - operation
        - object
        - namespace
      type: object
    CustomObjectBulkJobResponse:
      example:
        CreatedById: 7b39d73f-22e6-404a-b8e7-894f7620e91c
        CreatedDate: 2021-03-15T06:47:18Z
        Id: ed4b9701-bafb-4976-8019-b08269430153
        UpdatedById: 7b39d73f-22e6-404a-b8e7-894f7620e91c
        UpdatedDate: 2021-03-15T06:47:18Z
        error:
          code: 71012560
          message: Service limit reached, please retry later.
        namespace: default
        object: passenger
        operation: delete
        processingTime: 1882
        recordsProcessed: 500
        status: failed
      properties:
        CreatedById:
          description: The ID of the user who creates the job.
          format: uuid
          type: string
        CreatedDate:
          description: The time when the bulk job is created.
          format: date-time
          type: string
        Id:
          description: The custom object bulk job ID.
          format: uuid
          type: string
        UpdatedById:
          description: The ID of the user who updates the job.
          format: uuid
          type: string
        UpdatedDate:
          description: The time when the bulk job is updated.
          format: date-time
          type: string
        error:
          properties:
            code:
              description: The error code.
              example: 71012560
              format: Int32
              type: integer
            message:
              description: The error message.
              example: Service limit reached, please retry later.
              type: string
          type: object
        namespace:
          description: |
            The namespace of the object. Custom objects belong to the `default` namespace. Zuora standard objects belong to the `com_zuora` namespace. Bulk job operations on the following Zuora standard objects are supported:
            * SavedQuery
          enum:
            - default
            - com_zuora
          type: string
        object:
          description: The object to that the bulk operation performs on.
          example: passenger
          type: string
        operation:
          description: |
            The operation that the bulk job performs. Only the users that have the "Delete Custom Objects" permission can submit a `delete` bulk job request. Only the users that have the "Edit Custom Objects" permission can submit a `create` or `update` bulk job request. See [Platform Permissions](https://knowledgecenter.zuora.com/Billing/Tenant_Management/A_Administrator_Settings/User_Roles/h_Platform_Roles#Platform_Permissions) for more information.
          enum:
            - delete
            - create
          type: string
        processingTime:
          description: The amount of time elapsed, in milliseconds, from the submission to the completion of the bulk job.
          example: 550
          type: integer
        recordsProcessed:
          description: The number of object records processed by the bulk job.
          example: 1000
          type: integer
        status:
          description: The status of the bulk job.
          enum:
            - open
            - pending
            - in_progress
            - completed
            - failed
            - cancelled
          example: failed
          type: string
      type: object
    CustomObjectBulkJobResponseCollection:
      properties:
        count:
          description: The number of custom object bulk jobs returned in the result page set.
          example: 2
          type: integer
        cursor:
          description: The `cursor` points to the last job record of the current page.
          example: a9e9a58d-0a11-4685-b1ab-99521dbc20a1
          type: string
        jobs:
          description: All custom object bulk jobs returned in the result page set.
          example:
            - CreatedById: 2c92c0f96a07409d016a0a58ab1172ec
              CreatedDate: 2021-03-10T00:05:54.207Z
              Id: 5112347a-f7a1-4373-99df-c082984de7be
              UpdatedById: 2c92c0f96a07409d016a0a58ab1172ec
              UpdatedDate: 2021-03-10T00:08:15.614Z
              namespace: default
              object: vehicle
              operation: create
              processingTime: 62
              recordsProcessed: 3
              status: completed
            - CreatedById: 2c92c0f96a07409d016a0a58ab1172ec
              CreatedDate: 2021-03-09T22:27:59.503Z
              Id: a9e9a58d-0a11-4685-b1ab-99521dbc20a1
              UpdatedById: 2c92c0f96a07409d016a0a58ab1172ec
              UpdatedDate: 2021-03-09T22:27:59.503Z
              namespace: default
              object: vehicle
              operation: create
              processingTime: 0
              recordsProcessed: 0
              status: pending
          items:
            $ref: "#/components/schemas/CustomObjectBulkJobResponse"
          type: array
      required:
        - jobs
      type: object
    CustomObjectCustomFieldDefinition:
      description: The custom field definition in the custom object
      properties:
        format:
          description: The data format of the custom field
          type: string
        label:
          description: The UI label of the custom field
          type: string
        origin:
          description: Specifies that this is a custom field
          enum:
            - custom
          type: string
        type:
          description: The data type of the custom field
          type: string
      title: customObjectCustomFieldDefinition
      type: object
    CustomObjectCustomFieldDefinitionUpdate:
      description: The custom field definition in the custom object
      properties:
        default:
          description: Applicable if the `type` of the action is  `updateField`
          type: string
        description:
          description: Applicable if the `type` of the action is  `updateField`
          type: string
        format:
          description: The data format of the custom field
          type: string
        label:
          description: The UI label of the custom field
          type: string
        origin:
          description: Specifies that this is a custom field
          enum:
            - custom
          type: string
        type:
          description: The data type of the custom field
          type: string
      title: customObjectCustomFieldDefinition
      type: object
    CustomObjectCustomFieldsDefinition:
      additionalProperties:
        $ref: "#/components/schemas/CustomObjectCustomFieldDefinition"
      description: The custom field definition in the custom object definition
      title: customObjectCustomFieldDefinition
      type: object
    CustomObjectDefinition:
      example:
        CreatedById: 7b39d73f-22e6-404a-b8e7-894f7620e91c
        CreatedDate: 2019-09-29T06:45:23.378Z
        Id: df7f10f9-4ec9-4389-a9eb-a6a3d549bb61
        UpdatedById: 7b39d73f-22e6-404a-b8e7-894f7620e91c
        UpdatedDate: 2019-09-29T06:45:23.378Z
        schema:
          filterable:
            - last_name__c
            - email__c
          label: Personal Profile
          object: person
          properties:
            CreatedById:
              format: uuid
              label: CreatedById
              origin: system
              type: string
            CreatedDate:
              format: date-time
              label: CreatedDate
              origin: system
              type: string
            Id:
              format: uuid
              label: Id
              origin: system
              type: string
            UpdatedById:
              format: uuid
              label: UpdatedById
              origin: system
              type: string
            UpdatedDate:
              format: date-time
              label: UpdatedDate
              origin: system
              type: string
            age__c:
              description: Age in years
              minimum: 0
              origin: custom
              type: integer
            email__c:
              format: email
              maxLength: 128
              origin: custom
              type: string
            home_address__c:
              format: uuid
              origin: custom
              type: string
            last_name__c:
              maxLength: 128
              origin: custom
              type: string
            marital_status__c:
              default: Unknown
              enum:
                - Single
                - Married
                - Unknown
              origin: custom
              type: string
            work_address__c:
              format: uuid
              origin: custom
              type: string
          relationships:
            - cardinality: manyToOne
              fields:
                home_address__c: Id
              namespace: default
              object: address
              recordConstraints:
                create:
                  enforceValidMapping: false
            - cardinality: manyToOne
              fields:
                work_address__c: Id
              namespace: default
              object: address
              recordConstraints:
                create:
                  enforceValidMapping: false
            - cardinality: oneToMany
              fields:
                Id: person_id__c
              namespace: default
              object: car
              recordConstraints:
                create:
                  enforceValidMapping: false
            - cardinality: oneToMany
              fields:
                Id: person_id__c
              namespace: default
              object: device
              recordConstraints:
                create:
                  enforceValidMapping: false
          required:
            - last_name__c
            - marital_status__c
          type: object
        type: person
      properties:
        CreatedById:
          description: The creator's Id
          format: uuid
          type: string
        CreatedDate:
          description: The creation time of the custom object definition in date-time format.
          format: date-time
          type: string
        Id:
          description: The unique Id of the custom object definition
          format: uuid
          type: string
        UpdatedById:
          description: The modifier's Id
          format: uuid
          type: string
        UpdatedDate:
          description: The update time of the custom object definition in date-time format.
          format: date-time
          type: string
        schema:
          description: The schema of the custom object definition
          properties:
            filterable:
              description: The set of fields that are allowed to be queried on. Queries on non-filterable fields will be rejected. You can not change a non-filterable field to filterable.
              items:
                type: string
              type: array
            label:
              description: A label for the custom object
              type: string
            object:
              description: The API name of the custom object
              type: string
            properties:
              $ref: "#/components/schemas/CustomObjectAllFieldsDefinition"
            relationships:
              description: An array of relationships with Zuora objects or other custom objects
              items:
                additionalProperties: false
                properties:
                  cardinality:
                    default: manyToOne
                    description: |
                      The cardinality of the relationship from this object to another object.

                      A `manyToOne` relationship means this object is the child object (the "many" side), and the referenced object (the "one" side) is the parent.

                      A `oneToMany` relationship means this object is the parent object (the "one" side), and the referenced object (the "many" side) is the child.
                    enum:
                      - manyToOne
                      - oneToMany
                    type: string
                  fields:
                    $ref: "#/components/schemas/FieldsAdditionalProperties"
                  namespace:
                    description: The namespace where the related object is located
                    type: string
                  object:
                    description: The API name of the related object
                    type: string
                  recordConstraints:
                    description: |
                      Specifies contraints to apply to custom object records.
                    properties:
                      create:
                        properties:
                          enforceValidMapping:
                            description: |
                              Specifies whether Zuora validates the values of mapped fields
                              in custom object records.
                            type: boolean
                        type: object
                    type: object
                type: object
              type: array
            required:
              description: The required fields of the custom object definition. You can change required fields to optional. However, you can only change optional fields to required on the custom objects with no records.
              items:
                type: string
              type: array
            type:
              description: The custom object definition type. Can only be `object` currently.
              enum:
                - object
              type: string
          type: object
        type:
          description: The API name of the custom object
          type: string
      title: customObjectDefinition
      type: object
    CustomObjectDefinitionUpdateActionRequest:
      example:
        field:
          definition:
            description: Address zip code
            label: Zip code
            maxLength: 10
            type: string
          name: zip__c
        namespace: default
        object: address
        type: addField
      properties:
        description:
          description: Optional property for `updateObject` action
          type: string
        field:
          $ref: "#/components/schemas/UpdateCustomObjectCusotmField"
        label:
          description: Optional property for `updateObject` action
          type: string
        namespace:
          description: The namespace of the custom object definition to be updated
          type: string
        object:
          description: The API name of the custom object definition to be updated
          type: string
        relationship:
          additionalProperties: false
          properties:
            cardinality:
              description: |
                The cardinality of the relationship from this object to another object.

                Only the `manyToOne` cardinality can be used when creating relationships.  A relationship with `oneToMany` cardinality is created implicitly when a `manyToOne` relationship is created.

                A custom object definition can have a maximum of 2 `manyToOne` relationships.
              enum:
                - manyToOne
              type: string
            fields:
              $ref: "#/components/schemas/FieldsAdditionalProperties"
            namespace:
              description: The namespace where the related object is located
              type: string
            object:
              description: The API name of the related object
              type: string
            recordConstraints:
              description: |
                Specifies contraints to apply to custom object records.
              properties:
                create:
                  properties:
                    enforceValidMapping:
                      default: true
                      description: |
                        Specifies whether Zuora validates the values of mapped fields
                        in custom object records.

                        By default, Zuora validates the values of mapped fields
                        in custom object records. For example, if the
                        custom object definition has a field called `AccountId__c`
                        that is mapped to the `Id` field of the `account` object,
                        Zuora verifies that the value of `AccountId__c` is a valid
                        account ID when a custom object record is created.
                        If the value of `AccountId__c` is not a valid account ID,
                        the operation fails.
                      type: boolean
                  type: object
              type: object
          required:
            - namespace
            - object
            - fields
          type: object
        type:
          description: The type of the updating action on a custom object definition
          enum:
            - addField
            - deleteField
            - updateField
            - updateObject
            - renameField
            - addRelationship
            - deleteRelationship
          type: string
      required:
        - type
        - namespace
        - object
      type: object
    CustomObjectDefinitionUpdateActionResponse:
      example:
        field:
          definition:
            description: Address zip code
            label: Zip code
            maxLength: 10
            type: string
          name: zip__c
        namespace: default
        object: address
        type: addField
      properties:
        description:
          description: Optional property for `updateObject` action
          type: string
        field:
          $ref: "#/components/schemas/UpdateCustomObjectCusotmField"
        label:
          description: Optional property for `updateObject` action
          type: string
        namespace:
          description: The namespace of the custom object definition to be updated
          type: string
        object:
          description: The API name of the custom object definition to be updated
          type: string
        relationship:
          additionalProperties: false
          properties:
            cardinality:
              default: manyToOne
              description: |
                The cardinality of the relationship from this object to another object.

                A `manyToOne` relationship means this object is the child object (the "many" side), and the referenced object (the "one" side) is the parent.

                A `oneToMany` relationship means this object is the parent object (the "one" side), and the referenced object (the "many" side) is the child.
              enum:
                - manyToOne
                - oneToMany
              type: string
            fields:
              $ref: "#/components/schemas/FieldsAdditionalProperties"
            namespace:
              description: The namespace where the related object is located
              type: string
            object:
              description: The API name of the related object
              type: string
            recordConstraints:
              description: |
                Specifies contraints to apply to custom object records.
              properties:
                create:
                  properties:
                    enforceValidMapping:
                      default: true
                      description: |
                        Specifies whether Zuora validates the values of mapped fields
                        in custom object records.
                      type: boolean
                  type: object
              type: object
          type: object
        type:
          description: The type of the updating action on a custom object definition
          enum:
            - addField
            - deleteField
            - updateField
            - updateObject
            - renameField
            - addRelationship
            - deleteRelationship
          type: string
      type: object
    CustomObjectDefinitions:
      additionalProperties:
        $ref: "#/components/schemas/CustomObjectDefinition"
      description: The custom object definitions. This object maps types to custom object definitions.
      title: customObjectDefinitions
      type: object
    CustomObjectRecordBatchAction:
      description: The batch action on custom object records
      properties:
        allowPartialSuccess:
          default: false
          description: |
            Indicates whether the records that pass the schema validation should be updated when not all records in the request pass the schema validation.

            This field is applicable only to the batch update actions.
          example: true
          type: boolean
        ids:
          description: Ids of the custom object records that you want to delete. Only applicable when `type` is `delete`.
          example:
            - 64edb2a5-2796-4e95-9559-846f8636a01b
            - dbfb35a3-dd2b-42c9-b8f7-eb36fed1a1e1
            - 2c2a1810-bfef-4150-84de-50e769978e42
          items:
            format: uuid
            type: string
          type: array
        records:
          $ref: "#/components/schemas/CustomObjectRecordBatchUpdateMapping"
        type:
          description: The type of the batch action
          enum:
            - delete
            - update
          type: string
      required:
        - type
      title: updateDeleteBatchAction
      type: object
    CustomObjectRecordBatchRequest:
      description: Request of processing custom object records in batch.
      example:
        action:
          allowPartialSuccess: true
          records:
            64edb2a5-2796-4e95-9559-846f8636a01b:
              age__c: eighteen
              name__c: elba43
              person_id__c: 30c52793-8f06-41c6-b623-04829710d7a
          type: update
      properties:
        action:
          $ref: "#/components/schemas/CustomObjectRecordBatchAction"
      required:
        - action
      type: object
    CustomObjectRecordBatchUpdateMapping:
      additionalProperties:
        description: Map of object Id and associated custom fields data to be updated
        type: object
      description: Object records that you want to update. Only applicable when `type` is `update`.
      example:
        64edb2a5-2796-4e95-9559-846f8636a01b:
          name__c: elba43
          person_id__c": 30c52793-8f06-41c6-b623-04829710d7a
      title: updateIdFieldsMapping
      type: object
    CustomObjectRecordWithAllFields:
      allOf:
        - properties:
            CreatedById:
              description: The creator's Id
              type: string
            CreatedDate:
              description: The record creation time in the date-time format
              format: date-time
              type: string
            Id:
              description: The unique Id of the custom object record
              format: uuid
              type: string
            UpdatedById:
              description: The modifier's Id
              type: string
            UpdatedDate:
              description: The record modification time in the date-time format
              format: date-time
              type: string
            type:
              description: The type of the custom object record. It is the API name of the custom object definition.
              type: string
        - $ref: "#/components/schemas/CustomObjectRecordWithOnlyCustomFields"
      description: Record data from an object
      example:
        CreatedById: 58bcc694-0b01-4c38-83d9-679891aee4dc
        CreatedDate: 2017-06-07T17:26:47.501Z
        Id: f4f3d0a8-9d45-43d6-956c-4820f2de7559
        UpdatedById: 58bcc694-0b01-4c38-83d9-679891aee4dc
        UpdatedDate: 2017-06-07T17:26:47.501Z
        age__c: 32
        email__c: smith123@example.com
        home_address__c: 59b38ad1-27d4-40e8-af66-8c138bc382ee
        last_name__c: Smith
        marital_status__c: Married
        type: person
        version: 1
        work_address__c: 8a19f16a-2b5e-4a26-bb20-c79cd6984714
      title: customObjectRecord
      type: object
    CustomObjectRecordWithOnlyCustomFields:
      additionalProperties:
        description: The field-value pairs for a custom object record
      example:
        age__c: 32
        email__c: smith123@example.com
        home_address__c: 59b38ad1-27d4-40e8-af66-8c138bc382ee
        last_name__c: Smith
        marital_status__c: Married
        work_address__c: 8a19f16a-2b5e-4a26-bb20-c79cd6984714
      title: customObjectRecord
      type: object
    CustomObjectRecordsBatchUpdatePartialSuccessResponse:
      example:
        error:
          code: 710125XX
          details:
            - code: 710125XX
              message: Field [age__c] is an integer field but received a string value.
              record:
                Id: 64edb2a5-2796-4e95-9559-846f8636a01b
                age__c: 19
                name__c: elba43
                person_id__c: 30c52793-8f06-41c6-b623-04829710d7a
          message: Unabled to update object records due to invalid request.
      properties:
        error:
          $ref: "#/components/schemas/CustomObjectRecordsErrorResponse"
      type: object
    CustomObjectRecordsErrorResponse:
      properties:
        code:
          example: 710125XX
          format: Int32
          type: integer
        details:
          example:
            - code: 710125XX
              message: Field [age__c] is an integer field but received a string value.
              record:
                Id: 8a19f16a-2b5e-4a26-bb20-c79cd6984714
                age__c: "32"
                email__c: smith123@example.com
                home_address__c: 59b38ad1-27d4-40e8-af66-8c138bc382ee
                last_name__c: Smith
                marital_status__c: Married
                work_address__c: 8a19f16a-2b5e-4a26-bb20-c79cd6984714
          items:
            $ref: "#/components/schemas/CustomObjectRecordsWithError"
          type: array
        message:
          example: Unabled to create object records due to invalid request.
          type: string
      type: object
    CustomObjectRecordsThrottledResponse:
      properties:
        code:
          example: 71012561
          format: Int32
          type: integer
        details:
          example:
            - code: 71012561
              message: Unable to process record due to internal error or database throttling.
              record:
                Id: 8a19f16a-2b5e-4a26-bb20-c79cd6984714
                age__c: 32
                email__c: smith123@example.com
                home_address__c: 59b38ad1-27d4-40e8-af66-8c138bc382ee
                last_name__c: Smith
                marital_status__c: Married
                work_address__c: 8a19f16a-2b5e-4a26-bb20-c79cd6984714
          items:
            $ref: "#/components/schemas/CustomObjectRecordsWithError"
          type: array
        message:
          example: Unabled to create object records, please try again later.
          type: string
      type: object
    CustomObjectRecordsWithError:
      properties:
        code:
          description: |
            See [Custom Objects API error code](https://knowledgecenter.zuora.com/Central_Platform/Custom_Objects/Z_Custom_Objects_API#Custom_Objects_API_error_code) for details.
          enum:
            - 71012520
            - 71012521
            - 71012522
            - 71012523
            - 71012524
            - 71012525
            - 71012526
            - 71012530
          format: Int32
          type: integer
        message:
          example: Field [last_name__c] cannot accept empty string.
          type: string
        record:
          $ref: "#/components/schemas/CustomObjectRecordWithAllFields"
      type: object
    CustomObjectsNamespace:
      description: The namespaces for custom object definitions.
      properties:
        CreatedById:
          description: The Id of the namespace creator.
          example: 58bcc694-0b01-4c38-83d9-679891aee4dc
          type: string
        CreatedDate:
          description: The date-time when the namespace is created.
          example: 2017-05-25T16:13:12.629Z
          type: string
        Id:
          description: The unique ID of the namespace.
          example: 3a13cb7f-5d2b-4f77-bb14-a1affb4c3ae3
          format: uuid
          type: string
        UpdatedById:
          description: The Id of the user who updates the namespace most recently.
          example: 58bcc694-0b01-4c38-83d9-679891aee4dc
          type: string
        UpdatedDate:
          description: The date-time when the namespace is last updated.
          example: 2017-05-25T16:13:12.629Z
          type: string
        name:
          description: The name of the custom object namespace.
          example: com_mycompany
          type: string
        origin:
          description: Specifies the namespace is either a custom or system namespace.
          enum:
            - custom
            - system
          type: string
      type: object
    DELETEntityResponseType:
      properties:
        success:
          description: Returns `true` if the request is successful.
          type: boolean
      type: object
    DataAccessControlField:
      additionalProperties:
        description: |
          Field for data access control. The name of the data access control field has the form <code>*customField*__h</code>. The data access control field is case sensitive. See [Data Access Control](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/A_Administrator_Settings/Data_Access_Control) for more information.
        type: string
      description: |
        Container for the data access control field.
      title: dataAccessControlField
      type: object
    DataQueryErrorResponse:
      properties:
        code:
          description: |
            Error code.
          type: integer
        message:
          description: |
            Error message.
          type: string
      type: object
    DataQueryJob:
      allOf:
        - $ref: "#/components/schemas/DataQueryJobCommon"
        - properties:
            dataFile:
              description: |
                The URL of the query results. Only applicable if the value of the `queryStatus` field is `completed`.
              format: URL
              type: string
            outputRows:
              description: |
                The number of rows the query results. Only applicable if the value of the `queryStatus` field is `completed`.
              type: integer
            processingTime:
              description: |
                Processing time of the query job, in milliseconds. Only applicable if the value of the `queryStatus` field is `completed`.
              type: integer
            queryStatus:
              description: |
                Status of the query job.

                * `submitted` - query submitted to query service for processing
                * `accepted` - query accepted by the query service
                * `in_progress` - query executed by the query service
                * `completed` - query execution completed by the query service
                * `failed` - query unable to be processed by the query service
                * `cancelled` - query cancelled by the user

                If the value of this field is `completed`, the `dataFile` field contains the location of the query results.

                If the value of this field is `accepted` or `in_progress`, you can use [Cancel a data query job](#operation/DELETE_DataQueryJob) to prevent Zuora from performing the query. Zuora then sets the status of the query job to `cancelled`.
              enum:
                - submitted
                - accepted
                - in_progress
                - completed
                - failed
                - cancelled
              type: string
          type: object
      description: |
        A data query job.
      title: queryJob
    DataQueryJobCancelled:
      allOf:
        - $ref: "#/components/schemas/DataQueryJobCommon"
        - properties:
            queryStatus:
              description: |
                Status of the query job.
              enum:
                - cancelled
              type: string
          type: object
      description: |
        A cancelled data query job.
      title: cancelledQueryJob
    DataQueryJobCommon:
      properties:
        createdBy:
          description: |
            The query job creator's Id.
          format: uuid
          maxLength: 64
          minLength: 64
          type: string
        id:
          description: |
            Internal identifier of the query job.
          format: uuid
          maxLength: 64
          minLength: 64
          type: string
        query:
          description: |
            The query that was submitted.
          type: string
        remainingRetries:
          description: |
            The number of times that Zuora will retry the query if Zuora is unable to perform the query.
          type: integer
        updatedOn:
          description: |
            Date and time when the query job was last updated, in ISO 8601 format.
          format: date-time
          type: string
      type: object
    DebitMemoCollectRequest:
      example:
        applicationOrder:
          - CreditMemo
          - UnappliedPayment
        applyCredit: true
        collect: true
        payment:
          gatewayId: 2c98902f6f1de6d1016f1ded559f3b9d
          paymentMethodId: 2c98902f6f1de6d1016f1dedba313ba2
      properties:
        applicationOrder:
          description: |
            The priority order to apply credit memos and/or unapplied payments to the debit memo. Possible item values are: `CreditMemo`, `UnappliedPayment`.

            **Note:**
              - This field is valid only if the `applyCredit` field is set to `true`.
              - If no value is specified for this field, the default priority order is used, ["CreditMemo", "UnappliedPayment"], to apply credit memos first and then apply unapplied payments.
              - If only one item is specified, only the items of the spedified type are applied to invoices. For example, if the value is `["CreditMemo"]`, only credit memos are used to apply the debit memo.
          items:
            type: string
          type: array
        applyCredit:
          default: false
          description: |
            Whether to automatically apply credit memos or unapplied payments, or both to the debit memo.
            If the value is `true`, the credit memo or unapplied payment, or both will be automatically applied to the debit memo. If no value is specified or the value is `false`, no action is taken.
          type: boolean
        collect:
          default: false
          description: |
            Indicates if the current request needs to collect payment or not.
          type: boolean
        payment:
          description: |
            Some detail info that would be used to processed an electronic payment.
            The info would only effect when `collect` set to `true`.
          properties:
            gatewayId:
              description: |
                The ID of the gateway instance that processes the payment. The ID must be a valid gateway instance ID and this gateway must support the specific payment method.
                If no gateway ID is specified in the request body, the default gateway for the customer account is used automatically, if this default one is not configured, the default gateway of the tenant would be used.
              type: string
            paymentMethodId:
              description: |
                The unique ID of the payment method that the customer used to make the payment.
                If no payment method ID is specified in the request body, the default payment method for the customer account is used automatically. If the default payment method is different from the type of payments that you want to create, an error occurs.
              type: string
          type: object
      type: object
    DebitMemoCollectResponse:
      allOf:
        - properties:
            appliedCreditMemos:
              description: |
                The information about which credit memo applied to the specific debit memo.
              items:
                $ref: "#/components/schemas/DebitMemoCollectResponseAppliedCreditMemos"
              type: array
            appliedPayments:
              description: |
                The information about which payment applied to the specific debit memo.
              items:
                $ref: "#/components/schemas/DebitMemoCollectResponseAppliedPayments"
              type: array
            debitMemo:
              description: |
                The information about the debit memo that just collected.
              properties:
                id:
                  description: |
                    The unique ID of the debit memo.
                  type: string
                number:
                  description: |
                    The unique identification number of the debit memo.
                  type: string
              type: object
            processedPayment:
              description: |
                The information about the payment that newly processed to the debit memo.
              properties:
                amount:
                  description: |
                    The total amount of the payment.
                  format: double
                  type: number
                gatewayId:
                  description: |
                    The ID of the gateway instance that processes the payment.
                  type: string
                gatewayResponse:
                  description: |
                    The message returned from the payment gateway for the payment. This message is gateway-dependent.
                  type: string
                gatewayResponseCode:
                  description: |
                    The code returned from the payment gateway for the payment. This code is gateway-dependent.
                  type: string
                id:
                  description: |
                    The unique ID of the created payment. For example, 4028905f5a87c0ff015a87eb6b75007f.
                  type: string
                number:
                  description: |
                    The unique identification number of the payment. For example, P-00000001.
                  type: string
                paymentMethodId:
                  description: |
                    The unique ID of the payment method that the customer used to make the payment.
                  type: string
                status:
                  description: |
                    The status of the payment.
                  enum:
                    - Processing
                    - Processed
                    - Error
                    - Canceled
                  type: string
              type: object
            success:
              description: Returns `true` if the request was processed successfully.
              type: boolean
          type: object
    DebitMemoCollectResponseAppliedCreditMemos:
      allOf:
        - properties:
            appliedAmount:
              description: |
                The applied amount of the credit memo to the debit memo.
              format: double
              type: number
            id:
              description: |
                The unique ID of the credit memo.
              type: string
            number:
              description: |
                The unique identification number of the credit memo.
              type: string
            unappliedAmount:
              description: |
                The unapplied amount of the credit memo after applied to the debit memo.
              format: double
              type: number
          type: object
    DebitMemoCollectResponseAppliedPayments:
      allOf:
        - properties:
            appliedAmount:
              description: |
                The applied amount of the payment to the debit memo.
              format: double
              type: number
            id:
              description: |
                The unique ID of the payment.
              type: string
            number:
              description: |
                The unique identification number of the payment.
              type: string
            unappliedAmount:
              description: |
                The unapplied amount of the payment after applied to the debit memo.
              format: double
              type: number
          type: object
    DebitMemoEntityPrefix:
      description: |
        Container for the prefix and starting document number of debit memos.

        **Note:** This field is only available if you have the Invoice Settlement feature enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
      properties:
        prefix:
          description: |
            The prefix of debit memos.
          example: DM
          type: string
        startNumber:
          description: |
            The starting document number of debit memos.
          example: 10
          type: integer
      title: debitMemo
      type: object
    DebitMemoFromChargeDetailType:
      allOf:
        - properties:
            amount:
              description: |
                The amount of the debit memo item.

                **Note**: This field is only available if you set the `zuora-version` request header to `224.0` or later.
              format: double
              type: number
            chargeId:
              description: |
                The ID of the product rate plan charge that the debit memo is created from.

                **Note**: This field is not available if you set the `zuora-version` request header to `257.0` or later.
              type: string
            comment:
              description: |
                Comments about the product rate plan charge.

                **Note**: This field is not available if you set the `zuora-version` request header to `257.0` or before.
              maxLength: 255
              minLength: 0
              type: string
            description:
              description: |
                The description of the product rate plan charge.

                **Note**: This field is only available if you set the `zuora-version` request header to `257.0` or later.
              maxLength: 255
              minLength: 0
              type: string
            financeInformation:
              description: |
                Container for the finance information related to the product rate plan charge associated with the debit memo.
              properties:
                deferredRevenueAccountingCode:
                  description: |
                    The accounting code for the deferred revenue, such as Monthly Recurring Liability.
                  maxLength: 100
                  minLength: 0
                  type: string
                recognizedRevenueAccountingCode:
                  description: |
                    The accounting code for the recognized revenue, such as Monthly Recurring Charges or Overage Charges.
                  maxLength: 100
                  minLength: 0
                  type: string
                revenueRecognitionRuleName:
                  description: |
                    The name of the revenue recognition rule governing the revenue schedule.
                  maxLength: 100
                  minLength: 0
                  type: string
              type: object
            memoItemAmount:
              description: |
                The amount of the debit memo item.

                **Note**: This field is not available if you set the `zuora-version` request header to `224.0` or later.
              format: double
              type: number
            productRatePlanChargeId:
              description: |
                The ID of the product rate plan charge that the debit memo is created from.

                **Note**: This field is only available if you set the `zuora-version` request header to `257.0` or later.
              type: string
            quantity:
              description: |
                The number of units for the debit memo item.
              format: double
              type: number
            serviceEndDate:
              description: |
                The service end date of the debit memo item. If not specified, the effective end date of the corresponding product rate plan will be used.
              format: date
              type: string
            serviceStartDate:
              description: |
                The service start date of the debit memo item. If not specified, the effective start date of the corresponding product rate plan will be used.
              format: date
              type: string
          required:
            - chargeId
            - productRatePlanChargeId
          type: object
        - $ref: "#/components/schemas/DebitMemoItemObjectCustomFields"
      title: charges
    DebitMemoFromChargeType:
      allOf:
        - properties:
            accountId:
              description: |
                The ID of the account associated with the debit memo.

                **Note**: When creating debit memos from product rate plan charges, you must specify `accountNumber`, `accountId`, or both in the request body. If both fields are specified, they must correspond to the same account.
              type: string
            accountNumber:
              description: |
                The Number of the account associated with the debit memo.

                **Note**: When creating debit memos from product rate plan charges, you must specify `accountNumber`, `accountId`, or both in the request body. If both fields are specified, they must correspond to the same account.
              type: string
            autoPay:
              description: |
                Whether debit memos are automatically picked up for processing in the corresponding payment run. 

                By default, debit memos are automatically picked up for processing in the corresponding payment run.
              type: boolean
            autoPost:
              default: false
              description: |
                Whether to automatically post the debit memo after it is created. 

                Setting this field to `true`, you do not need to separately call the [Post a debit memo](https://www.zuora.com/developer/api-reference/#operation/PUT_PostDebitMemo) operation to post the debit memo.
              type: boolean
            charges:
              description: |
                Container for product rate plan charges. The maximum number of items is 1,000.
              items:
                $ref: "#/components/schemas/DebitMemoFromChargeDetailType"
              maxItems: 1000
              type: array
            comment:
              description: |
                Comments about the debit memo.
              maxLength: 255
              minLength: 0
              type: string
            dueDate:
              description: |
                The date by which the payment for the debit memo is due, in `yyyy-mm-dd` format.
              format: date
              type: string
            effectiveDate:
              description: |
                The date when the debit memo takes effect.
              format: date
              type: string
            reasonCode:
              description: |
                A code identifying the reason for the transaction. The value must be an existing reason code or empty. If you do not specify a value, Zuora uses the default reason code.
              type: string
          type: object
        - $ref: "#/components/schemas/DebitMemoObjectNSFields"
        - $ref: "#/components/schemas/DebitMemoObjectCustomFields"
      example:
        accountId: 402890555a7e9791015a7f15fe44001c
        autoPay: true
        autoPost: false
        charges:
          - amount: 30
            chargeId: 402890555a87d7f5015a892cae910050
            comment: this is comment1
            quantity: 1
          - amount: 20
            chargeId: 402890555a87d7f5015a892dff7f0053
            comment: this is comment2
        comment: the comment
        effectiveDate: 2017-10-17
        reasonCode: Correcting invoice error
      title: charges
    DebitMemoFromInvoiceType:
      allOf:
        - properties:
            autoPay:
              description: |
                Whether debit memos are automatically picked up for processing in the corresponding payment run. 

                By default, debit memos are automatically picked up for processing in the corresponding payment run.
              type: boolean
            autoPost:
              default: false
              description: |
                Whether to automatically post the debit memo after it is created. 

                Setting this field to `true`, you do not need to separately call the [Post debit memo](https://www.zuora.com/developer/api-reference/#operation/PUT_PostDebitMemo) operation to post the debit memo.
              type: boolean
            comment:
              description: |
                Comments about the debit memo. 
              maxLength: 255
              minLength: 0
              type: string
            effectiveDate:
              description: |
                The date when the debit memo takes effect.
              format: date
              type: string
            invoiceId:
              description: |
                The ID of the invoice that the debit memo is created from.

                * If this field is specified, its value must be the same as the value of the `invoiceId` path parameter. Otherwise, its value overrides the value of the `invoiceId` path parameter. 
                * If this field is not specified, the value of the `invoiceId` path parameter is used. 
              type: string
            items:
              description: |
                Container for items. The maximum number of items is 1,000.
              items:
                $ref: "#/components/schemas/DebitMemoItemFromInvoiceItemType"
              maxItems: 1000
              type: array
            reasonCode:
              description: |
                A code identifying the reason for the transaction. The value must be an existing reason code or empty. If you do not specify a value, Zuora uses the default reason code.
              type: string
            taxAutoCalculation:
              default: true
              description: |
                Whether to automatically calculate taxes in the debit memo.
              type: boolean
          type: object
        - $ref: "#/components/schemas/DebitMemoObjectNSFields"
        - $ref: "#/components/schemas/DebitMemoObjectCustomFields"
      example:
        autoPay: true
        comment: the comment
        effectiveDate: 2017-11-30
        items:
          - amount: 1
            autoPost: false
            comment: This is comment!
            invoiceItemId: 402890555a7d4022015a7dadb3b700a6
            quantity: 1
            serviceEndDate: 2017-11-30
            serviceStartDate: 2017-11-01
            skuName: SKU-30
            taxItems:
              - amount: 0.01
                jurisdiction: CALIFORNIA
                locationCode: "06"
                sourceTaxItemId: 402890555a7d4022015a7dadb39b00a1
                taxCode: null
                taxCodeDescription: null
                taxDate: 2017-11-30
                taxExemptAmount: 0
                taxName: STATE TAX
                taxRate: 0.0625
                taxRateDescription: This is tax rate description!
                taxRateType: Percentage
            taxMode: TaxExclusive
            unitOfMeasure: Test_UOM
        reasonCode: Charge Dispute
    DebitMemoItemFromInvoiceItemType:
      allOf:
        - properties:
            amount:
              description: |
                The amount of the debit memo item.
              format: double
              type: number
            comment:
              description: |
                Comments about the debit memo item.

                **Note**: This field is not available if you set the `zuora-version` request header to `257.0` or later.
              type: string
            description:
              description: |
                The description of the debit memo item.

                **Note**: This field is only available if you set the `zuora-version` request header to `257.0` or later.
              type: string
            financeInformation:
              description: |
                Container for the finance information related to the debit memo item.
              properties:
                deferredRevenueAccountingCode:
                  description: |
                    The accounting code for the deferred revenue, such as Monthly Recurring Liability.
                  maxLength: 100
                  minLength: 0
                  type: string
                recognizedRevenueAccountingCode:
                  description: |
                    The accounting code for the recognized revenue, such as Monthly Recurring Charges or Overage Charges.
                  maxLength: 100
                  minLength: 0
                  type: string
                revenueRecognitionRuleName:
                  description: |
                    The name of the revenue recognition rule governing the revenue schedule.
                  maxLength: 100
                  minLength: 0
                  type: string
              type: object
            invoiceItemId:
              description: |
                The ID of the invoice item.
              type: string
            quantity:
              description: |
                The number of units for the debit memo item.
              format: double
              type: number
            serviceEndDate:
              description: |
                The service end date of the debit memo item.
              format: date
              type: string
            serviceStartDate:
              description: |
                The service start date of the debit memo item. 
              format: date
              type: string
            skuName:
              description: |
                TThe name of the charge associated with the invoice.
              type: string
            taxItems:
              description: |
                Container for taxation items.
              items:
                $ref: "#/components/schemas/DebitMemoTaxItemFromInvoiceTaxItemType"
              type: array
            taxMode:
              default: TaxExclusive
              description: |
                The tax mode of the debit memo item, indicating whether the amount of the debit memo item includes tax.

                **Note**: You can set this field to `TaxInclusive` only if the `taxAutoCalculation` field is set to `true`.

                If you set `taxMode` to `TaxInclusive`, you cannot input tax amounts for debit memo items. The corresponding invoice item must use the same tax engine as the debit memo item to calculate tax amounts.
              enum:
                - TaxExclusive
                - TaxInclusive
              type: string
            unitOfMeasure:
              description: |
                The definable unit that you measure when determining charges.
              type: string
          required:
            - skuName
            - amount
          type: object
        - $ref: "#/components/schemas/DebitMemoItemObjectCustomFields"
      title: items
    DebitMemoItemObjectCustomFields:
      additionalProperties:
        description: |
          Custom fields of the Debit Memo Item object. The name of each custom field has the form <code>*customField*__c</code>. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
      description: |
        Container for custom fields of a Debit Memo Item object.
      title: debitMemoItemFieldsCustom
      type: object
    DebitMemoObjectCustomFields:
      additionalProperties:
        description: |
          Custom fields of the Debit Memo object. The name of each custom field has the form <code>*customField*__c</code>. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
      description: |
        Container for custom fields of a Debit Memo object.
      title: debitMemoFieldsCustom
      type: object
    DebitMemoObjectNSFields:
      description: |
        Container for Debit Memo fields provided by the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
      properties:
        IntegrationId__NS:
          description: |
            ID of the corresponding object in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        IntegrationStatus__NS:
          description: |
            Status of the debit memo's synchronization with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        SyncDate__NS:
          description: |
            Date when the debit memo was synchronized with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
      title: debitMemoFieldsNS
      type: object
    DebitMemoTaxItemFromInvoiceTaxItemType:
      properties:
        amount:
          description: |
            The amount of the debit memo taxation item.
          format: double
          type: number
        financeInformation:
          description: |
            Container for the finance information related to the source taxation item.
          properties:
            salesTaxPayableAccountingCode:
              description: |
                The accounting code for the sales taxes payable.
              maxLength: 100
              minLength: 0
              type: string
          type: object
        jurisdiction:
          description: |
            The jurisdiction that applies the tax or VAT. This value is typically a state, province, county, or city.
          type: string
        locationCode:
          description: |
            The identifier for the location based on the value of the `taxCode` field.
          type: string
        sourceTaxItemId:
          description: |
            The ID of the source taxation item.
          type: string
        taxCode:
          description: |
            The tax code identifies which tax rules and tax rates to apply to a specific debit memo.
          type: string
        taxCodeDescription:
          description: |
            The description of the tax code.
          type: string
        taxDate:
          description: |
            The date that the tax is applied to the debit memo, in `yyyy-mm-dd` format.
          format: date
          type: string
        taxExemptAmount:
          description: |
            The amount of taxes or VAT for which the customer has an exemption.
          format: double
          type: number
        taxName:
          description: |
            The name of taxation.
          type: string
        taxRate:
          description: |
            The tax rate applied to the debit memo.
          format: double
          type: number
        taxRateDescription:
          description: |
            The description of the tax rate.
          type: string
        taxRateType:
          description: |
            The type of the tax rate applied to the debit memo.
          enum:
            - Percentage
            - FlatFee
          type: string
      title: taxItems
      type: object
    DebitTaxationItemObjectCustomFields:
      additionalProperties:
        description: |
          Custom fields of the Debit Taxation Item object. The name of each custom field has the form <code>*customField*__c</code>. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
      description: |
        Container for custom fields of a Debit Taxation Item object.
      title: debitTaxationItemFieldsCustom
      type: object
    DeleteDataQueryJobResponse:
      properties:
        data:
          $ref: "#/components/schemas/DataQueryJobCancelled"
      type: object
    DeleteResult:
      properties:
        errors:
          description: |
            If the delete failed, this contains an array of Error objects.
          items:
            $ref: "#/components/schemas/ActionsErrorResponse"
          type: array
        id:
          description: |
            ID of the deleted object.
          type: string
        success:
          description: |
            A boolean field indicating the success of the delete operation. If the delete was successful, it is `true`. Otherwise, `false`.
          type: boolean
      type: object
    DeleteWorkflowError:
      properties:
        Errors:
          description: The error messages
          items:
            type: string
          type: array
      type: object
    DeleteWorkflowSuccess:
      properties:
        id:
          description: The id of the deleted workflow
          type: string
        success:
          description: The indicator for whether the deletion was a success
          type: boolean
      type: object
    DiscountPricingOverride:
      description: |
        Pricing information about a discount charge.
      properties:
        applyDiscountTo:
          description: |
            Specifies which type of charge the discount charge applies to.
          enum:
            - ONETIME
            - RECURRING
            - USAGE
            - ONETIMERECURRING
            - ONETIMEUSAGE
            - RECURRINGUSAGE
            - ONETIMERECURRINGUSAGE
          type: string
        discountAmount:
          description: |
            Only applicable if the discount charge is a fixed-amount discount.
          type: number
        discountLevel:
          description: |
            Application scope of the discount charge. For example, if the value of this field is `subscription` and the value of the `applyDiscountTo` field is `RECURRING`, the discount charge applies to all recurring charges in the same subscription as the discount charge.
          enum:
            - rateplan
            - subscription
            - account
          type: string
        discountPercentage:
          description: |
            Only applicable if the discount charge is a percentage discount.
          type: number
        priceChangeOption:
          description: |
            Specifies how Zuora changes the price of the charge each time the subscription renews.
          enum:
            - NoChange
            - UseLatestProductCatalogPricing
          type: string
      title: discount
      type: object
    DiscountPricingUpdate:
      properties:
        applyDiscountTo:
          description: |
            Specifies which type of charge the discount charge applies to.
          enum:
            - ONETIME
            - RECURRING
            - USAGE
            - ONETIMERECURRING
            - ONETIMEUSAGE
            - RECURRINGUSAGE
            - ONETIMERECURRINGUSAGE
          type: string
        discountLevel:
          description: |
            Application scope of the discount charge. For example, if the value of this field is `subscription` and the value of the `applyDiscountTo` field is `RECURRING`, the discount charge applies to all recurring charges in the same subscription as the discount charge.
          enum:
            - rateplan
            - subscription
            - account
          type: string
        discountPercentage:
          description: |
            The amount of the discount as a percentage. This field is only used for percentage discounts.
          type: number
        priceChangeOption:
          description: |
            Specifies how Zuora changes the price of the charge each time the subscription renews.
          enum:
            - NoChange
            - UseLatestProductCatalogPricing
          type: string
      type: object
    ElectronicPaymentOptions:
      properties:
        PaymentMethodId:
          description: ""
          type: string
      type: object
    EndConditions:
      description: |
        Specifies when a charge becomes inactive.
      properties:
        endDateCondition:
          description: |
            Condition for the charge to become inactive.

            If the value of this field is `Fixed_Period`, the charge is active for a predefined duration based on the value of the `upToPeriodsType` and `upToPeriods` fields.

            If the value of this field is `Specific_End_Date`, use the `specificEndDate` field to specify the date when then charge becomes inactive.
          enum:
            - Subscription_End
            - Fixed_Period
            - Specific_End_Date
          type: string
        specificEndDate:
          description: |
            Date in YYYY-MM-DD format. Only applicable if the value of the `endDateCondition` field is `Specific_End_Date`.
          format: date
          type: string
        upToPeriods:
          description: |
            Duration of the charge in billing periods, days, weeks, months, or years, depending on the value of the `upToPeriodsType` field. Only applicable if the value of the `endDateCondition` field is `Fixed_Period`.
          type: integer
        upToPeriodsType:
          description: |
            Unit of time that the charge duration is measured in. Only applicable if the value of the `endDateCondition` field is `Fixed_Period`.
          enum:
            - Billing_Periods
            - Days
            - Weeks
            - Months
            - Years
          type: string
      title: endDate
      type: object
    Error401:
      properties:
        code:
          example: 7101251X
          format: Int32
          type: integer
        message:
          example: Unauthorized Action
          type: string
      type: object
    ErrorResponse:
      example:
        reasons:
          - code: ObjectNotFound
            message: Notification definition with id 6e569e1e05f040eda51a927b140c0ac1 does not exist
      properties:
        reasons:
          items:
            properties:
              code:
                description: |
                  The error code of response.
                type: string
              message:
                description: The detail information of the error response
                type: string
            type: object
          type: array
      type: object
    ErrorResponse401Record:
      properties:
        code:
          example: 7101251X
          format: Int32
          type: integer
        details:
          example:
            - code: 7101251X
              message: Unauthorized to view object record.
          items:
            $ref: "#/components/schemas/Error401"
          type: array
        message:
          example: Unauthorized to process object record.
          type: string
      type: object
    EventRevenueItemType:
      allOf:
        - properties:
            accountingPeriodName:
              description: |
                Name of the accounting period. The open-ended accounting period is named `Open-Ended`.
              type: string
          required:
            - accountingPeriodName
          type: object
        - $ref: "#/components/schemas/RevenueEventItemObjectCustomFields"
      title: revenueItems
    EventTrigger:
      properties:
        active:
          description: The status of the trigger.
          type: boolean
        baseObject:
          description: "The base object that the trigger rule is defined upon. Should be specified in the pattern: ^[A-Z][\\\\w\\\\-]*$"
          maxLength: 100
          minLength: 1
          type: string
        condition:
          description: The JEXL expression to be evaluated against object changes. See above for more information and an example.
          maxLength: 5000
          minLength: 1
          type: string
        description:
          description: The description of the trigger.
          maxLength: 1000
          type: string
        eventType:
          $ref: "#/components/schemas/EventType"
        id:
          format: uuid
          type: string
      type: object
    EventType:
      properties:
        description:
          description: The description of the event type.
          maxLength: 1000
          type: string
        displayName:
          description: The display name for the event type.
          maxLength: 500
          minLength: 1
          type: string
        name:
          description: "The name of the event. Should be unique, contain no space, and be in the pattern: ^[A-Za-z]{1,}[\\\\w\\\\-]*$"
          maxLength: 200
          minLength: 1
          type: string
      required:
        - name
        - displayName
      type: object
    ExecuteResult:
      properties:
        Errors:
          description: ""
          items:
            $ref: "#/components/schemas/ActionsErrorResponse"
          type: array
        Id:
          description: |
            The ID of the object in the call. The value is the same as the value you provide in the `ids` field for the request.
          type: string
        Success:
          description: |
            Returns `true` if the call was processed successfully, otherwise `false`.
          type: boolean
      type: object
    ExternalPaymentOptions:
      properties:
        Amount:
          description: ""
          format: double
          type: number
        EffectiveDate:
          description: ""
          format: date
          type: string
        GatewayOrderId:
          description: ""
          type: string
        PaymentMethodId:
          description: ""
          type: string
        ReferenceId:
          description: ""
          maxLength: 100
          type: string
      type: object
    FeatureObjectCustomFields:
      additionalProperties:
        description: |
          Custom fields of the Feature object. The name of each custom field has the form <code>*customField*__c</code>. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
      description: |
        Container for custom fields of a Feature object.
      title: featureFieldsCustom
      type: object
    FieldsAdditionalProperties:
      additionalProperties:
        type: string
      description: |
        Field mappings in the form of `<this-object-field-name>`: `<other-object-field-name>`.
      title: relationshipFieldMapping
      type: object
    FieldsAdditionalPropertiesForPostDefinition:
      additionalProperties:
        type: string
      description: |
        Field mappings in the form of `<this-object-field-name>`: `<other-object-field-name>`. Usually the `<other-object-field-name>` can only be the `Id` field of the related object. Two exceptions are Subscription Name and Rate Plan Charge Number as both of them are unique.
      title: relationshipFieldMapping
      type: object
    FilterRuleParameterDefinition:
      description: |
        Definition of a filter rule parameter.
      properties:
        description:
          maxLength: 255
          type: string
        displayName:
          description: |
            The display name of the parameter.
          maxLength: 255
          type: string
        options:
          description: |
            The option values of the parameter.
          items:
            type: string
          type: array
        valueType:
          description: |
            The type of the value.
          enum:
            - STRING
            - BYTE
            - SHORT
            - CHARACTER
            - INTEGER
            - LONG
            - FLOAT
            - DOUBLE
            - BOOLEAN
            - BIG_INTEGER
            - BIG_DECIMAL
            - LOCAL_DATE
            - LOCAL_DATE_TIME
            - TIMESTAMP
            - BYTE_ARRAY
            - SHORT_ARRAY
            - CHARACTER_ARRAY
            - INTEGER_ARRAY
            - FLOAT_ARRAY
            - DOUBLE_ARRAY
            - BOOLEAN_ARRAY
            - STRING_ARRAY
            - BIG_INTEGER_ARRAY
            - BIG_DECIMAL_ARRAY
            - LOCAL_DATE_ARRAY
            - LOCAL_DATE_TIME_ARRAY
            - TIMESTAMP_ARRAY
          type: string
      title: parameter
      type: object
    FilterRuleParameterDefinitions:
      additionalProperties:
        $ref: "#/components/schemas/FilterRuleParameterDefinition"
      description: |
        The parameters of the filter rule and their name must match those in the filter rule. And all parameters must be defined in the event type payload. The name of parameters can't be duplicate. The following reserved keywords should not be used as a parameter name: `AttachmentList`, `RecipientList`, `RecipientType`, `Exceptions`, `OCP_OBJECT_TYPE`, `OCP_OBJECT_ID`, `OCP_TRIGGER_BY`
      title: parameters
      type: object
    FilterRuleParameterValues:
      additionalProperties:
        description: |
          The following reserved key words should not be used as a parameter name: `AttachmentList`, `RecipientList`, `RecipientType`, `Exceptions`, `OCP_OBJECT_TYPE`, `OCP_OBJECT_ID`, `OCP_TRIGGER_BY`. `Include.Attachment` is a special boolean parameter. By specifying this parameter, you can tell a notification whose event type is based on Invoice to include attachments while sending emails.
        type: string
      description: |
        The parameter values used to configure the filter rule.
      title: filterRuleParams
      type: object
    GETAPaymentGatwayResponse:
      properties:
        id:
          description: The ID of the payment gateway.
          type: string
        isActive:
          description: Specifies if this payment gateway is in active status.
          type: boolean
        isDefault:
          description: Specifies if this is the default payment gateway to process payments for your customer accounts.
          type: boolean
        name:
          description: The name of the payment gateway.
          type: string
        type:
          description: The type of the payment gateway
          type: string
      title: paymentgateways
      type: object
    GETARPaymentType:
      allOf:
        - properties:
            accountId:
              description: |
                The ID of the customer account that the payment is for.
              type: string
            amount:
              description: |
                The total amount of the payment.
              format: double
              type: number
            appliedAmount:
              description: |
                The applied amount of the payment.
              format: double
              type: number
            authTransactionId:
              description: |
                The authorization transaction ID from the payment gateway.
              type: string
            bankIdentificationNumber:
              description: |
                The first six digits of the credit card or debit card used for the payment, when applicable.
              type: string
            cancelledOn:
              description: |
                The date and time when the payment was cancelled, in `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
              type: string
            comment:
              description: |
                Comments about the payment.
              type: string
            createdById:
              description: |
                The ID of the Zuora user who created the payment.
              type: string
            createdDate:
              description: |
                The date and time when the payment was created, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-01 15:31:10.
              format: date-time
              type: string
            creditBalanceAmount:
              description: |
                The amount that the payment transfers to the credit balance. The value is not `0` only for those payments that come from legacy payment operations performed without the Invoice Settlement feature.
              format: double
              type: number
            currency:
              description: |
                When Standalone Payment is not enabled, the `currency` of the payment must be the same as the payment currency defined in the customer account settings through Zuora UI.

                When Standalone Payment is enabled and `standalone` is `true`, the `currency` of the standalone payment can be different from the payment currency defined in the customer account settings. The amount will not be summed up to the account balance or key metrics regardless of currency.
              type: string
            effectiveDate:
              description: |
                The date and time when the payment takes effect, in `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
              type: string
            financeInformation:
              description: |
                Container for the finance information related to the payment.
              properties:
                bankAccountAccountingCode:
                  description: |
                    The accounting code that maps to a bank account in your accounting system.
                  type: string
                bankAccountAccountingCodeType:
                  description: |
                    The type of the accounting code that maps to a bank account in your accounting system.
                  type: string
                transferredToAccounting:
                  description: |
                    Whether the payment was transferred to an external accounting system. Use this field for integration with accounting systems, such as NetSuite. 
                  enum:
                    - Processing
                    - Yes
                    - No
                    - Error
                    - Ignore
                  type: string
                unappliedPaymentAccountingCode:
                  description: |
                    The accounting code for the unapplied payment.
                  type: string
                unappliedPaymentAccountingCodeType:
                  description: |
                    The type of the accounting code for the unapplied payment.
                  type: string
              type: object
            gatewayId:
              description: |
                The ID of the gateway instance that processes the payment.
              type: string
            gatewayOrderId:
              description: |
                A merchant-specified natural key value that can be passed to the electronic payment gateway when a payment is created.  If not specified, the payment number will be passed in instead.
              type: string
            gatewayReconciliationReason:
              description: |
                The reason of gateway reconciliation.
              type: string
            gatewayReconciliationStatus:
              description: |
                The status of gateway reconciliation.
              type: string
            gatewayResponse:
              description: |
                The message returned from the payment gateway for the payment. This message is gateway-dependent.
              type: string
            gatewayResponseCode:
              description: |
                The code returned from the payment gateway for the payment. This code is gateway-dependent.
              type: string
            gatewayState:
              description: |
                The status of the payment in the gateway; use for reconciliation.
              enum:
                - MarkedForSubmission
                - Submitted
                - Settled
                - NotSubmitted
                - FailedToSettle
              type: string
            id:
              description: |
                The unique ID of the created payment. For example, 4028905f5a87c0ff015a87eb6b75007f.
              type: string
            markedForSubmissionOn:
              description: |
                The date and time when a payment was marked and waiting for batch submission to the payment process, in `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
              type: string
            number:
              description: |
                The unique identification number of the payment. For example, P-00000001.
              type: string
            paymentMethodId:
              description: |
                The unique ID of the payment method that the customer used to make the payment.
              type: string
            paymentMethodSnapshotId:
              description: |
                The unique ID of the payment method snapshot which is a copy of the particular Payment Method used in a transaction.
              type: string
            payoutId:
              description: |
                The payout ID of the payment from the gateway side.
              type: string
            referenceId:
              description: |
                The transaction ID returned by the payment gateway. Use this field to reconcile payments between your gateway and Zuora Payments.
              type: string
            refundAmount:
              description: |
                The amount of the payment that is refunded.
              format: double
              type: number
            secondPaymentReferenceId:
              description: |
                The transaction ID returned by the payment gateway if there is an additional transaction for the payment. Use this field to reconcile payments between your gateway and Zuora Payments.
              type: string
            settledOn:
              description: |
                The date and time when the payment was settled in the payment processor, in `yyyy-mm-dd hh:mm:ss` format. This field is used by the Spectrum gateway only and not applicable to other gateways.
              format: date-time
              type: string
            softDescriptor:
              description: |
                A payment gateway-specific field that maps to Zuora for the gateways, Orbital, Vantiv and Verifi.
              type: string
            softDescriptorPhone:
              description: |
                A payment gateway-specific field that maps to Zuora for the gateways, Orbital, Vantiv and Verifi.
              type: string
            standalone:
              default: false
              description: |
                This field is only available if the support for standalone payment is enabled. This field is not available for transferring, applying, or unapplying a payment.

                The value `true` indicates this is a standalone payment that is created and processed in Zuora through Zuora gateway integration but will be settled outside of Zuora. No settlement data will be created. The standalone payment cannot be applied, unapplied, or transferred.

                The value `false` indicates this is an ordinary payment that is created, processed, and settled in Zuora.
              type: boolean
            status:
              description: |
                The status of the payment.
              enum:
                - Draft
                - Processing
                - Processed
                - Error
                - Canceled
                - Posted
              type: string
            submittedOn:
              description: |
                The date and time when the payment was submitted, in `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
              type: string
            success:
              description: Returns `true` if the request was processed successfully.
              type: boolean
            type:
              description: |
                The type of the payment.
              enum:
                - External
                - Electronic
              type: string
            unappliedAmount:
              description: |
                The unapplied amount of the payment.
              format: double
              type: number
            updatedById:
              description: |
                The ID of the Zuora user who last updated the payment.
              type: string
            updatedDate:
              description: |
                The date and time when the payment was last updated, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-02 15:36:10.
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/PaymentObjectNSFields"
        - $ref: "#/components/schemas/PaymentObjectCustomFields"
    GETARPaymentTypewithSuccess:
      allOf:
        - properties:
            accountId:
              description: |
                The ID of the customer account that the payment is for.
              type: string
            amount:
              description: |
                The total amount of the payment.
              format: double
              type: number
            appliedAmount:
              description: |
                The applied amount of the payment.
              format: double
              type: number
            authTransactionId:
              description: |
                The authorization transaction ID from the payment gateway.
              type: string
            bankIdentificationNumber:
              description: |
                The first six digits of the credit card or debit card used for the payment, when applicable.
              type: string
            cancelledOn:
              description: |
                The date and time when the payment was cancelled, in `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
              type: string
            comment:
              description: |
                Comments about the payment.
              type: string
            createdById:
              description: |
                The ID of the Zuora user who created the payment part.
              type: string
            createdDate:
              description: |
                The date and time when the payment was created, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-01 15:31:10.
              format: date-time
              type: string
            creditBalanceAmount:
              description: |
                The amount that the payment transfers to the credit balance. The value is not `0` only for those payments that come from legacy payment operations performed without the Invoice Settlement feature.
              format: double
              type: number
            currency:
              description: |
                When Standalone Payment is not enabled, the `currency` of the payment must be the same as the payment currency defined in the customer account settings through Zuora UI.

                When Standalone Payment is enabled and `standalone` is `true`, the `currency` of the standalone payment can be different from the payment currency defined in the customer account settings. The amount will not be summed up to the account balance or key metrics regardless of currency.
              type: string
            effectiveDate:
              description: |
                The date and time when the payment takes effect, in `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
              type: string
            financeInformation:
              description: |
                Container for the finance information related to the payment.
              properties:
                bankAccountAccountingCode:
                  description: |
                    The accounting code that maps to a bank account in your accounting system.
                  type: string
                bankAccountAccountingCodeType:
                  description: |
                    The type of the accounting code that maps to a bank account in your accounting system.
                  type: string
                transferredToAccounting:
                  description: |
                    Whether the payment was transferred to an external accounting system. Use this field for integration with accounting systems, such as NetSuite. 
                  enum:
                    - Processing
                    - Yes
                    - No
                    - Error
                    - Ignore
                  type: string
                unappliedPaymentAccountingCode:
                  description: |
                    The accounting code for the unapplied payment.
                  type: string
                unappliedPaymentAccountingCodeType:
                  description: |
                    The type of the accounting code for the unapplied payment.
                  type: string
              type: object
            gatewayId:
              description: |
                The ID of the gateway instance that processes the payment.
              type: string
            gatewayOrderId:
              description: |
                A merchant-specified natural key value that can be passed to the electronic payment gateway when a payment is created.
              type: string
            gatewayReconciliationReason:
              description: |
                The reason of gateway reconciliation.
              type: string
            gatewayReconciliationStatus:
              description: |
                The status of gateway reconciliation.
              type: string
            gatewayResponse:
              description: |
                The message returned from the payment gateway for the payment. This message is gateway-dependent.
              type: string
            gatewayResponseCode:
              description: |
                The code returned from the payment gateway for the payment. This code is gateway-dependent.
              type: string
            gatewayState:
              description: |
                The status of the payment in the gateway; use for reconciliation. 
              enum:
                - MarkedForSubmission
                - Submitted
                - Settled
                - NotSubmitted
                - FailedToSettle
              type: string
            id:
              description: |
                The unique ID of the payment. For example, 4028905f5a87c0ff015a87eb6b75007f.
              type: string
            markedForSubmissionOn:
              description: |
                The date and time when a payment was marked and waiting for batch submission to the payment process, in `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
              type: string
            number:
              description: |
                The unique identification number of the payment. For example, P-00000001.
              type: string
            paymentMethodId:
              description: |
                The unique ID of the payment method that the customer used to make the payment.
              type: string
            paymentMethodSnapshotId:
              description: |
                The unique ID of the payment method snapshot which is a copy of the particular Payment Method used in a transaction.
              type: string
            payoutId:
              description: |
                The payout ID of the payment from the gateway side.
              type: string
            referenceId:
              description: |
                The transaction ID returned by the payment gateway. Use this field to reconcile payments between your gateway and Zuora Payments.
              type: string
            refundAmount:
              description: |
                The amount of the payment that is refunded.
              format: double
              type: number
            secondPaymentReferenceId:
              description: |
                The transaction ID returned by the payment gateway if there is an additional transaction for the payment. Use this field to reconcile payments between your gateway and Zuora Payments.
              type: string
            settledOn:
              description: |
                The date and time when the payment was settled in the payment processor, in `yyyy-mm-dd hh:mm:ss` format. This field is used by the Spectrum gateway only and not applicable to other gateways.
              format: date-time
              type: string
            softDescriptor:
              description: |
                A payment gateway-specific field that maps to Zuora for the gateways, Orbital, Vantiv and Verifi.
              type: string
            softDescriptorPhone:
              description: |
                A payment gateway-specific field that maps to Zuora for the gateways, Orbital, Vantiv and Verifi.
              type: string
            standalone:
              default: false
              description: |
                This field is only available if the support for standalone payment is enabled.

                The value `true` indicates this is a standalone payment that is created and processed in Zuora through Zuora gateway integration but will be settled outside of Zuora. No settlement data will be created. The standalone payment cannot be applied, unapplied, or transferred.

                The value `false` indicates this is an ordinary payment that is created, processed, and settled in Zuora.
              type: boolean
            status:
              description: |
                The status of the payment.
              enum:
                - Draft
                - Processing
                - Processed
                - Error
                - Canceled
                - Posted
              type: string
            submittedOn:
              description: |
                The date and time when the payment was submitted, in `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
              type: string
            type:
              description: |
                The type of the payment.
              enum:
                - External
                - Electronic
              type: string
            unappliedAmount:
              description: |
                The unapplied amount of the payment.
              format: double
              type: number
            updatedById:
              description: |
                The ID of the Zuora user who last updated the payment.
              type: string
            updatedDate:
              description: |
                The date and time when the payment was last updated, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-02 15:36:10.
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/PaymentObjectNSFields"
        - $ref: "#/components/schemas/PaymentObjectCustomFields"
      title: payments
    GETAccountSummaryInvoiceType:
      properties:
        amount:
          description: |
            Invoice amount before adjustments, discounts, and similar items.
          type: number
        balance:
          description: |
            Balance due on the invoice.
          format: decimal
          type: string
        dueDate:
          description: |
            Due date as `yyyy-mm-dd`.
          format: date
          type: string
        id:
          description: |
            Invoice ID.
          type: string
        invoiceDate:
          description: |
            Invoice date as `yyyy-mm-dd`.
          format: date
          type: string
        invoiceNumber:
          description: |
            Invoice number.
          type: string
        status:
          description: |
            Invoice status - not the payment status of the invoice, just the status of the invoice itself. Possible values are: `Posted`, `Draft`, `Canceled`, `Error`.
          type: string
      title: invoices
      type: object
    GETAccountSummaryPaymentInvoiceType:
      properties:
        appliedPaymentAmount:
          description: |
            Amount of payment applied to the invoice.
          format: decimal
          type: string
        invoiceId:
          description: |
            Invoice ID.
          type: string
        invoiceNumber:
          description: |
            Invoice number.
          type: string
      title: paidInvoices
      type: object
    GETAccountSummaryPaymentType:
      properties:
        effectiveDate:
          description: |
            Effective date as `yyyy-mm-dd`.
          format: date
          type: string
        id:
          description: |
            Payment ID.
          type: string
        paidInvoices:
          description: |
            Container for paid invoices for this subscription.
          items:
            $ref: "#/components/schemas/GETAccountSummaryPaymentInvoiceType"
          type: array
        paymentNumber:
          description: |
            Payment number.
          type: string
        paymentType:
          description: |
            Payment type; possible values are: `External`, `Electronic`.
          type: string
        status:
          description: |
            Payment status. Possible values are: `Draft`, `Processing`, `Processed`, `Error`, `Voided`, `Canceled`, `Posted`.
          type: string
      title: payments
      type: object
    GETAccountSummarySubscriptionRatePlanType:
      properties:
        productId:
          description: |
            Product ID.
          type: string
        productName:
          description: |
            Product name.
          type: string
        productRatePlanId:
          description: |
            Product Rate Plan ID.
          type: string
        productSku:
          description: ""
          type: string
        ratePlanName:
          description: |
            Rate plan name.
          type: string
      title: ratePlans
      type: object
    GETAccountSummarySubscriptionType:
      allOf:
        - properties:
            autoRenew:
              description: |
                If `true`, auto-renew is enabled. If `false`, auto-renew is disabled.
              type: boolean
            id:
              description: |
                Subscription ID.
              type: string
            initialTerm:
              description: |
                Duration of the initial subscription term in whole months. 
              type: string
            ratePlans:
              description: |
                Container for rate plans for this subscription.
              items:
                $ref: "#/components/schemas/GETAccountSummarySubscriptionRatePlanType"
              type: array
            renewalTerm:
              description: |
                Duration of the renewal term in whole months.
              type: string
            status:
              description: |
                Subscription status; possible values are: `Draft`, `PendingActivation`, `PendingAcceptance`, `Active`, `Cancelled`, `Expired`.
              type: string
            subscriptionNumber:
              description: |
                Subscription Number.
              type: string
            subscriptionStartDate:
              description: |
                Subscription start date.
              format: date
              type: string
            termEndDate:
              description: |
                End date of the subscription term. If the subscription is evergreen, this is either null or equal to the cancellation date, as appropriate.
              format: date
              type: string
            termStartDate:
              description: |
                Start date of the subscription term. If this is a renewal subscription, this date is different than the subscription start date.
              format: date
              type: string
            termType:
              description: |
                Possible values are: `TERMED`, `EVERGREEN`.
              type: string
          type: object
        - $ref: "#/components/schemas/SubscriptionObjectQTFields"
        - $ref: "#/components/schemas/SubscriptionObjectNSFields"
        - $ref: "#/components/schemas/SubscriptionObjectCustomFields"
      title: subscriptions
    GETAccountSummaryType:
      properties:
        basicInfo:
          $ref: "#/components/schemas/GETAccountSummaryTypeBasicInfo"
        billToContact:
          $ref: "#/components/schemas/GETAccountSummaryTypeBillToContact"
        invoices:
          description: |
            Container for invoices. Only returns the last 6 invoices.
          items:
            $ref: "#/components/schemas/GETAccountSummaryInvoiceType"
          type: array
        payments:
          description: |
            Container for payments. Only returns the last 6 payments.
          items:
            $ref: "#/components/schemas/GETAccountSummaryPaymentType"
          type: array
        soldToContact:
          $ref: "#/components/schemas/GETAccountSummaryTypeSoldToContact"
        subscriptions:
          description: |
            Container for subscriptions.
          items:
            $ref: "#/components/schemas/GETAccountSummarySubscriptionType"
          type: array
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
        taxInfo:
          description: |
            Container for tax exempt information, used to establish the tax exempt status of a customer account.
          properties:
            VATId:
              description: |
                EU Value Added Tax ID.
              type: string
            companyCode:
              description: |
                Unique code that identifies a company account in Avalara.
              type: string
            exemptCertificateId:
              description: |
                ID of the customer tax exemption certificate.
              type: string
            exemptCertificateType:
              description: |
                Type of tax exemption certificate that the customer holds.
              type: string
            exemptDescription:
              description: |
                Description of the tax exemption certificate that the customer holds.
              type: string
            exemptEffectiveDate:
              description: |
                Date when the customer tax exemption starts.
              format: date
              type: string
            exemptEntityUseCode:
              description: |
                A unique entity use code to apply exemptions in Avalara AvaTax.

                This account-level field is required only when you choose Avalara as your tax engine. See [Exempt Transactions](https://developer.avalara.com/avatax/handling-tax-exempt-customers/)for more details.
              maxLength: 64
              type: string
            exemptExpirationDate:
              description: |
                Date when the customer tax exemption expires.
              format: date
              type: string
            exemptIssuingJurisdiction:
              description: |
                Jurisdiction in which the customer tax exemption certificate was issued.
              type: string
            exemptStatus:
              description: |
                Status of the account tax exemption.
              type: string
          type: object
        usage:
          description: |
            Container for usage data. Only returns the last 6 months of usage.

            **Note:** If the Active Rating feature is enabled, no usage data is returned in the response body field.
          items:
            $ref: "#/components/schemas/GETAccountSummaryUsageType"
          type: array
      type: object
    GETAccountSummaryTypeBasicInfo:
      allOf:
        - properties:
            accountNumber:
              description: |
                Account number.
              type: string
            additionalEmailAddresses:
              description: |
                A list of additional email addresses to receive emailed invoices.
              items:
                type: string
              type: array
            balance:
              description: |
                Current outstanding balance.
              format: decimal
              type: string
            batch:
              description: |
                The alias name given to a batch. A string of 50 characters or less.
              type: string
            billCycleDay:
              description: |
                Billing cycle day (BCD), the day of the month when a bill run generates invoices for the account.
              type: string
            currency:
              description: |
                A currency as defined in Billing Settings in the Zuora UI.
              type: string
            defaultPaymentMethod:
              description: ""
              properties:
                creditCardExpirationMonth:
                  description: |
                    Two-digit numeric card expiration month as `mm`.
                  type: string
                creditCardExpirationYear:
                  description: |
                    Four-digit card expiration year as `yyyy`.
                  type: string
                creditCardNumber:
                  description: |
                    Credit card number, 16 characters or less, displayed in masked format (e.g., ************1234).
                  type: string
                creditCardType:
                  description: |
                    The type of the credit card.

                    Possible values  include `Visa`, `MasterCard`, `AmericanExpress`, `Discover`, `JCB`, and `Diners`. For more information about credit card types supported by different payment gateways, see [Supported Payment Methods](https://knowledgecenter.zuora.com/Zuora_Central/Billing_and_Payments/L_Payment_Methods/Supported_Payment_Methods).
                  type: string
                id:
                  description: |
                    ID of the default payment method associated with this account.
                  type: string
                paymentMethodType:
                  description: ""
                  type: string
              type: object
            id:
              description: |
                Account ID.
              type: string
            invoiceDeliveryPrefsEmail:
              description: |
                Whether the customer wants to receive invoices through email. 
              type: boolean
            invoiceDeliveryPrefsPrint:
              description: |
                Whether the customer wants to receive printed invoices, such as through postal mail.
              type: boolean
            lastInvoiceDate:
              description: |
                Date of the most recent invoice for the account; null if no invoice has ever been generated.
              format: date
              type: string
            lastPaymentAmount:
              description: |
                Amount of the most recent payment collected for the account; null if no payment has ever been collected.
              format: decimal
              type: string
            lastPaymentDate:
              description: |
                Date of the most recent payment collected for the account. Null if no payment has ever been collected.
              format: date
              type: string
            name:
              description: |
                Account name.
              type: string
            status:
              description: |
                Account status; possible values are: `Active`, `Draft`, `Canceled`.
              type: string
            tags:
              description: ""
              type: string
          type: object
        - $ref: "#/components/schemas/AccountObjectNSFields"
        - $ref: "#/components/schemas/AccountObjectCustomFields"
      description: |
        Container for basic information about the account.
      title: basicInfo
    GETAccountSummaryTypeBillToContact:
      allOf:
        - properties:
            address1:
              description: |
                First address line, 255 characters or less.
              type: string
            address2:
              description: |
                Second address line, 255 characters or less.
              type: string
            city:
              description: |
                City, 40 characters or less.
              type: string
            country:
              description: |
                Full country name. This field does not contain the ISO-standard abbreviation of the country name.
              type: string
            county:
              description: "County; 32 characters or less. Zuora Tax uses this information to calculate county taxation.          "
              type: string
            fax:
              description: |
                Fax phone number, 40 characters or less.
              type: string
            firstName:
              description: |
                First name, 100 characters or less.
              type: string
            id:
              description: |
                Contact ID.
              type: string
            lastName:
              description: |
                Last name, 100 characters or less.
              type: string
            state:
              description: |
                Full state name. This field does not contain the ISO-standard abbreviation of the state name.
              type: string
            taxRegion:
              description: |
                A region string, defined in your Zuora tax rules.
              type: string
            workEmail:
              description: |
                Work email address, 80 characters or less.
              type: string
            workPhone:
              description: |
                Work phone number, 40 characters or less.
              type: string
            zipCode:
              description: |
                Zip code, 20 characters or less.
              type: string
          type: object
        - $ref: "#/components/schemas/ContactObjectCustomFields"
      description: Container for bill-to contact information.
      title: Contact
    GETAccountSummaryTypeSoldToContact:
      allOf:
        - properties:
            address1:
              description: |
                First address line, 255 characters or less.
              type: string
            address2:
              description: |
                Second address line, 255 characters or less.
              type: string
            city:
              description: |
                City, 40 characters or less.
              type: string
            country:
              description: |
                Full country name. This field does not contain the ISO-standard abbreviation of the country name.
              type: string
            county:
              description: "County; 32 characters or less. Zuora Tax uses this information to calculate county taxation.          "
              type: string
            fax:
              description: |
                Fax phone number, 40 characters or less.
              type: string
            firstName:
              description: |
                First name, 100 characters or less.
              type: string
            id:
              description: |
                Contact ID.
              type: string
            lastName:
              description: |
                Last name, 100 characters or less.
              type: string
            state:
              description: |
                Full state name. This field does not contain the ISO-standard abbreviation of the state name.
              type: string
            taxRegion:
              description: |
                A region string, defined in your Zuora tax rules.
              type: string
            workEmail:
              description: |
                Work email address, 80 characters or less.
              type: string
            workPhone:
              description: |
                Work phone number, 40 characters or less.
              type: string
            zipCode:
              description: |
                Zip code, 20 characters or less.
              type: string
          type: object
        - $ref: "#/components/schemas/ContactObjectCustomFields"
      description: |
        Container for sold-to contact information; uses the same structure as `billToContact`.
      title: Contact
    GETAccountSummaryUsageType:
      properties:
        quantity:
          description: |
            Number of units used.
          format: decimal
          type: string
        startDate:
          description: |
            The start date of a usage period as `yyyy-mm`. Zuora uses this field value to determine the usage date.
          format: date
          type: string
        unitOfMeasure:
          description: |
            Unit by which consumption is measured, as configured in the Billing Settings section of the web-based UI.
          type: string
      title: usage
      type: object
    GETAccountType:
      properties:
        basicInfo:
          $ref: "#/components/schemas/GETAccountTypeBasicInfo"
        billToContact:
          $ref: "#/components/schemas/GETAccountTypeBillToContact"
        billingAndPayment:
          description: |
            Container for billing and payment information for the account.
          properties:
            additionalEmailAddresses:
              description: |
                A list of additional email addresses to receive emailed invoices.
              items:
                type: string
              type: array
            billCycleDay:
              description: |
                Billing cycle day (BCD), the day of the month when a bill run generates invoices for the account.
              type: string
            currency:
              description: |
                A currency defined in the web-based UI administrative settings.
              type: string
            invoiceDeliveryPrefsEmail:
              description: |
                Whether the customer wants to receive invoices through email. 
              type: boolean
            invoiceDeliveryPrefsPrint:
              description: |
                Whether the customer wants to receive printed invoices, such as through postal mail.
              type: boolean
            paymentGateway:
              description: |
                The name of the payment gateway instance. If null or left unassigned, the Account will use the Default Gateway.
              type: string
            paymentTerm:
              description: |
                A payment-terms indicator defined in the web-based UI administrative settings, e.g., "Net 30".
              type: string
          type: object
        metrics:
          description: |
            Container for account metrics.
          properties:
            balance:
              description: |
                The customer's total invoice balance minus credit balance.
              format: decimal
              type: string
            contractedMrr:
              description: |
                Future expected MRR that accounts for future upgrades, downgrades, upsells and cancellations.
              format: decimal
              type: string
            creditBalance:
              description: |
                Current credit balance.
              format: decimal
              type: string
            totalDebitMemoBalance:
              description: |
                **Note:** This field is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

                Total balance of all posted debit memos.
              format: decimal
              type: string
            totalInvoiceBalance:
              description: |
                Total balance of all posted invoices.
              format: decimal
              type: string
            unappliedCreditMemoAmount:
              description: |
                **Note:** This field is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

                Total unapplied amount of all posted credit memos.
              format: decimal
              type: string
            unappliedPaymentAmount:
              description: |
                **Note:** This field is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

                Total unapplied amount of all posted payments.
              format: decimal
              type: string
          type: object
        soldToContact:
          $ref: "#/components/schemas/GETAccountTypeSoldToContact"
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
        taxInfo:
          description: |
            Container for tax exempt information, used to establish the tax exempt status of a customer account.
          properties:
            VATId:
              description: |
                EU Value Added Tax ID.
              type: string
            companyCode:
              description: |
                Unique code that identifies a company account in Avalara.
              type: string
            exemptCertificateId:
              description: |
                ID of the customer tax exemption certificate.
              type: string
            exemptCertificateType:
              description: |
                Type of tax exemption certificate that the customer holds.
              type: string
            exemptDescription:
              description: |
                Description of the tax exemption certificate that the customer holds.
              type: string
            exemptEffectiveDate:
              description: |
                Date when the customer tax exemption starts.
              format: date
              type: string
            exemptEntityUseCode:
              description: |
                A unique entity use code to apply exemptions in Avalara AvaTax.

                This account-level field is required only when you choose Avalara as your tax engine. See [Exempt Transactions](https://developer.avalara.com/avatax/handling-tax-exempt-customers/)for more details.
              maxLength: 64
              type: string
            exemptExpirationDate:
              description: |
                Date when the customer tax exemption expires.
              format: date
              type: string
            exemptIssuingJurisdiction:
              description: |
                Jurisdiction in which the customer tax exemption certificate was issued.
              type: string
            exemptStatus:
              description: |
                Status of the account tax exemption.
              type: string
          type: object
      type: object
    GETAccountTypeBasicInfo:
      allOf:
        - properties:
            accountNumber:
              description: |
                Account number.
              type: string
            batch:
              description: |
                The alias name given to a batch. A string of 50 characters or less.
              type: string
            communicationProfileId:
              description: |
                ID of a communication profile.
              type: string
            creditMemoTemplateId:
              description: |
                **Note:** This field is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

                The unique ID of the credit memo template, configured in **Billing Settings** > **Manage Billing Document Configuration** through the Zuora UI. For example, 2c92c08a6246fdf101626b1b3fe0144b.
              type: string
            crmId:
              description: |
                CRM account ID for the account, up to 100 characters.
              type: string
            currency:
              description: |
                A currency as defined in Billing Settings in the Zuora UI.
              type: string
            debitMemoTemplateId:
              description: |
                **Note:** This field is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

                The unique ID of the debit memo template, configured in **Billing Settings** > **Manage Billing Document Configuration** through the Zuora UI. For example, 2c92c08d62470a8501626b19d24f19e2.
              type: string
            id:
              description: |
                Account ID.
              type: string
            invoiceTemplateId:
              description: |
                Invoice template ID, configured in Billing Settings in the Zuora UI.
              type: string
            name:
              description: |
                Account name.
              type: string
            notes:
              description: |
                Notes associated with the account, up to 65,535 characters.
              type: string
            parentId:
              description: Identifier of the parent customer account for this Account object. The length is 32 characters. Use this field if you have customer hierarchy enabled.
              type: string
            salesRep:
              description: The name of the sales representative associated with this account, if applicable. Maximum of 50 characters.
              type: string
            sequenceSetId:
              description: |
                The ID of the billing document sequence set that is assigned to the customer account. 
              type: string
            status:
              description: |
                Account status; possible values are: `Active`, `Draft`, `Canceled`.
              type: string
            tags:
              description: ""
              type: string
          type: object
        - $ref: "#/components/schemas/AccountObjectNSFields"
        - $ref: "#/components/schemas/AccountObjectCustomFields"
      description: |
        Container for basic information about the account.
      title: basicInfo
    GETAccountTypeBillToContact:
      allOf:
        - properties:
            address1:
              description: |
                First address line, 255 characters or less.
              type: string
            address2:
              description: |
                Second address line, 255 characters or less.
              type: string
            city:
              description: |
                City, 40 characters or less.
              type: string
            country:
              description: |
                Full country name. This field does not contain the ISO-standard abbreviation of the country name.
              type: string
            county:
              description: "County; 32 characters or less. Zuora Tax uses this information to calculate county taxation.          "
              type: string
            fax:
              description: |
                Fax phone number, 40 characters or less.
              type: string
            firstName:
              description: |
                First name, 100 characters or less.
              type: string
            homePhone:
              description: |
                Home phone number, 40 characters or less.
              type: string
            lastName:
              description: |
                Last name, 100 characters or less.
              type: string
            mobilePhone:
              description: |
                Mobile phone number, 40 characters or less.
              type: string
            nickname:
              description: |
                Nickname for this contact.
              type: string
            otherPhone:
              description: |
                Other phone number, 40 characters or less.
              type: string
            otherPhoneType:
              description: |
                Possible values are: `Work`, `Mobile`, `Home`, `Other`.
              type: string
            personalEmail:
              description: |
                Personal email address, 80 characters or less.
              type: string
            state:
              description: |
                Full state name. This field does not contain the ISO-standard abbreviation of the state name.
              type: string
            taxRegion:
              description: |
                A region string, defined in your Zuora tax rules.
              type: string
            workEmail:
              description: |
                Work email address, 80 characters or less.
              type: string
            workPhone:
              description: |
                Work phone number, 40 characters or less.
              type: string
            zipCode:
              description: |
                Zip code, 20 characters or less.
              type: string
          type: object
        - $ref: "#/components/schemas/ContactObjectCustomFields"
      description: |
        Container for bill-to contact information.
      title: Contact
    GETAccountTypeSoldToContact:
      allOf:
        - properties:
            address1:
              description: |
                First address line, 255 characters or less.
              type: string
            address2:
              description: |
                Second address line, 255 characters or less.
              type: string
            city:
              description: |
                City, 40 characters or less.
              type: string
            country:
              description: |
                Full country name. This field does not contain the ISO-standard abbreviation of the country name.
              type: string
            county:
              description: "County; 32 characters or less. Zuora tax uses this information to calculate county taxation.          "
              type: string
            fax:
              description: |
                Fax phone number, 40 characters or less.
              type: string
            firstName:
              description: |
                First name, 100 characters or less.
              type: string
            homePhone:
              description: |
                Home phone number, 40 characters or less.
              type: string
            lastName:
              description: |
                Last name, 100 characters or less.
              type: string
            mobilePhone:
              description: |
                Mobile phone number, 40 characters or less.
              type: string
            nickname:
              description: |
                Nickname for this contact.
              type: string
            otherPhone:
              description: |
                Other phone number, 40 characters or less.
              type: string
            otherPhoneType:
              description: |
                Possible values are: `Work`, `Mobile`, `Home`, `Other`.
              type: string
            personalEmail:
              description: |
                Personal email address, 80 characters or less.
              type: string
            state:
              description: |
                Full state name. This field does not contain the ISO-standard abbreviation of the state name.
              type: string
            taxRegion:
              description: |
                A region string, defined in your Zuora tax rules.
              type: string
            workEmail:
              description: |
                Work email address, 80 characters or less.
              type: string
            workPhone:
              description: |
                Work phone number, 40 characters or less.
              type: string
            zipCode:
              description: |
                Zip code, 20 characters or less.
              type: string
          type: object
        - $ref: "#/components/schemas/ContactObjectCustomFields"
      description: |
        Container for sold-to contact information. Uses the same field structure as billToContact.
      title: Contact
    GETAccountingCodeItemType:
      allOf:
        - properties:
            category:
              description: |
                The category associated with the accounting code.
              enum:
                - Assets
                - Liabilities
                - Equity
                - Revenue
                - Expenses
              type: string
            createdBy:
              description: |
                The ID of the user who created the accounting code.
              type: string
            createdOn:
              description: |
                Date and time when the accounting code was created.
              format: date-time
              type: string
            glAccountName:
              description: |
                Name of the account in your general ledger.

                Field only available if you have Zuora Finance enabled.
              type: string
            glAccountNumber:
              description: |
                Account number in your general ledger.

                Field only available if you have Zuora Finance enabled.
              type: string
            id:
              description: |
                ID of the accounting code.
              type: string
            name:
              description: |
                Name of the accounting code.
              type: string
            notes:
              description: |
                Any optional notes for the accounting code.
              type: string
            status:
              description: |
                The accounting code status.
              enum:
                - Active
                - Inactive
              type: string
            success:
              description: |
                Returns `true` if the request was processed successfully.
              type: boolean
            type:
              description: |
                Accounting code type. 

                Note that `On-Account Receivable` is only available if you enable the Invoice Settlement feature. 
              enum:
                - AccountsReceivable
                - On-Account Receivable
                - Cash
                - OtherAssets
                - CustomerCashOnAccount
                - DeferredRevenue
                - SalesTaxPayable
                - OtherLiabilities
                - SalesRevenue
                - SalesDiscounts
                - OtherRevenue
                - OtherEquity
                - BadDebt
                - OtherExpenses
              type: string
            updatedBy:
              description: |
                The ID of the user who last updated the accounting code.
              type: string
            updatedOn:
              description: |
                Date and time when the accounting code was last updated.
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/AccountingCodeObjectCustomFields"
    GETAccountingCodeItemWithoutSuccessType:
      allOf:
        - properties:
            category:
              description: |
                The category associated with the accounting code.
              enum:
                - Assets
                - Liabilities
                - Equity
                - Revenue
                - Expenses
              type: string
            createdBy:
              description: |
                The ID of the user who created the accounting code.
              type: string
            createdOn:
              description: |
                Date and time when the accounting code was created.
              format: date-time
              type: string
            glAccountName:
              description: |
                Name of the account in your general ledger.

                Field only available if you have Zuora Finance enabled.
              type: string
            glAccountNumber:
              description: |
                Account number in your general ledger.

                Field only available if you have Zuora Finance enabled.
              type: string
            id:
              description: |
                ID of the accounting code.
              type: string
            name:
              description: |
                Name of the accounting code.
              type: string
            notes:
              description: |
                Any optional notes for the accounting code.
              type: string
            status:
              description: |
                The accounting code status.
              enum:
                - Active
                - Inactive
              type: string
            type:
              description: |
                Accounting code type. 

                Note that `On-Account Receivable` is only available if you enable the Invoice Settlement feature. 
              enum:
                - AccountsReceivable
                - On-Account Receivable
                - Cash
                - OtherAssets
                - CustomerCashOnAccount
                - DeferredRevenue
                - SalesTaxPayable
                - OtherLiabilities
                - SalesRevenue
                - SalesDiscounts
                - OtherRevenue
                - OtherEquity
                - BadDebt
                - OtherExpenses
              type: string
            updatedBy:
              description: |
                The ID of the user who last updated the accounting code.
              type: string
            updatedOn:
              description: |
                Date and time when the accounting code was last updated.
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/AccountingCodeObjectCustomFields"
      title: accountingCodes
    GETAccountingCodesType:
      properties:
        accountingCodes:
          description: |
            An array of all the accounting codes in your chart of accounts. Each accounting code has the following fields.
          items:
            $ref: "#/components/schemas/GETAccountingCodeItemWithoutSuccessType"
          type: array
        nextPage:
          description: |
            URL to retrieve the next page of the response if it exists; otherwise absent.
          format: URL
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GETAccountingPeriodType:
      allOf:
        - properties:
            createdBy:
              description: |
                ID of the user who created the accounting period.
              type: string
            createdOn:
              description: |
                Date and time when the accounting period was created.
              format: date-time
              type: string
            endDate:
              description: |
                The end date of the accounting period.
              format: date
              type: string
            fileIds:
              description: |
                File IDs of the reports available for the accounting period. You can retrieve the reports by specifying the file ID in a [Get Files](https://www.zuora.com/developer/api-reference/#operation/GET_Files) REST API call.
              properties:
                accountsReceivableAccountAgingDetailExportFileId:
                  description: |
                    File ID of the Accounts Receivable Aging Account Detail report.
                  type: string
                accountsReceivableInvoiceAgingDetailExportFileId:
                  description: |
                    File ID of the Accounts Receivable Aging Invoice Detail report.
                  type: string
                arRollForwardDetailExportFileId:
                  description: |
                    File ID of the Accounts Receivable Detail report.
                  type: string
                fxRealizedGainAndLossDetailExportFileId:
                  description: |
                    File ID of the Realized Gain and Loss Detail report.

                    Returned only if you have Foreign Currency Conversion enabled.
                  type: string
                fxUnrealizedGainAndLossDetailExportFileId:
                  description: |
                    File ID of the Unrealized Gain and Loss Detail report.

                    Returned only if you have Foreign Currency Conversion enabled
                  type: string
                revenueDetailCsvFileId:
                  description: |
                    File ID of the Revenue Detail report in CSV format.
                  type: string
                revenueDetailExcelFileId:
                  description: |
                    File ID of the Revenue Detail report in XLSX format.
                  type: string
                unprocessedChargesFileId:
                  description: |
                    File ID of a report containing all unprocessed charges for the accounting period.
                  type: string
              type: object
            fiscalYear:
              description: |
                Fiscal year of the accounting period.
              type: string
            fiscal_quarter:
              description: ""
              format: int64
              type: integer
            id:
              description: |
                ID of the accounting period.
              type: string
            name:
              description: |
                Name of the accounting period.
              type: string
            notes:
              description: |
                Any optional notes about the accounting period.
              type: string
            runTrialBalanceEnd:
              description: |
                Date and time that the trial balance was completed. If the trial balance status is `Pending`, `Processing`, or `Error`, this field is `null`.
              format: date-time
              type: string
            runTrialBalanceErrorMessage:
              description: |
                If trial balance status is Error, an error message is returned in this field.
              type: string
            runTrialBalanceStart:
              description: |
                Date and time that the trial balance was run. If the trial balance status is Pending, this field is null.
              format: date-time
              type: string
            runTrialBalanceStatus:
              description: |
                Status of the trial balance for the accounting period. Possible values:

                * `Pending`
                * `Processing`
                * `Completed`
                * `Error`
              type: string
            startDate:
              description: |
                The start date of the accounting period.
              format: date
              type: string
            status:
              description: |
                Status of the accounting period. Possible values:
                * `Open`
                * `PendingClose`
                * `Closed`
              type: string
            success:
              description: |
                Returns `true` if the request was processed successfully.
              type: boolean
            updatedBy:
              description: |
                ID of the user who last updated the accounting period.
              type: string
            updatedOn:
              description: |
                Date and time when the accounting period was last updated.
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/AccountingPeriodObjectCustomFields"
    GETAccountingPeriodWithoutSuccessType:
      allOf:
        - properties:
            createdBy:
              description: |
                ID of the user who created the accounting period.
              type: string
            createdOn:
              description: |
                Date and time when the accounting period was created.
              format: date-time
              type: string
            endDate:
              description: |
                The end date of the accounting period.
              format: date
              type: string
            fileIds:
              description: |
                File IDs of the reports available for the accounting period. You can retrieve the reports by specifying the file ID in a [Get Files](https://www.zuora.com/developer/api-reference/#operation/GET_Files) REST API call.
              properties:
                accountsReceivableAccountAgingDetailExportFileId:
                  description: |
                    File ID of the Accounts Receivable Aging Account Detail report.
                  type: string
                accountsReceivableInvoiceAgingDetailExportFileId:
                  description: |
                    File ID of the Accounts Receivable Aging Invoice Detail report.
                  type: string
                arRollForwardDetailExportFileId:
                  description: |
                    File ID of the Accounts Receivable Detail report.
                  type: string
                fxRealizedGainAndLossDetailExportFileId:
                  description: |
                    File ID of the Realized Gain and Loss Detail report.

                    Returned only if you have Foreign Currency Conversion enabled.
                  type: string
                fxUnrealizedGainAndLossDetailExportFileId:
                  description: |
                    File ID of the Unrealized Gain and Loss Detail report.

                    Returned only if you have Foreign Currency Conversion enabled
                  type: string
                revenueDetailCsvFileId:
                  description: |
                    File ID of the Revenue Detail report in CSV format.
                  type: string
                revenueDetailExcelFileId:
                  description: |
                    File ID of the Revenue Detail report in XLSX format.
                  type: string
                unprocessedChargesFileId:
                  description: |
                    File ID of a report containing all unprocessed charges for the accounting period.
                  type: string
              type: object
            fiscalYear:
              description: |
                Fiscal year of the accounting period.
              type: string
            fiscal_quarter:
              description: ""
              format: int64
              type: integer
            id:
              description: |
                ID of the accounting period.
              type: string
            name:
              description: |
                Name of the accounting period.
              type: string
            notes:
              description: |
                Any optional notes about the accounting period.
              type: string
            runTrialBalanceEnd:
              description: |
                Date and time that the trial balance was completed. If the trial balance status is `Pending`, `Processing`, or `Error`, this field is `null`.
              format: date-time
              type: string
            runTrialBalanceErrorMessage:
              description: |
                If trial balance status is Error, an error message is returned in this field.
              type: string
            runTrialBalanceStart:
              description: |
                Date and time that the trial balance was run. If the trial balance status is `Pending`, this field is `null`.
              format: date-time
              type: string
            runTrialBalanceStatus:
              description: |
                Status of the trial balance for the accounting period. Possible values:

                * `Pending`
                * `Processing`
                * `Completed`
                * `Error`
              type: string
            startDate:
              description: |
                The start date of the accounting period.
              format: date
              type: string
            status:
              description: |
                Status of the accounting period. Possible values:

                * `Open`
                * `PendingClose`
                * `Closed`
              type: string
            updatedBy:
              description: |
                D of the user who last updated the accounting period.
              type: string
            updatedOn:
              description: |
                Date and time when the accounting period was last updated.
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/AccountingPeriodObjectCustomFields"
      title: accountingPeriods
    GETAccountingPeriodsType:
      properties:
        accountingPeriods:
          description: |
            An array of all accounting periods on your tenant. The accounting periods are returned in ascending order of start date; that is, the latest period is returned first.
          items:
            $ref: "#/components/schemas/GETAccountingPeriodWithoutSuccessType"
          type: array
        nextPage:
          description: |
            URL to retrieve the next page of the response if it exists; otherwise absent.
          format: URL
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GETAllCustomObjectDefinitionsInNamespaceResponse:
      example:
        count: 2
        definitions:
          Delivery:
            CreatedById: 2c92c0f9-6a07-409d-016a-0a58ab1172eb
            CreatedDate: 2021-04-29T04:06:07.876Z
            Id: 362e0954-7108-49ca-abb0-6f628478e77f
            UpdatedById: 2c92c0f9-6a07-409d-016a-0a58ab1172eb
            UpdatedDate: 2021-04-29T04:06:07.876Z
            schema:
              description: Delivery schedule for shipping products based on customer's subscription.
              filterable:
                - ContactId__c
                - SubscriptionId__c
                - Quantity__c
                - ProductName__c
                - Cancelled__c
                - ShippingStatus__c
                - Id
                - CreatedById
                - UpdatedById
                - CreatedDate
                - UpdatedDate
              label: Delivery
              object: Delivery
              properties:
                CancellationTime__c:
                  description: The time at which customer cancelled this particular shipment.
                  format: date-time
                  label: Cancellation Time
                  origin: custom
                  type: string
                Cancelled__c:
                  default: false
                  description: Indicator is true when the customer has cancelled this particular shipment.
                  label: Shipment Cancelled
                  origin: custom
                  type: boolean
                ContactEmail__c:
                  description: The customer's email address.
                  label: Customer Email
                  maxLength: 128
                  origin: custom
                  type: string
                ContactId__c:
                  description: The customer contact who will receive the shipment.
                  format: uuid
                  label: Ship To Customer
                  origin: custom
                  type: string
                CreatedById:
                  label: CreatedById
                  origin: system
                  type: string
                CreatedDate:
                  format: date-time
                  label: CreatedDate
                  origin: system
                  type: string
                Id:
                  format: uuid
                  label: Id
                  origin: system
                  type: string
                ProductName__c:
                  description: The name of the product that is being shipped to customer.
                  label: Product Name
                  maxLength: 512
                  origin: custom
                  type: string
                Quantity__c:
                  description: The quantity of product that is being shipped to customer.
                  label: Quantity
                  maximum: 20
                  minimum: 1
                  origin: custom
                  type: integer
                ShippingDate__c:
                  description: The date the product will be sent to shipping vendor for delivery.
                  format: date
                  label: Shipping Date
                  origin: custom
                  type: string
                ShippingStatus__c:
                  default: Pending
                  description: The status of the shipment - e.g. Pending, Preparing shipment, Waiting for tracking information, or Shipped.
                  enum:
                    - Pending
                    - Preparing shipment
                    - Waiting for tracking information
                    - Shipped
                  label: Shipping Status
                  maxLength: 512
                  origin: custom
                  type: string
                SubscriptionId__c:
                  description: The subscription that is associated with the shipment record.
                  format: uuid
                  label: Subscription
                  origin: custom
                  type: string
                TotalWeight__c:
                  description: The total weight of the product and packaging that is being shipped to customer.
                  label: Total Weight (lbs.)
                  minimum: 0
                  origin: custom
                  type: number
                UpdatedById:
                  label: UpdatedById
                  origin: system
                  type: string
                UpdatedDate:
                  format: date-time
                  label: UpdatedDate
                  origin: system
                  type: string
              relationships:
                - cardinality: manyToOne
                  fields:
                    ContactId__c: Id
                  namespace: com_zuora
                  object: contact
                  recordConstraints:
                    create:
                      enforceValidMapping: false
                - cardinality: manyToOne
                  fields:
                    SubscriptionId__c: Id
                  namespace: com_zuora
                  object: subscription
                  recordConstraints:
                    create:
                      enforceValidMapping: false
              required:
                - SubscriptionId__c
                - ContactId__c
                - ProductName__c
                - Quantity__c
                - ShippingDate__c
                - Id
                - CreatedById
                - UpdatedById
                - CreatedDate
                - UpdatedDate
            type: Delivery
          birth_place_custom_object:
            CreatedById: 2c92c0f9-6a07-409d-016a-0a58ab1172eb
            CreatedDate: 2021-04-29T04:06:07.876Z
            Id: 25924740-669d-4bcd-97b2-61c7410c7563
            UpdatedById: 2c92c0f9-6a07-409d-016a-0a58ab1172eb
            UpdatedDate: 2021-04-29T04:06:07.876Z
            schema:
              filterable:
                - ContactId__c
                - city__c
                - Id
                - CreatedById
                - UpdatedById
                - CreatedDate
                - UpdatedDate
              label: Birth Place Custom Object
              object: birth_place_custom_object
              properties:
                ContactId__c:
                  format: uuid
                  label: Contact
                  origin: custom
                  type: string
                CreatedById:
                  label: CreatedById
                  origin: system
                  type: string
                CreatedDate:
                  format: date-time
                  label: CreatedDate
                  origin: system
                  type: string
                Id:
                  format: uuid
                  label: Id
                  origin: system
                  type: string
                UpdatedById:
                  label: UpdatedById
                  origin: system
                  type: string
                UpdatedDate:
                  format: date-time
                  label: UpdatedDate
                  origin: system
                  type: string
                city__c:
                  label: city label
                  maxLength: 512
                  origin: custom
                  type: string
                country__c:
                  label: country label
                  maxLength: 512
                  origin: custom
                  type: string
                state__c:
                  label: state label
                  maxLength: 512
                  origin: custom
                  type: string
              relationships:
                - cardinality: manyToOne
                  fields:
                    ContactId__c: Id
                  namespace: com_zuora
                  object: contact
                  recordConstraints:
                    create:
                      enforceValidMapping: false
              required:
                - city__c
                - state__c
                - country__c
                - Id
                - CreatedById
                - UpdatedById
                - CreatedDate
                - UpdatedDate
              type: object
            type: birth_place_custom_object
      properties:
        count:
          description: The number of objects in the `definitions` object. The value of this field is the number of custom object definitions in the namespace.
          type: integer
        definitions:
          $ref: "#/components/schemas/CustomObjectDefinitions"
      type: object
    GETAmendmentType:
      properties:
        autoRenew:
          description: |
            Determines whether the subscription is automatically renewed, or whether it expires at the end of the term and needs to be manually renewed. 
          type: boolean
        baseRatePlanId:
          description: |
            The rate plan ID on which changes are made. Only the Update or Remove amendment returns a base rate plan ID.
          type: string
        baseSubscriptionId:
          description: |
            The ID of the subscription based on which the amendment is created.
          type: string
        code:
          description: |
            The amendment code.
          type: string
        contractEffectiveDate:
          description: |
            The date when the amendment becomes effective for billing purposes, as `yyyy-mm-dd`.
          format: date
          type: string
        currentTerm:
          description: |
            The length of the period for the current subscription term. 
          format: int64
          type: integer
        currentTermPeriodType:
          description: |
            The period type for the current subscription term.
            Possible values are:

            - Month
            - Year
            - Day
            - Week
          type: string
        customerAcceptanceDate:
          description: |
            The date when the customer accepts the amendment changes to the subscription, as `yyyy-mm-dd`.
          format: date
          type: string
        description:
          description: |
            Description of the amendment.
          type: string
        destinationAccountId:
          description: |
            The ID of the account that the subscription is being transferred to.
          type: string
        destinationInvoiceOwnerId:
          description: |
            The ID of the invoice that the subscription is being transferred to.
          type: string
        effectiveDate:
          description: |
            The date when the amendment changes take effective. 
          format: date
          type: string
        id:
          description: |
            The amendment ID.
          type: string
        name:
          description: |
            The name of the amendment.
          type: string
        newRatePlanId:
          description: |
            The ID of the rate plan charge on which amendment is made. Only the Add or Update amendment returns a new rate plan ID.
          type: string
        newSubscriptionId:
          description: |
            The ID of the subscription that the amendment changes.
          type: string
        renewalSetting:
          description: |
            Specifies whether a termed subscription will remain termed or change to evergreen when it is renewed.
            Possible values are:

            - RENEW_WITH_SPECIFIC_TERM
            - RENEW_TO_EVERGREEN
          type: string
        renewalTerm:
          description: |
            The term of renewal for the amended subscription.
          format: int64
          type: integer
        renewalTermPeriodType:
          description: |
            The period type for the subscription renewal term.
            Possible values are:

            - Month
            - Year
            - Day
            - Week
          type: string
        resumeDate:
          description: |
            The date when the subscription resumption takes effect, as `yyyy-mm-dd`.

            **Note:** This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).
          format: date
          type: string
        serviceActivationDate:
          description: |
            The date when service is activated, as `yyyy-mm-dd`.
          format: date
          type: string
        specificUpdateDate:
          description: |
            The date when the Update Product amendment takes effect. 
            Only for the Update Product amendments if there is already a future-dated Update Product amendment on
            the subscription.
          format: date
          type: string
        status:
          description: |
            The status of the amendment.
            Possible values are:

            - Draft 
            - Pending Activation
            - Pending Acceptance
            - Completed
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
        suspendDate:
          description: |
            The date when the subscription suspension takes effect, as `yyyy-mm-dd`.

            **Note:** This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).
          format: date
          type: string
        termStartDate:
          description: |
            The date when the new terms and conditions take effect.
          format: date
          type: string
        termType:
          description: |
            Indicates if the subscription is `TERMED` or `EVERGREEN`.
          type: string
        type:
          description: |
            Type of the amendment.
            Possible values are:

            - Cancellation
            - NewProduct
            - OwnerTransfer
            - RemoveProduct
            - Renewal
            - UpdateProduct
            - TermsAndConditions
          type: string
      type: object
    GETAttachmentResponseType:
      properties:
        createdBy:
          description: |
            Zuora user id who added this attachment to the object.
          type: string
        createdOn:
          description: |
            Date and time when the attachment was added to the object.
          format: date-time
          type: string
        description:
          description: |
            Description of the attachment.
          type: string
        fileContentType:
          description: |
            File type.
          type: string
        fileId:
          description: |
            File ID of the attached file. Use this file ID with [Get files](https://www.zuora.com/developer/api-reference/#operation/GET_Files) to download the file.
          type: string
        fileName:
          description: |
            Attachment file name.
          type: string
        id:
          description: |
            Id of this attachment.
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
        updatedBy:
          description: |
            Zuora user id who last updated the attachment.
          type: string
        updatedOn:
          description: |
            Date and time when the attachment was last updated.
          format: date-time
          type: string
      type: object
    GETAttachmentResponseWithoutSuccessType:
      properties:
        createdBy:
          description: |
            Zuora user id of who added this attachment to the object.
          type: string
        createdOn:
          description: |
            Date and time when the attachment was added to the object.
          format: date-time
          type: string
        description:
          description: |
            Description of the attachment.
          type: string
        fileContentType:
          description: |
            Attachment file type.
          type: string
        fileId:
          description: |
            File ID of the attached file. Use this file ID with [Get files](https://www.zuora.com/developer/api-reference/#operation/GET_Files) to download the file.
          type: string
        fileName:
          description: |
            Attachment file name.
          type: string
        id:
          description: |
            Zuora id of this attachement.
          type: string
        updatedBy:
          description: |
            Zuora user id who last updated the attachment.
          type: string
        updatedOn:
          description: |
            Date and time when the attachment was last updated.
          format: date-time
          type: string
      title: attachments
      type: object
    GETAttachmentsResponseType:
      properties:
        attachments:
          description: |
            Container for one or more attachments.
          items:
            $ref: "#/components/schemas/GETAttachmentResponseWithoutSuccessType"
          type: array
        nextPage:
          description: |
            URL to retrieve the next page of the response if it exists; otherwise absent.
          format: URL
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GETBillingDocumentFilesDeletionJobResponse:
      properties:
        id:
          description: |
            The unique ID of the billing document file deletion job.
          type: string
        status:
          description: |
            The status of the billing document file deletion job.
          enum:
            - Pending
            - Processing
            - Completed
            - Error
          type: string
        success:
          description: Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GETBillingDocumentsResponseType:
      properties:
        accountId:
          description: The ID of the customer account associated with the billing document.
          format: uuid
          type: string
        amount:
          description: |
            The total amount of the billing document.
          format: double
          type: number
        balance:
          description: |
            The balance of the billing document.
          format: double
          type: number
        documentDate:
          description: |
            The date of the billing document. The date can be the invoice date for invoices, credit memo date for credit memos, or debit memo date for debit memos.
          format: date
          type: string
        documentNumber:
          description: |
            The number of the billing document.
          type: string
        documentType:
          description: |
            The type of the billing document.
          enum:
            - Invoice
            - CreditMemo
            - DebitMemo
          type: string
        id:
          description: |
            The ID of the billing document.
          type: string
        status:
          description: |
            The current status of the billing document.
          enum:
            - Draft
            - Posted
            - Canceled
            - Error
          type: string
      title: documents
      type: object
    GETCMTaxItemType:
      allOf:
        - properties:
            appliedAmount:
              description: |
                The applied amount of the taxation item.
              format: double
              type: number
            exemptAmount:
              description: |
                The amount of taxes or VAT for which the customer has an exemption.
              format: double
              type: number
            financeInformation:
              description: |
                Container for the finance information related to the taxation item.
              properties:
                onAccountAccountingCode:
                  description: |
                    The accounting code that maps to an on account in your accounting system.
                  type: string
                onAccountAccountingCodeType:
                  description: |
                    The type of the accounting code that maps to an on account in your accounting system.
                  type: string
                salesTaxPayableAccountingCode:
                  description: |
                    The accounting code for the sales taxes payable.
                  type: string
                salesTaxPayableAccountingCodeType:
                  description: |
                    The type of the accounting code for the sales taxes payable.
                  type: string
              type: object
            id:
              description: |
                The ID of the taxation item.
              type: string
            jurisdiction:
              description: |
                The jurisdiction that applies the tax or VAT. This value is typically a state, province, county, or city.
              type: string
            locationCode:
              description: |
                The identifier for the location based on the value of the `taxCode` field.
              type: string
            name:
              description: |
                The name of the taxation item.
              type: string
            refundAmount:
              description: |
                The amount of the refund on the taxation item.
              format: double
              type: number
            sourceTaxItemId:
              description: |
                The ID of the source taxation item.
              type: string
            taxAmount:
              description: |
                The amount of taxation.
              format: double
              type: number
            taxCode:
              description: |
                The tax code identifies which tax rules and tax rates to apply to a specific credit memo.
              type: string
            taxCodeDescription:
              description: |
                The description of the tax code.
              type: string
            taxDate:
              description: |
                The date that the tax is applied to the credit memo, in `yyyy-mm-dd` format.
              format: date
              type: string
            taxRate:
              description: |
                The tax rate applied to the credit memo.
              format: double
              type: number
            taxRateDescription:
              description: |
                The description of the tax rate.
              type: string
            taxRateType:
              description: |
                The type of the tax rate.
              enum:
                - Percentage
                - FlatFee
              type: string
            unappliedAmount:
              description: |
                The unapplied amount of the taxation item.
              format: double
              type: number
          type: object
        - $ref: "#/components/schemas/CreditTaxationItemObjectCustomFields"
      title: creditTaxItems
    GETCMTaxItemTypeNew:
      allOf:
        - properties:
            appliedAmount:
              description: |
                The applied amount of the taxation item.
              format: double
              type: number
            exemptAmount:
              description: |
                The amount of taxes or VAT for which the customer has an exemption.
              format: double
              type: number
            financeInformation:
              description: |
                Container for the finance information related to the taxation item.
              properties:
                onAccountAccountingCode:
                  description: |
                    The accounting code that maps to an on account in your accounting system.
                  type: string
                onAccountAccountingCodeType:
                  description: |
                    The type of the accounting code that maps to an on account in your accounting system.
                  type: string
                salesTaxPayableAccountingCode:
                  description: |
                    The accounting code for the sales taxes payable.
                  type: string
                salesTaxPayableAccountingCodeType:
                  description: |
                    The type of the accounting code for the sales taxes payable.
                  type: string
              type: object
            id:
              description: |
                The ID of the taxation item.
              type: string
            jurisdiction:
              description: |
                The jurisdiction that applies the tax or VAT. This value is typically a state, province, county, or city.
              type: string
            locationCode:
              description: |
                The identifier for the location based on the value of the `taxCode` field.
              type: string
            name:
              description: |
                The name of the taxation item.
              type: string
            refundAmount:
              description: |
                The amount of the refund on the taxation item.
              format: double
              type: number
            sourceTaxItemId:
              description: |
                The ID of the source taxation item.
              type: string
            taxAmount:
              description: |
                The amount of taxation.
              format: double
              type: number
            taxCode:
              description: |
                The tax code identifies which tax rules and tax rates to apply to a specific credit memo.
              type: string
            taxCodeDescription:
              description: |
                The description of the tax code.
              type: string
            taxDate:
              description: |
                The date that the tax is applied to the credit memo, in `yyyy-mm-dd` format.
              format: date
              type: string
            taxRate:
              description: |
                The tax rate applied to the credit memo.
              format: double
              type: number
            taxRateDescription:
              description: |
                The description of the tax rate.
              type: string
            taxRateType:
              description: |
                The type of the tax rate.
              enum:
                - Percentage
                - FlatFee
              type: string
            unappliedAmount:
              description: |
                The unapplied amount of the taxation item.
              format: double
              type: number
          type: object
        - $ref: "#/components/schemas/CreditTaxationItemObjectCustomFields"
      title: data
    GETCalloutHistoryVOType:
      properties:
        attemptedNum:
          description: |
            The number of times the callout was retried.
          type: string
        createTime:
          description: |
            The time that the calloutHistory record was made.
          type: string
        eventCategory:
          description: |
            The event category for the callout.
          type: string
        eventContext:
          description: |
            The context of the callout event.
          type: string
        notification:
          description: |
            The name of the notification.
          type: string
        requestMethod:
          description: |
            The request method set in notifications settings.
          type: string
        requestUrl:
          description: |
            The base url set in notifications settings.
          type: string
        responseCode:
          description: |
            The responseCode of the request.
          type: string
        responseContent:
          description: ""
          type: string
      title: calloutHistories
      type: object
    GETCalloutHistoryVOsType:
      properties:
        calloutHistories:
          description: |
            A container for callout histories.
          items:
            $ref: "#/components/schemas/GETCalloutHistoryVOType"
          type: array
        nextPage:
          description: |
            URL to retrieve the next page of the response if it exists; otherwise absent.
          format: URL
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GETCatalogType:
      properties:
        nextPage:
          description: |
            URL to retrieve the next page of the response if it exists; otherwise absent.
          format: URL
          type: string
        products:
          description: |
            Container for one or more products:
          items:
            $ref: "#/components/schemas/GETProductType"
          type: array
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GETChargeRSDetailType:
      properties:
        accountId:
          description: |
            An account ID.
          type: string
        amount:
          description: |
            The revenue schedule amount, which is the sum of all revenue items. This field cannot be null and must be formatted based on the currency, such as *JPY 30* or USD *30.15*. Test out the currency to ensure you are using the proper formatting otherwise, the response will fail and this error message is returned:  *"Allocation amount with wrong decimal places."*
          format: decimal
          type: string
        currency:
          description: |
            The type of currency used. 
          type: string
        notes:
          description: |
            Additional information about this record.
          type: string
        number:
          description: |
            The charge revenue summary number.
          type: string
        recognitionRuleName:
          description: |
            The name of the recognition rule.
          type: string
        recognizedRevenue:
          description: |
            The revenue that was distributed in a closed accounting period.
          format: decimal
          type: string
        revenueItems:
          description: |
            Revenue items are listed in ascending order by the accounting period start date.
          items:
            $ref: "#/components/schemas/GETRevenueItemTypeResponse"
          type: array
        subscriptionChargeId:
          description: |
            The original subscription charge ID.
          type: string
        subscriptionId:
          description: |
            The original subscription ID.
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
        undistributedUnrecognizedRevenue:
          description: |
            Revenue in the open-ended accounting period.
          format: decimal
          type: string
        unrecognizedRevenue:
          description: |
            Revenue distributed in all open accounting periods, which includes the open-ended accounting period.
          format: decimal
          type: string
      type: object
    GETCreditMemoCollectionType:
      properties:
        creditmemos:
          description: |
            Container for credit memos.
          items:
            $ref: "#/components/schemas/GETCreditMemoTypewithSuccess"
          type: array
        nextPage:
          description: |
            URL to retrieve the next page of the response if it exists; otherwise absent.
          format: URL
          type: string
        success:
          description: Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GETCreditMemoItemPartType:
      properties:
        amount:
          description: |
            The amount of the credit memo part item. 
          format: double
          type: number
        createdById:
          description: |
            The ID of the Zuora user who created the credit memo part item.
          type: string
        createdDate:
          description: |
            The date and time when the credit memo part item was created, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-01 15:31:10.
          format: date-time
          type: string
        creditMemoItemId:
          description: |
            The ID of the credit memo item associated with the credit memo part item.
          type: string
        creditTaxItemId:
          description: |
            The ID of the credit memo taxation item.
          type: string
        debitMemoItemId:
          description: |
            The ID of the debit memo item associated with the credit memo part item.
          type: string
        id:
          description: |
            The ID of the credit memo part item.
          type: string
        invoiceItemId:
          description: |
            The ID of the invoice item associated with the credit memo part item.
          type: string
        success:
          description: Returns `true` if the request was processed successfully.
          type: boolean
        taxItemId:
          description: |
            The ID of the invoice or debit memo taxation item associated with the credit memo taxation item.
          type: string
        updatedById:
          description: |
            The ID of the Zuora user who last updated the credit memo part item.
          type: string
        updatedDate:
          description: |
            The date and time when the credit memo part item was last updated, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-02 15:36:10.
          format: date-time
          type: string
      type: object
    GETCreditMemoItemPartTypewithSuccess:
      properties:
        amount:
          description: |
            The amount of the credit memo part item.
          format: double
          type: number
        createdById:
          description: |
            The ID of the Zuora user who created the credit memo part item.
          type: string
        createdDate:
          description: |
            The date and time when the credit memo part item was created, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-01 15:31:10.
          format: date-time
          type: string
        creditMemoItemId:
          description: |
            The ID of the credit memo item associated with the credit memo part item.
          type: string
        creditTaxItemId:
          description: |
            The ID of the credit memo taxation item.
          type: string
        debitMemoItemId:
          description: |
            The ID of the debit memo item associated with the credit memo part item.
          type: string
        id:
          description: |
            The ID of the credit memo part item.
          type: string
        invoiceItemId:
          description: |
            The ID of the invoice item associated with the credit memo part item.
          type: string
        taxItemId:
          description: |
            The ID of the invoice or debit memo taxation item associated with the credit memo taxation item.
          type: string
        updatedById:
          description: |
            The ID of the Zuora user who last updated the credit memo part item.
          type: string
        updatedDate:
          description: |
            The date and time when the credit memo part item was last updated, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-02 15:36:10.
          format: date-time
          type: string
      title: itemparts
      type: object
    GETCreditMemoItemPartsCollectionType:
      properties:
        itemParts:
          description: |
            Container for credit memo part items.
          items:
            $ref: "#/components/schemas/GETCreditMemoItemPartTypewithSuccess"
          type: array
        nextPage:
          description: |
            URL to retrieve the next page of the response if it exists; otherwise absent.
          format: URL
          type: string
        success:
          description: Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GETCreditMemoItemType:
      allOf:
        - properties:
            amount:
              description: |
                The amount of the credit memo item. For tax-inclusive credit memo items, the amount indicates the credit memo item amount including tax. For tax-exclusive credit memo items, the amount indicates the credit memo item amount excluding tax.
              format: double
              type: number
            amountWithoutTax:
              description: |
                The credit memo item amount excluding tax.
              format: double
              type: number
            appliedAmount:
              description: |
                The applied amount of the credit memo item.
              format: double
              type: number
            appliedToItemId:
              description: |
                The unique ID of the credit memo item that the discount charge is applied to.
              type: string
            comment:
              description: |
                Comments about the credit memo item.

                **Note**: This field is not available if you set the `zuora-version` request header to `257.0` or later.
              type: string
            createdById:
              description: |
                The ID of the Zuora user who created the credit memo item.
              type: string
            createdDate:
              description: |
                The date and time when the credit memo item was created, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-01 15:31:10.
              format: date-time
              type: string
            creditFromItemId:
              description: |
                The ID of the credit from item.
              type: string
            creditFromItemSource:
              description: |
                The type of the credit from item.
              enum:
                - InvoiceItem
                - CreditMemoItem
              type: string
            creditTaxItems:
              description: |
                Container for the taxation items of the credit memo item. 

                **Note**: This field is not available if you set the `zuora-version` request header to `239.0` or later.
              items:
                $ref: "#/components/schemas/GETCMTaxItemType"
              type: array
            description:
              description: |
                The description of the credit memo item.

                **Note**: This field is only available if you set the `zuora-version` request header to `257.0` or later.
              type: string
            financeInformation:
              description: |
                Container for the finance information related to the credit memo item.
              properties:
                deferredRevenueAccountingCode:
                  description: |
                    The accounting code for the deferred revenue, such as Monthly Recurring Liability.
                  type: string
                deferredRevenueAccountingCodeType:
                  description: |
                    The type of the deferred revenue accounting code, such as Deferred Revenue.'
                  type: string
                onAccountAccountingCode:
                  description: |
                    The accounting code that maps to an on account in your accounting system.
                  type: string
                onAccountAccountingCodeType:
                  description: |
                    The type of the accounting code that maps to an on account in your accounting system.
                  type: string
                recognizedRevenueAccountingCode:
                  description: |
                    The accounting code for the recognized revenue, such as Monthly Recurring Charges or Overage Charges.
                  type: string
                recognizedRevenueAccountingCodeType:
                  description: |
                    The type of the recognized revenue accounting code, such as Sales Revenue or Sales Discount.
                  type: string
                revenueRecognitionRuleName:
                  description: |
                    The name of the revenue recognition rule governing the revenue schedule.
                  type: string
                revenueScheduleNumber:
                  description: |
                    Revenue schedule number. The revenue schedule number is always prefixed with "RS", for example, RS-00000001.
                  type: string
              type: object
            id:
              description: |
                The ID of the credit memo item.
              type: string
            processingType:
              description: |
                The kind of the charge for the credit memo item. Its possible values are `Charge` and `Discount`. 
              type: string
            quantity:
              description: |
                The number of units for the credit memo item.
              format: double
              type: number
            refundAmount:
              description: |
                The amount of the refund on the credit memo item.
              format: double
              type: number
            serviceEndDate:
              description: |
                The service end date of the credit memo item.
              format: date
              type: string
            serviceStartDate:
              description: |
                The service start date of the credit memo item. If the associated charge is a one-time fee, this date is the date of that charge.
              format: date
              type: string
            sku:
              description: |
                The SKU for the product associated with the credit memo item.
              type: string
            skuName:
              description: |
                The name of the SKU.
              type: string
            sourceItemId:
              description: |
                The ID of the source item.

                - If the value of the `sourceItemType` field is `SubscriptionComponent` , the value of this field is the ID of the corresponding rate plan charge.
                - If the value of the `sourceItemType` field is `InvoiceDetail`, the value of this field is the ID of the corresponding invoice item.
                - If the value of the `sourceItemType` field is `ProductRatePlanCharge` , the value of this field is the ID of the corresponding product rate plan charge.
              type: string
            sourceItemType:
              description: |
                The type of the source item.

                - If a credit memo is not created from an invoice or a product rate plan charge, the value of this field is `SubscriptionComponent`. 
                - If a credit memo is created from an invoice, the value of this field is `InvoiceDetail`.
                - If a credit memo is created from a product rate plan charge, the value of this field is `ProductRatePlanCharge`.
              enum:
                - SubscriptionComponent
                - InvoiceDetail
                - ProductRatePlanCharge
              type: string
            subscriptionId:
              description: |
                The ID of the subscription associated with the credit memo item.
              type: string
            success:
              description: Returns `true` if the request was processed successfully.
              type: boolean
            taxMode:
              description: |
                The tax mode of the credit memo item, indicating whether the amount of the credit memo item includes tax.
              enum:
                - TaxExclusive
                - TaxInclusive
              type: string
            taxationItems:
              description: |
                Container for the taxation items of the credit memo item. 

                **Note**: This field is only available if you set the `zuora-version` request header to `239.0` or later.
              properties:
                data:
                  description: |
                    List of taxation items.
                  items:
                    $ref: "#/components/schemas/GETCMTaxItemTypeNew"
                  type: array
                nextPage:
                  description: |
                    URL to retrieve the next page of the response if it exists; otherwise absent.
                  format: URL
                  type: string
              type: object
            unappliedAmount:
              description: |
                The unapplied amount of the credit memo item.
              format: double
              type: number
            unitOfMeasure:
              description: |
                The units to measure usage.
              type: string
            unitPrice:
              description: |
                The per-unit price of the credit memo item.
              format: double
              type: number
            updatedById:
              description: |
                The ID of the Zuora user who last updated the credit memo item.
              type: string
            updatedDate:
              description: |
                The date and time when the credit memo item was last updated, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-02 15:36:10.
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/CreditMemoItemObjectCustomFields"
    GETCreditMemoItemTypewithSuccess:
      allOf:
        - properties:
            amount:
              description: |
                The amount of the credit memo item. For tax-inclusive credit memo items, the amount indicates the credit memo item amount including tax. For tax-exclusive credit memo items, the amount indicates the credit memo item amount excluding tax.
              format: double
              type: number
            amountWithoutTax:
              description: |
                The credit memo item amount excluding tax.
              format: double
              type: number
            appliedAmount:
              description: |
                The applied amount of the credit memo item.
              format: double
              type: number
            appliedToItemId:
              description: |
                The unique ID of the credit memo item that the discount charge is applied to.
              type: string
            comment:
              description: |
                Comments about the credit memo item.

                **Note**: This field is not available if you set the `zuora-version` request header to `257.0` or later.
              type: string
            createdById:
              description: |
                The ID of the Zuora user who created the credit memo item.
              type: string
            createdDate:
              description: |
                The date and time when the credit memo item was created, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-01 15:31:10.
              format: date-time
              type: string
            creditFromItemId:
              description: |
                The ID of the credit from item.
              type: string
            creditFromItemSource:
              description: |
                The type of the credit from item.
              enum:
                - InvoiceItem
                - CreditMemoItem
              type: string
            creditTaxItems:
              description: |
                Container for the taxation items of the credit memo item. 

                **Note**: This field is not available if you set the `zuora-version` request header to `239.0` or later.
              items:
                $ref: "#/components/schemas/GETCMTaxItemType"
              type: array
            description:
              description: |
                The description of the credit memo item.

                **Note**: This field is only available if you set the `zuora-version` request header to `257.0` or later.
              type: string
            financeInformation:
              description: |
                Container for the finance information related to the credit memo item.
              properties:
                deferredRevenueAccountingCode:
                  description: |
                    The accounting code for the deferred revenue, such as Monthly Recurring Liability.
                  type: string
                deferredRevenueAccountingCodeType:
                  description: |
                    The type of the deferred revenue accounting code, such as Deferred Revenue. 
                  type: string
                onAccountAccountingCode:
                  description: |
                    The accounting code that maps to an on account in your accounting system.
                  type: string
                onAccountAccountingCodeType:
                  description: |
                    The type of the accounting code that maps to an on account in your accounting system.
                  type: string
                recognizedRevenueAccountingCode:
                  description: |
                    The accounting code for the recognized revenue, such as Monthly Recurring Charges or Overage Charges.
                  type: string
                recognizedRevenueAccountingCodeType:
                  description: |
                    The type of the recognized revenue accounting code, such as Sales Revenue or Sales Discount. 
                  type: string
                revenueRecognitionRuleName:
                  description: |
                    The name of the revenue recognition rule governing the revenue schedule.
                  type: string
                revenueScheduleNumber:
                  description: |
                    Revenue schedule number. The revenue schedule number is always prefixed with "RS", for example, RS-00000001.
                  type: string
              type: object
            id:
              description: |
                The ID of the credit memo item.
              type: string
            processingType:
              description: |
                The kind of the charge for the credit memo item. Its possible values are `Charge` and `Discount`. 
              type: string
            quantity:
              description: |
                The number of units for the credit memo item.
              format: double
              type: number
            refundAmount:
              description: |
                The amount of the refund on the credit memo item.
              format: double
              type: number
            serviceEndDate:
              description: |
                The service end date of the credit memo item. 
              format: date
              type: string
            serviceStartDate:
              description: |
                The service start date of the credit memo item.
              format: date
              type: string
            sku:
              description: |
                The SKU for the product associated with the credit memo item.
              type: string
            skuName:
              description: |
                The name of the SKU.
              type: string
            sourceItemId:
              description: |
                The ID of the source item.

                - If the value of the `sourceItemType` field is `SubscriptionComponent` , the value of this field is the ID of the corresponding rate plan charge.
                - If the value of the `sourceItemType` field is `InvoiceDetail`, the value of this field is the ID of the corresponding invoice item.
                - If the value of the `sourceItemType` field is `ProductRatePlanCharge` , the value of this field is the ID of the corresponding product rate plan charge.
              type: string
            sourceItemType:
              description: |+
                The type of the source item.

                - If a credit memo is not created from an invoice or a product rate plan charge, the value of this field is `SubscriptionComponent`. 
                - If a credit memo is created from an invoice, the value of this field is `InvoiceDetail`.
                - If a credit memo is created from a product rate plan charge, the value of this field is `ProductRatePlanCharge`.
                             
              enum:
                - SubscriptionComponent
                - InvoiceDetail
                - ProductRatePlanCharge
              type: string
            subscriptionId:
              description: |
                The ID of the subscription associated with the credit memo item.
              type: string
            taxMode:
              description: |
                The tax mode of the credit memo item, indicating whether the amount of the credit memo item includes tax.
              enum:
                - TaxExclusive
                - TaxInclusive
              type: string
            taxationItems:
              description: |
                Container for the taxation items of the credit memo item. 

                **Note**: This field is only available if you set the `zuora-version` request header to `239.0` or later.
              properties:
                data:
                  description: |
                    List of taxation items.
                  items:
                    $ref: "#/components/schemas/GETCMTaxItemTypeNew"
                  type: array
                nextPage:
                  description: |
                    URL to retrieve the next page of the response if it exists; otherwise absent.
                  format: URL
                  type: string
              type: object
            unappliedAmount:
              description: |
                The unapplied amount of the credit memo item.
              format: double
              type: number
            unitOfMeasure:
              description: |
                The units to measure usage.
              type: string
            unitPrice:
              description: |
                The per-unit price of the credit memo item.
              format: double
              type: number
            updatedById:
              description: |
                The ID of the Zuora user who last updated the credit memo item.
              type: string
            updatedDate:
              description: |
                The date and time when the credit memo item was last updated, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-02 15:36:10.
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/CreditMemoItemObjectCustomFields"
      title: items
    GETCreditMemoItemsListType:
      properties:
        items:
          description: |
            Container for credit memo items.
          items:
            $ref: "#/components/schemas/GETCreditMemoItemTypewithSuccess"
          type: array
        nextPage:
          description: |
            URL to retrieve the next page of the response if it exists; otherwise absent.
          format: URL
          type: string
        success:
          description: Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GETCreditMemoPartType:
      properties:
        amount:
          description: |
            The amount of the credit memo part.
          format: double
          type: number
        createdById:
          description: |
            The ID of the Zuora user who created the credit memo part.
          type: string
        createdDate:
          description: |
            The date and time when the credit memo part was created, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-01 15:31:10.
          format: date-time
          type: string
        debitMemoId:
          description: |
            The ID of the debit memo associated with the credit memo part.
          type: string
        id:
          description: |
            The ID of the credit memo part.
          type: string
        invoiceId:
          description: |
            The ID of the invoice associated with the credit memo part.
          type: string
        success:
          description: Returns `true` if the request was processed successfully.
          type: boolean
        updatedById:
          description: |
            The ID of the Zuora user who last updated the credit memo part.
          type: string
        updatedDate:
          description: |
            The date and time when the credit memo part was last upated, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-02 15:36:10.
          format: date-time
          type: string
      type: object
    GETCreditMemoPartTypewithSuccess:
      properties:
        amount:
          description: |
            The amount of the credit memo part.
          format: double
          type: number
        createdById:
          description: |
            The ID of the Zuora user who created the credit memo part.
          type: string
        createdDate:
          description: |
            The date and time when the credit memo part was created, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-01 15:31:10.
          format: date-time
          type: string
        debitMemoId:
          description: |
            The ID of the debit memo associated with the credit memo part.
          type: string
        id:
          description: |
            The ID of the credit memo part.
          type: string
        invoiceId:
          description: |
            The ID of the invoice associated with the credit memo part.
          type: string
        updatedById:
          description: |
            The ID of the Zuora user who last updated the credit memo part.
          type: string
        updatedDate:
          description: |
            The date and time when the credit memo part was last upated, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-02 15:36:10.
          format: date-time
          type: string
      title: parts
      type: object
    GETCreditMemoPartsCollectionType:
      properties:
        nextPage:
          description: |
            URL to retrieve the next page of the response if it exists; otherwise absent.
          format: URL
          type: string
        parts:
          description: |
            Container for credit memo parts.
          items:
            $ref: "#/components/schemas/GETCreditMemoPartTypewithSuccess"
          type: array
        success:
          description: Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GETCreditMemoType:
      allOf:
        - properties:
            accountId:
              description: |
                The ID of the customer account associated with the credit memo.
              type: string
            amount:
              description: |
                The total amount of the credit memo.
              format: double
              type: number
            appliedAmount:
              description: |
                The applied amount of the credit memo.
              format: double
              type: number
            autoApplyUponPosting:
              description: |
                Whether the credit memo automatically applies to the invoice upon posting.
              type: boolean
            cancelledById:
              description: |
                The ID of the Zuora user who cancelled the credit memo.
              type: string
            cancelledOn:
              description: |
                The date and time when the credit memo was cancelled, in `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
              type: string
            comment:
              description: |
                Comments about the credit memo.
              type: string
            createdById:
              description: |
                The ID of the Zuora user who created the credit memo.
              type: string
            createdDate:
              description: |
                The date and time when the credit memo was created, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-01 15:31:10.
              format: date-time
              type: string
            creditMemoDate:
              description: |
                The date when the credit memo takes effect, in `yyyy-mm-dd` format. For example, 2017-05-20.
              format: date
              type: string
            currency:
              description: |
                A currency defined in the web-based UI administrative settings.
              type: string
            excludeFromAutoApplyRules:
              description: |
                Whether the credit memo is excluded from the rule of automatically applying credit memos to invoices.
              type: boolean
            id:
              description: |
                The unique ID of the credit memo.
              type: string
            latestPDFFileId:
              description: |
                The ID of the latest PDF file generated for the credit memo.
              type: string
            number:
              description: |
                The unique identification number of the credit memo.
              type: string
            postedById:
              description: |
                The ID of the Zuora user who posted the credit memo.
              type: string
            postedOn:
              description: |
                The date and time when the credit memo was posted, in `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
              type: string
            reasonCode:
              description: |
                A code identifying the reason for the transaction. The value must be an existing reason code or empty.
              type: string
            referredInvoiceId:
              description: |
                The ID of a referred invoice.
              type: string
            refundAmount:
              description: |
                The amount of the refund on the credit memo.
              format: double
              type: number
            source:
              description: |
                The source of the credit memo.

                Possible values:
                - `BillRun`: The credit memo is generated by a bill run.
                - `API`: The credit memo is created by calling the [Invoice and collect](https://www.zuora.com/developer/api-reference/#operation/POST_TransactionInvoicePayment) operation.
                - `ApiSubscribe`: The credit memo is created by calling the [Create subscription](https://www.zuora.com/developer/api-reference/#operation/POST_Subscription) and [Create account](https://www.zuora.com/developer/api-reference/#operation/POST_Account) operation.
                - `ApiAmend`: The credit memo is created by calling the [Update subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_Subscription) operation.
                - `AdhocFromPrpc`: The credit memo is created from a product rate plan charge through the Zuora UI or by calling the [Create credit memo from charge](https://www.zuora.com/developer/api-reference/#operation/POST_CreditMemoFromPrpc) operation.
                - `AdhocFromInvoice`: The credit memo is created from an invoice or created by reversing an invoice. You can create a credit memo from an invoice through the Zuora UI or by calling the [Create a credit memo from an invoice](https://www.zuora.com/developer/api-reference/#operation/POST_CreditMemoFromInvoice) operation. You can create a credit memo by reversing an invoice through the Zuora UI or by calling the [Reverse an invoice](https://www.zuora.com/developer/api-reference/#operation/PUT_ReverseInvoice) operation.
              type: string
            sourceId:
              description: |
                The ID of the credit memo source.

                If a credit memo is generated from a bill run, the value is the number of the corresponding bill run. Otherwise, the value is `null`.
              type: string
            status:
              description: |
                The status of the credit memo.
              enum:
                - Draft
                - Posted
                - Canceled
                - Error
                - PendingForTax
                - Generating
                - CancelInProgress
              type: string
            success:
              description: Returns `true` if the request was processed successfully.
              type: boolean
            targetDate:
              description: |
                The target date for the credit memo, in `yyyy-mm-dd` format. For example, 2017-07-20.
              format: date
              type: string
            taxAmount:
              description: |
                The amount of taxation.
              format: double
              type: number
            taxMessage:
              description: |
                The message about the status of tax calculation related to the credit memo. If tax calculation fails in one credit memo, this field displays the reason for the failure.
              type: string
            taxStatus:
              description: |
                The status of tax calculation related to the credit memo.

                **Note**: This field is only applicable to tax calculation by third-party tax engines.
              enum:
                - Complete
                - Error
              type: string
            totalTaxExemptAmount:
              description: |
                The total amount of taxes or VAT for which the customer has an exemption.
              format: double
              type: number
            transferredToAccounting:
              description: |
                Whether the credit memo was transferred to an external accounting system. Use this field for integration with accounting systems, such as NetSuite. 
              enum:
                - Processing
                - Yes
                - No
                - Error
                - Ignore
              type: string
            unappliedAmount:
              description: |
                The unapplied amount of the credit memo.
              format: double
              type: number
            updatedById:
              description: |
                The ID of the Zuora user who last updated the credit memo.
              type: string
            updatedDate:
              description: |
                The date and time when the credit memo was last updated, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-01 15:36:10.
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/CreditMemoObjectNSFields"
        - $ref: "#/components/schemas/CreditMemoObjectCustomFields"
    GETCreditMemoTypewithSuccess:
      allOf:
        - properties:
            accountId:
              description: |
                The ID of the customer account associated with the credit memo.
              type: string
            amount:
              description: |
                The total amount of the credit memo.
              format: double
              type: number
            appliedAmount:
              description: |
                The applied amount of the credit memo.
              format: double
              type: number
            autoApplyUponPosting:
              description: |
                Whether the credit memo automatically applies to the invoice upon posting.
              type: boolean
            cancelledById:
              description: |
                The ID of the Zuora user who cancelled the credit memo.
              type: string
            cancelledOn:
              description: |
                The date and time when the credit memo was cancelled, in `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
              type: string
            comment:
              description: |
                Comments about the credit memo.
              type: string
            createdById:
              description: |
                The ID of the Zuora user who created the credit memo.
              type: string
            createdDate:
              description: |
                The date and time when the credit memo was created, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-01 15:31:10.
              format: date-time
              type: string
            creditMemoDate:
              description: |
                The date when the credit memo takes effect, in `yyyy-mm-dd` format. For example, 2017-05-20.
              format: date
              type: string
            currency:
              description: |
                A currency defined in the web-based UI administrative settings.
              type: string
            excludeFromAutoApplyRules:
              description: |
                Whether the credit memo is excluded from the rule of automatically applying credit memos to invoices.
              type: boolean
            id:
              description: |
                The unique ID of the credit memo.
              type: string
            latestPDFFileId:
              description: |
                The ID of the latest PDF file generated for the credit memo.
              type: string
            number:
              description: |
                The unique identification number of the credit memo.
              type: string
            postedById:
              description: |
                The ID of the Zuora user who posted the credit memo.
              type: string
            postedOn:
              description: |
                The date and time when the credit memo was posted, in `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
              type: string
            reasonCode:
              description: |
                A code identifying the reason for the transaction. The value must be an existing reason code or empty.
              type: string
            referredInvoiceId:
              description: |
                The ID of a referred invoice.
              type: string
            refundAmount:
              description: |
                The amount of the refund on the credit memo.
              format: double
              type: number
            source:
              description: |
                The source of the credit memo.

                Possible values:
                - `BillRun`: The credit memo is generated by a bill run.
                - `API`: The credit memo is created by calling the [Invoice and collect](https://www.zuora.com/developer/api-reference/#operation/POST_TransactionInvoicePayment) operation.
                - `ApiSubscribe`: The credit memo is created by calling the [Create subscription](https://www.zuora.com/developer/api-reference/#operation/POST_Subscription) and [Create account](https://www.zuora.com/developer/api-reference/#operation/POST_Account) operation.
                - `ApiAmend`: The credit memo is created by calling the [Update subscription](https://www.zuora.com/developer/api-reference/#operation/PUT_Subscription) operation.
                - `AdhocFromPrpc`: The credit memo is created from a product rate plan charge through the Zuora UI or by calling the [Create a credit memo from a charge](https://www.zuora.com/developer/api-reference/#operation/POST_CreditMemoFromPrpc) operation.
                - `AdhocFromInvoice`: The credit memo is created from an invoice or created by reversing an invoice. You can create a credit memo from an invoice through the Zuora UI or by calling the [Create credit memo from invoice](https://www.zuora.com/developer/api-reference/#operation/POST_CreditMemoFromInvoice) operation. You can create a credit memo by reversing an invoice through the Zuora UI or by calling the [Reverse invoice](https://www.zuora.com/developer/api-reference/#operation/PUT_ReverseInvoice) operation.
              type: string
            sourceId:
              description: |
                The ID of the credit memo source. 

                If a credit memo is generated from a bill run, the value is the number of the corresponding bill run. Otherwise, the value is `null`.
              type: string
            status:
              description: |
                The status of the credit memo. 
              enum:
                - Draft
                - Posted
                - Canceled
                - Error
                - PendingForTax
                - Generating
                - CancelInProgress
              type: string
            targetDate:
              description: |
                The target date for the credit memo, in `yyyy-mm-dd` format. For example, 2017-07-20.
              format: date
              type: string
            taxAmount:
              description: |
                The amount of taxation.
              format: double
              type: number
            taxMessage:
              description: |
                The message about the status of tax calculation related to the credit memo. If tax calculation fails in one credit memo, this field displays the reason for the failure.
              type: string
            taxStatus:
              description: |
                The status of tax calculation related to the credit memo.

                **Note**: This field is only applicable to tax calculation by third-party tax engines.
              enum:
                - Complete
                - Error
              type: string
            totalTaxExemptAmount:
              description: |
                The total amount of taxes or VAT for which the customer has an exemption.
              format: double
              type: number
            transferredToAccounting:
              description: |
                Whether the credit memo was transferred to an external accounting system. Use this field for integration with accounting systems, such as NetSuite. 
              enum:
                - Processing
                - Yes
                - No
                - Error
                - Ignore
              type: string
            unappliedAmount:
              description: |
                The unapplied amount of the credit memo.
              format: double
              type: number
            updatedById:
              description: |
                The ID of the Zuora user who last updated the credit memo.
              type: string
            updatedDate:
              description: |
                The date and time when the credit memo was last updated, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-02 15:36:10.
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/CreditMemoObjectNSFields"
        - $ref: "#/components/schemas/CreditMemoObjectCustomFields"
      title: creditmemos
    GETCustomExchangeRatesDataType:
      properties:
        DATE:
          description: |
            Container for exchange rate information on a given date. The field name is the date in `yyyy-mm-dd` format, for example, 2016-01-15.
          properties:
            CURRENCY:
              description: |
                The exchange rate on the **providerExchangeRateDate**. The field name is the ISO currency code of the currency, for example, `EUR`.

                There may be more than one currency returned for a given **providerExchangeRateDate**. If the rate for a certain currency is not available on the **providerExchangeRateDate**, the currency is not returned in the response.
              type: string
            providerExchangeRateDate:
              description: |
                The date of the exchange rate used. The date is in `yyyy-mm-dd` format.

                Corresponds to the value specified in the Provider Exchange Rate Date column in the Import Foreign Exchange Rates template when you uploaded the rates through the Mass Updater.
              format: date
              type: string
          title: List of exchange rates
          type: object
      title: rates
      type: object
    GETCustomExchangeRatesType:
      properties:
        inverse:
          description: |
            - If `true`, the exchange rate in the response is an inverse exchange rate.
            - If `false`, the exchange rate in the response is not an inverse exchange rate.
            The value is determined by the **Use inverse rate** checkbox in your Zuora Finance Manage Currency Conversion settings.
          type: boolean
        rates:
          description: |
            Container for exchange rate data. Contains a set of fields that provide exchange rate data for each day between the specified `startDate` and `endDate` (inclusive). 
          items:
            $ref: "#/components/schemas/GETCustomExchangeRatesDataType"
          type: array
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GETDMTaxItemType:
      allOf:
        - properties:
            appliedAmount:
              description: |
                The applied amount of the taxation item.
              format: double
              type: number
            creditAmount:
              description: |
                The amount of credit memos applied to the debit memo. 
              format: double
              type: number
            exemptAmount:
              description: |
                The amount of taxes or VAT for which the customer has an exemption.
              format: double
              type: number
            financeInformation:
              description: |
                Container for the finance information related to the taxation item.
              properties:
                salesTaxPayableAccountingCode:
                  description: |
                    The accounting code for the sales taxes payable.
                  type: string
                salesTaxPayableAccountingCodeType:
                  description: |
                    The type of the accounting code for the sales taxes payable.
                  type: string
              type: object
            id:
              description: |
                The ID of the taxation item.
              type: string
            jurisdiction:
              description: |
                The jurisdiction that applies the tax or VAT. This value is typically a state, province, county, or city.
              type: string
            locationCode:
              description: |
                The identifier for the location based on the value of the `taxCode` field.
              type: string
            name:
              description: |
                The name of the taxation item.
              type: string
            paymentAmount:
              description: |
                The amount of payments applied to the debit memo. 
              format: double
              type: number
            refundAmount:
              description: |
                The amount of the refund on the taxation item.
              format: double
              type: number
            sourceTaxItemId:
              description: |
                The ID of the source taxation item.
              type: string
            taxAmount:
              description: |
                The amount of taxation.
              format: double
              type: number
            taxCode:
              description: |
                The tax code identifies which tax rules and tax rates to apply to a specific debit memo.
              type: string
            taxCodeDescription:
              description: |
                The description of the tax code.
              type: string
            taxDate:
              description: |
                The date that the tax is applied to the debit memo, in `yyyy-mm-dd` format.
              format: date
              type: string
            taxRate:
              description: |
                The tax rate applied to the debit memo.
              format: double
              type: number
            taxRateDescription:
              description: |
                The description of the tax rate.
              type: string
            taxRateType:
              description: |
                The type of the tax rate.
              enum:
                - Percentage
                - FlatFee
              type: string
            unappliedAmount:
              description: |
                The unapplied amount of the taxation item.
              format: double
              type: number
          type: object
        - $ref: "#/components/schemas/DebitTaxationItemObjectCustomFields"
      title: taxItems
    GETDMTaxItemTypeNew:
      allOf:
        - properties:
            balance:
              description: |
                The balance of the taxation item.
              format: double
              type: number
            creditAmount:
              description: |
                The amount of credit memos applied to the debit memo. 
              format: double
              type: number
            exemptAmount:
              description: |
                The amount of taxes or VAT for which the customer has an exemption.
              format: double
              type: number
            financeInformation:
              description: |
                Container for the finance information related to the taxation item.
              properties:
                salesTaxPayableAccountingCode:
                  description: |
                    The accounting code for the sales taxes payable.
                  type: string
                salesTaxPayableAccountingCodeType:
                  description: |
                    The type of the accounting code for the sales taxes payable.
                  type: string
              type: object
            id:
              description: |
                The ID of the taxation item.
              type: string
            jurisdiction:
              description: |
                The jurisdiction that applies the tax or VAT. This value is typically a state, province, county, or city.
              type: string
            locationCode:
              description: |
                The identifier for the location based on the value of the `taxCode` field.
              type: string
            name:
              description: |
                The name of the taxation item.
              type: string
            paymentAmount:
              description: |
                The amount of payments applied to the debit memo. 
              format: double
              type: number
            sourceTaxItemId:
              description: |
                The ID of the source taxation item.
              type: string
            taxAmount:
              description: |
                The amount of taxation.
              format: double
              type: number
            taxCode:
              description: |
                The tax code identifies which tax rules and tax rates to apply to a specific debit memo.
              type: string
            taxCodeDescription:
              description: |
                The description of the tax code.
              type: string
            taxDate:
              description: |
                The date that the tax is applied to the debit memo, in `yyyy-mm-dd` format.
              format: date
              type: string
            taxRate:
              description: |
                The tax rate applied to the debit memo.
              format: double
              type: number
            taxRateDescription:
              description: |
                The description of the tax rate.
              type: string
            taxRateType:
              description: |
                The type of the tax rate.
              enum:
                - Percentage
                - FlatFee
              type: string
          type: object
        - $ref: "#/components/schemas/DebitTaxationItemObjectCustomFields"
      title: data
    GETDebitMemoCollectionType:
      properties:
        debitmemos:
          description: |
            Container for debit memos.
          items:
            $ref: "#/components/schemas/GETDebitMemoTypewithSuccess"
          type: array
        nextPage:
          description: |
            URL to retrieve the next page of the response if it exists; otherwise absent.
          format: URL
          type: string
        success:
          description: Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GETDebitMemoItemCollectionType:
      properties:
        items:
          description: |
            Container for debit memo items.
          items:
            $ref: "#/components/schemas/GETDebitMemoItemTypewithSuccess"
          type: array
        nextPage:
          description: |
            URL to retrieve the next page of the response if it exists; otherwise absent.
          format: URL
          type: string
        success:
          description: Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GETDebitMemoItemType:
      allOf:
        - properties:
            amount:
              description: |
                The amount of the debit memo item. For tax-inclusive debit memo items, the amount indicates the debit memo item amount including tax. For tax-exclusive debit memo items, the amount indicates the debit memo item amount excluding tax.
              format: double
              type: number
            amountWithoutTax:
              description: |
                The debit memo item amount excluding tax.
              format: double
              type: number
            balance:
              description: |
                The balance of the debit memo item.
              format: double
              type: number
            beAppliedAmount:
              description: |
                The applied amount of the debit memo item.
              format: double
              type: number
            comment:
              description: |
                Comments about the debit memo item.

                **Note**: This field is not available if you set the `zuora-version` request header to `257.0` or later.
              type: string
            createdById:
              description: |
                The ID of the Zuora user who created the debit memo item.
              type: string
            createdDate:
              description: |
                The date and time when the debit memo item was created, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-01 15:31:10.
              format: date-time
              type: string
            description:
              description: |
                Description about the debit memo item.

                **Note**: This field is only available if you set the `zuora-version` request header to `257.0` or later.
              type: string
            financeInformation:
              description: |
                Container for the finance information related to the debit memo item.
              properties:
                deferredRevenueAccountingCode:
                  description: |
                    The accounting code for the deferred revenue, such as Monthly Recurring Liability.
                  type: string
                deferredRevenueAccountingCodeType:
                  description: |
                    The type of the deferred revenue accounting code, such as Deferred Revenue.
                  type: string
                recognizedRevenueAccountingCode:
                  description: |
                    The accounting code for the recognized revenue, such as Monthly Recurring Charges or Overage Charges.
                  type: string
                recognizedRevenueAccountingCodeType:
                  description: |
                    The type of the recognized revenue accounting code, such as Sales Revenue or Sales Discount.
                  type: string
                revenueRecognitionRuleName:
                  description: |
                    The name of the revenue recognition rule governing the revenue schedule.
                  type: string
                revenueScheduleNumber:
                  description: |
                    The revenue schedule number. The revenue schedule number is always prefixed with "RS", for example, RS-00000001.
                  type: string
              type: object
            id:
              description: |
                The ID of the debit memo item.
              type: string
            quantity:
              description: |
                The number of units for the debit memo item.
              format: double
              type: number
            serviceEndDate:
              description: |
                The end date of the service period associated with this debit memo item. Service ends one second before the date specified in this field.
              format: date
              type: string
            serviceStartDate:
              description: |
                The start date of the service period associated with this debit memo item. If the associated charge is a one-time fee, this date is the date of that charge.
              format: date
              type: string
            sku:
              description: |
                The SKU for the product associated with the debit memo item.
              type: string
            skuName:
              description: |
                The name of the SKU.
              type: string
            sourceItemId:
              description: |
                The ID of the source item.
              type: string
            sourceItemType:
              description: |
                The type of the source item. 
              enum:
                - SubscriptionComponent
                - InvoiceDetail
                - ProductRatePlanCharge
              type: string
            subscriptionId:
              description: |
                The ID of the subscription associated with the debit memo item.
              type: string
            success:
              description: Returns `true` if the request was processed successfully.
              type: boolean
            taxItems:
              description: |
                Container for the taxation items of the debit memo item.. 

                **Note**: This field is not available if you set the `zuora-version` request header to `239.0` or later.
              items:
                $ref: "#/components/schemas/GETDMTaxItemType"
              type: array
            taxMode:
              description: |
                The tax mode of the debit memo item, indicating whether the amount of the debit memo item includes tax.
              enum:
                - TaxExclusive
                - TaxInclusive
              type: string
            taxationItems:
              description: |
                Container for the taxation items of the debit memo item.

                **Note**: This field is only available if you set the `zuora-version` request header to `239.0` or later.
              properties:
                data:
                  description: |
                    List of taxation items.
                  items:
                    $ref: "#/components/schemas/GETDMTaxItemTypeNew"
                  type: array
                nextPage:
                  description: |
                    URL to retrieve the next page of the response if it exists; otherwise absent.
                  format: URL
                  type: string
              type: object
            unitOfMeasure:
              description: |
                The units to measure usage.
              type: string
            unitPrice:
              description: |
                The per-unit price of the debit memo item.
              format: double
              type: number
            updatedById:
              description: |
                The ID of the Zuora user who last updated the debit memo item.
              type: string
            updatedDate:
              description: |
                The date and time when the debit memo item was last updated, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-02 15:36:10.
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/DebitMemoItemObjectCustomFields"
    GETDebitMemoItemTypewithSuccess:
      allOf:
        - properties:
            amount:
              description: |
                The amount of the debit memo item. For tax-inclusive debit memo items, the amount indicates the debit memo item amount including tax. For tax-exclusive debit memo items, the amount indicates the debit memo item amount excluding tax.
              format: double
              type: number
            amountWithoutTax:
              description: |
                The debit memo item amount excluding tax.
              format: double
              type: number
            balance:
              description: |
                The balance of the debit memo item.
              format: double
              type: number
            beAppliedAmount:
              description: |
                The applied amount of the debit memo item.
              format: double
              type: number
            comment:
              description: |
                Comments about the debit memo item.

                **Note**: This field is not available if you set the `zuora-version` request header to `257.0` or later.
              type: string
            createdById:
              description: |
                The ID of the Zuora user who created the debit memo item.
              type: string
            createdDate:
              description: |
                The date and time when the debit memo item was created, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-01 15:31:10.
              format: date-time
              type: string
            description:
              description: |
                The description of the debit memo item.

                **Note**: This field is only available if you set the `zuora-version` request header to `257.0` or later.
              type: string
            financeInformation:
              description: |
                Container for the finance information related to the debit memo item.
              properties:
                deferredRevenueAccountingCode:
                  description: |
                    The accounting code for the deferred revenue, such as Monthly Recurring Liability.
                  type: string
                deferredRevenueAccountingCodeType:
                  description: |
                    The type of the deferred revenue accounting code, such as Deferred Revenue.
                  type: string
                recognizedRevenueAccountingCode:
                  description: |
                    The accounting code for the recognized revenue, such as Monthly Recurring Charges or Overage Charges.
                  type: string
                recognizedRevenueAccountingCodeType:
                  description: |
                    The type of the recognized revenue accounting code, such as Sales Revenue or Sales Discount.
                  type: string
                revenueRecognitionRuleName:
                  description: |
                    The name of the revenue recognition rule governing the revenue schedule.
                  type: string
                revenueScheduleNumber:
                  description: |
                    The revenue schedule number. The revenue schedule number is always prefixed with "RS", for example, RS-00000001.
                  type: string
              type: object
            id:
              description: |
                The ID of the debit memo item.
              type: string
            quantity:
              description: |
                The number of units for the debit memo item.
              format: double
              type: number
            serviceEndDate:
              description: |
                The end date of the service period associated with this debit memo item. Service ends one second before the date specified in this field.
              format: date
              type: string
            serviceStartDate:
              description: |
                The start date of the service period associated with this debit memo item. If the associated charge is a one-time fee, this date is the date of that charge.
              format: date
              type: string
            sku:
              description: |
                The SKU for the product associated with the debit memo item.
              type: string
            skuName:
              description: |
                The name of the SKU.
              type: string
            sourceItemId:
              description: |
                The ID of the source item.
              type: string
            sourceItemType:
              description: |
                The type of the source item.
              enum:
                - SubscriptionComponent
                - InvoiceDetail
                - ProductRatePlanCharge
              type: string
            subscriptionId:
              description: |
                The ID of the subscription associated with the debit memo item.
              type: string
            taxItems:
              description: |
                Container for the taxation items of the debit memo item. 

                **Note**: This field is not available if you set the `zuora-version` request header to `239.0` or later.
              items:
                $ref: "#/components/schemas/GETDMTaxItemType"
              type: array
            taxMode:
              description: |
                The tax mode of the debit memo item, indicating whether the amount of the debit memo item includes tax.
              enum:
                - TaxExclusive
                - TaxInclusive
              type: string
            taxationItems:
              description: |
                Container for the taxation items of the debit memo item. 

                **Note**: This field is only available if you set the `zuora-version` request header to `239.0` or later.
              properties:
                data:
                  description: |
                    List of taxation items.
                  items:
                    $ref: "#/components/schemas/GETDMTaxItemTypeNew"
                  type: array
                nextPage:
                  description: |
                    URL to retrieve the next page of the response if it exists; otherwise absent.
                  format: URL
                  type: string
              type: object
            unitOfMeasure:
              description: |
                The units to measure usage.
              type: string
            unitPrice:
              description: |
                The per-unit price of the debit memo item.
              format: double
              type: number
            updatedById:
              description: |
                The ID of the Zuora user who last updated the debit memo item.
              type: string
            updatedDate:
              description: |
                The date and time when the debit memo item was last updated, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-02 15:36:10.
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/DebitMemoItemObjectCustomFields"
      title: items
    GETDebitMemoType:
      allOf:
        - properties:
            accountId:
              description: |
                The ID of the customer account associated with the debit memo.
              type: string
            amount:
              description: |
                The total amount of the debit memo.
              format: double
              type: number
            autoPay:
              description: |
                Whether debit memos are automatically picked up for processing in the corresponding payment run. 

                By default, debit memos are automatically picked up for processing in the corresponding payment run.
              type: boolean
            balance:
              description: |
                The balance of the debit memo.
              format: double
              type: number
            beAppliedAmount:
              description: |
                The amount that is applied to the debit memo.
              format: double
              type: number
            cancelledById:
              description: |
                The ID of the Zuora user who cancelled the debit memo.
              type: string
            cancelledOn:
              description: |
                The date and time when the debit memo was cancelled, in `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
              type: string
            comment:
              description: |
                Comments about the debit memo.
              type: string
            createdById:
              description: |
                The ID of the Zuora user who created the debit memo.
              type: string
            createdDate:
              description: |
                The date and time when the debit memo was created, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-01 15:31:10.
              format: date-time
              type: string
            debitMemoDate:
              description: |
                The date when the debit memo takes effect, in `yyyy-mm-dd` format. For example, 2017-05-20.
              format: date
              type: string
            dueDate:
              description: |
                The date by which the payment for the debit memo is due, in `yyyy-mm-dd` format.
              format: date
              type: string
            id:
              description: |
                The unique ID of the debit memo.
              type: string
            latestPDFFileId:
              description: |
                The ID of the latest PDF file generated for the debit memo.
              type: string
            number:
              description: |
                The unique identification number of the debit memo.
              type: string
            postedById:
              description: |
                The ID of the Zuora user who posted the debit memo. 
              type: string
            postedOn:
              description: |
                The date and time when the debit memo was posted, in `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
              type: string
            reasonCode:
              description: |
                A code identifying the reason for the transaction. The value must be an existing reason code or empty.
              type: string
            referredInvoiceId:
              description: |
                The ID of a referred invoice.
              type: string
            status:
              description: |
                The status of the debit memo.
              enum:
                - Draft
                - Posted
                - Canceled
                - Error
                - PendingForTax
                - Generating
                - CancelInProgress
              type: string
            success:
              description: Returns `true` if the request was processed successfully.
              type: boolean
            targetDate:
              description: |
                The target date for the debit memo, in `yyyy-mm-dd` format. For example, 2017-07-20.
              format: date
              type: string
            taxAmount:
              description: |
                The amount of taxation.
              format: double
              type: number
            taxMessage:
              description: |
                The message about the status of tax calculation related to the debit memo. If tax calculation fails in one debit memo, this field displays the reason for the failure.
              type: string
            taxStatus:
              description: |
                The status of tax calculation related to the debit memo.

                **Note**: This field is only applicable to tax calculation by third-party tax engines.
              enum:
                - Complete
                - Error
              type: string
            totalTaxExemptAmount:
              description: |
                The total amount of taxes or VAT for which the customer has an exemption.
              format: double
              type: number
            transferredToAccounting:
              description: |
                Whether the debit memo was transferred to an external accounting system. Use this field for integration with accounting systems, such as NetSuite. 
              enum:
                - Processing
                - Yes
                - No
                - Error
                - Ignore
              type: string
            updatedById:
              description: |
                The ID of the Zuora user who last updated the debit memo.
              type: string
            updatedDate:
              description: |
                The date and time when the debit memo was last updated, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-02 15:36:10.
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/DebitMemoObjectNSFields"
        - $ref: "#/components/schemas/DebitMemoObjectCustomFields"
    GETDebitMemoTypewithSuccess:
      allOf:
        - properties:
            accountId:
              description: |
                The ID of the customer account associated with the debit memo.
              type: string
            amount:
              description: |
                The total amount of the debit memo.
              format: double
              type: number
            autoPay:
              description: |
                Whether debit memos are automatically picked up for processing in the corresponding payment run. 

                By default, debit memos are automatically picked up for processing in the corresponding payment run.      
              type: boolean
            balance:
              description: |
                The balance of the debit memo.
              format: double
              type: number
            beAppliedAmount:
              description: |
                The applied amount of the debit memo.
              format: double
              type: number
            cancelledById:
              description: |
                The ID of the Zuora user who cancelled the debit memo.
              type: string
            cancelledOn:
              description: |
                The date and time when the debit memo was cancelled, in `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
              type: string
            comment:
              description: |
                Comments about the debit memo.
              type: string
            createdById:
              description: |
                The ID of the Zuora user who created the debit memo.
              type: string
            createdDate:
              description: |
                The date and time when the debit memo was created, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-01 15:31:10.
              format: date-time
              type: string
            debitMemoDate:
              description: |
                The date when the debit memo takes effect, in `yyyy-mm-dd` format. For example, 2017-05-20.
              format: date
              type: string
            dueDate:
              description: |
                The date by which the payment for the debit memo is due, in `yyyy-mm-dd` format.
              format: date
              type: string
            id:
              description: |
                The unique ID of the debit memo.
              type: string
            latestPDFFileId:
              description: |
                The ID of the latest PDF file generated for the debit memo.
              type: string
            number:
              description: |
                The unique identification number of the debit memo.
              type: string
            postedById:
              description: |
                The ID of the Zuora user who posted the debit memo.
              type: string
            postedOn:
              description: |
                The date and time when the debit memo was posted, in `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
              type: string
            reasonCode:
              description: |
                A code identifying the reason for the transaction. The value must be an existing reason code or empty.
              type: string
            referredInvoiceId:
              description: |
                The ID of a referred invoice.
              type: string
            status:
              description: |
                The status of the debit memo. 
              enum:
                - Draft
                - Posted
                - Canceled
                - Error
                - PendingForTax
                - Generating
                - CancelInProgress
              type: string
            targetDate:
              description: |
                The target date for the debit memo, in `yyyy-mm-dd` format. For example, 2017-07-20.
              format: date
              type: string
            taxAmount:
              description: |
                The amount of taxation.
              format: double
              type: number
            taxMessage:
              description: |
                The message about the status of tax calculation related to the debit memo. If tax calculation fails in one debit memo, this field displays the reason for the failure.
              type: string
            taxStatus:
              description: |
                The status of tax calculation related to the debit memo.

                **Note**: This field is only applicable to tax calculation by third-party tax engines.
              enum:
                - Complete
                - Error
              type: string
            totalTaxExemptAmount:
              description: |
                The total amount of taxes or VAT for which the customer has an exemption.
              format: double
              type: number
            transferredToAccounting:
              description: |
                Whether the debit memo was transferred to an external accounting system. Use this field for integration with accounting systems, such as NetSuite. 
              enum:
                - Processing
                - Yes
                - No
                - Error
                - Ignore
              type: string
            updatedById:
              description: |
                The ID of the Zuora user who last updated the debit memo.
              type: string
            updatedDate:
              description: |
                The date and time when the debit memo was last updated, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-02 15:31:10.
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/DebitMemoObjectNSFields"
        - $ref: "#/components/schemas/DebitMemoObjectCustomFields"
      title: debitmemos
    GETDiscountApplyDetailsType:
      properties:
        appliedProductRatePlanChargeId:
          description: |
            The ID of the product rate plan charge that the discount rate plan charge applies to.
          type: string
        appliedProductRatePlanId:
          description: |
            The ID of the product rate plan that the discount rate plan charge applies to.
          type: string
      title: discountApplyDetails
      type: object
    GETDocumentPropertiesResponseType:
      properties:
        customFileName:
          description: |
            The custom file name used by Word or PDF files generated for the billing document.
          type: string
        documentId:
          description: |
            The unique ID of a billing document.
          type: string
        documentType:
          description: |
            The type of the billing document. 
          enum:
            - Invoice
            - CreditMemo
            - DebitMemo
          type: string
        id:
          description: |
            The unique ID of a document property.
          type: string
        success:
          description: |
            Indicates whether the call succeeded.
          type: boolean
      type: object
    GETEmailHistoryVOType:
      properties:
        bcc:
          description: |
            Blind carbon copy recipients of the email.
          type: string
        cc:
          description: |
            Carbon Copy recipients of the email.
          type: string
        errorMessage:
          description: |
            null if the content of result is "OK". A description of the error if the content of result is not "OK".
          type: string
        eventCategory:
          description: |
            The event category of the email.
          type: string
        fromEmail:
          description: |
            The sender of the email.
          type: string
        notification:
          description: |
            The name of the notification.
          type: string
        replyTo:
          description: |
            The reply-to address as configured in the email template.
          type: string
        result:
          description: |
            The result from the mail server of sending the email.
          type: string
        sendTime:
          description: |
            The date and time the email was sent.
          type: string
        subject:
          description: |
            The subject of the email.
          type: string
        toEmail:
          description: |
            The intended recipient of the email.
          type: string
      title: emailHistories
      type: object
    GETEmailHistoryVOsType:
      properties:
        emailHistories:
          description: |
            A container for email histories.
          items:
            $ref: "#/components/schemas/GETEmailHistoryVOType"
          type: array
        nextPage:
          description: |
            URL to retrieve the next page of the response if it exists; otherwise absent.
          format: URL
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GETEntitiesResponseType:
      properties:
        entities:
          description: Container for one or more entities in a multi-entity hierarchy.
          items:
            $ref: "#/components/schemas/GETEntitiesType"
          type: array
        success:
          description: Returns `true` if the request is successful.
          type: boolean
      type: object
    GETEntitiesResponseTypeWithId:
      properties:
        displayName:
          description: The display name of the entity that is shown in the Zuora UI and APIs.
          type: string
        id:
          description: The entity Id.
          type: string
        locale:
          description: The locale that is used in this entity.
          type: string
        name:
          description: The name of the entity.
          type: string
        parentId:
          description: The Id of the parent entity.
          type: string
        status:
          description: The status of the entity.
          enum:
            - Provisioned
            - Unprovisioned
          type: string
        success:
          description: Returns `true` if the request is successful.
          type: boolean
        tenantId:
          description: The Id of the tenant that the entity belongs to.
          type: string
        timezone:
          description: The time zone that is used in this entity.
          type: string
      type: object
    GETEntitiesType:
      properties:
        displayName:
          description: |
            The display name of the entity that is shown in the Zuora UI and APIs.
          type: string
        id:
          description: |
            The entity Id.
          type: string
        locale:
          description: |
            The locale that is used in this entity.
          type: string
        name:
          description: |
            The name of the entity.
          type: string
        parentId:
          description: |
            The Id of the parent entity.
          type: string
        status:
          description: |
            The status of the entity.
          enum:
            - Provisioned
            - Unprovisioned
          type: string
        tenantId:
          description: |
            The Id of the tenant that the entity belongs to.
          type: string
        timezone:
          description: |
            The time zone that is used in this entity.
          type: string
      title: entities
      type: object
    GETEntitiesUserAccessibleResponseType:
      properties:
        entities:
          description: |
            Container for one or more entities in a multi-entity hierarchy.
          items:
            $ref: "#/components/schemas/GETEntitiesType"
          type: array
        success:
          description: |
            Returns `true` if the request is successful.
          type: boolean
      type: object
    GETEntityConnectionsArrayItemsType:
      properties:
        id:
          description: |
            The ID of the connection.
          type: string
        sourceEntityId:
          description: |
            The ID of the source entity in the connection.
          type: string
        status:
          description: |
            Status of the connection. 

            Possible values:
             - `Connected`
             - `Pending`
             - `Disconnected`
          type: string
        targetEntityId:
          description: |
            The ID of the target entity in the connection.
          type: string
      title: entityConnections
      type: object
    GETEntityConnectionsResponseType:
      properties:
        entityConnections:
          description: |
            Container for one or more connections that are related to the entity.
          items:
            $ref: "#/components/schemas/GETEntityConnectionsArrayItemsType"
          type: array
        nextPage:
          description: |
            URL to retrieve the next page of the response if it exists; otherwise absent.
          format: URL
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GETInvoiceFileWrapper:
      properties:
        invoices:
          description: |
            Contains information about one or more invoices:
          items:
            $ref: "#/components/schemas/GETInvoiceType"
          type: array
        nextPage:
          description: |
            URL to retrieve the next page of the response if it exists; otherwise absent.
          format: URL
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GETInvoiceFilesResponse:
      properties:
        invoiceFiles:
          description: |
            Container for invoice PDF files.
          items:
            $ref: "#/components/schemas/InvoiceFile"
          type: array
        nextPage:
          description: |
            URL to retrieve the next page of the response if it exists; otherwise absent.
          format: URL
          type: string
        success:
          description: Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GETInvoiceItemsResponse:
      properties:
        invoiceItems:
          description: |
            Container for invoice items.
          items:
            $ref: "#/components/schemas/InvoiceItem"
          type: array
        nextPage:
          description: |
            URL to retrieve the next page of the response if it exists; otherwise absent.
          format: URL
          type: string
        success:
          description: Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GETInvoiceTaxItemType:
      properties:
        availableToCreditAmount:
          description: |
            The amount of the invoice taxation item that is available to credit.
          format: decimal
          type: number
        balance:
          description: |
            The balance of the taxation item.
          format: double
          type: number
        creditAmount:
          description: |
            The amount of credit memos applied to the taxation item. 
          format: double
          type: number
        exemptAmount:
          description: |
            The amount of taxes or VAT for which the customer has an exemption.
          format: double
          type: number
        id:
          description: |
            The ID of the taxation item.
          type: string
        jurisdiction:
          description: |
            The jurisdiction that applies the tax or VAT. This value is typically a state, province, county, or city.
          type: string
        locationCode:
          description: |
            The identifier for the location based on the value of the `taxCode` field.
          type: string
        name:
          description: |
            The name of the taxation item.
          type: string
        paymentAmount:
          description: |
            The amount of payments applied to the taxation item. 
          format: double
          type: number
        taxAmount:
          description: |
            The amount of taxation.
          format: double
          type: number
        taxCode:
          description: |
            The tax code identifies which tax rules and tax rates to apply to a specific invoice.
          type: string
        taxCodeDescription:
          description: |
            The description of the tax code.
          type: string
        taxDate:
          description: |
            The date that the tax is applied to the invoice, in `yyyy-mm-dd` format.
          format: date
          type: string
        taxRate:
          description: |
            The tax rate applied to the invoice.
          format: double
          type: number
        taxRateDescription:
          description: |
            The description of the tax rate.
          type: string
        taxRateType:
          description: |
            The type of the tax rate.
          enum:
            - Percentage
            - FlatFee
          type: string
      title: data
      type: object
    GETInvoiceTaxationItemsResponse:
      properties:
        data:
          description: |
            Container for the taxation items of the invoice item.
          items:
            $ref: "#/components/schemas/GETInvoiceTaxItemType"
          type: array
        nextPage:
          description: |
            URL to retrieve the next page of the response if it exists; otherwise absent.
          format: URL
          type: string
        success:
          description: Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GETInvoiceType:
      allOf:
        - properties:
            accountId:
              description: |
                Customer account ID.
              type: string
            accountName:
              description: |
                Customer account name.
              type: string
            accountNumber:
              description: |
                Customer account number.
              type: string
            amount:
              description: |
                Amount of the invoice before adjustments, discounts, and similar items.
              format: decimal
              type: string
            balance:
              description: |
                Balance remaining due on the invoice (after adjustments, discounts, etc.)
              format: decimal
              type: string
            body:
              description: |
                The REST URL of the invoice PDF file.
              type: string
            createdBy:
              description: |
                User ID of the person who created the invoice. If a bill run generated the invoice, then this is the user ID of person who created the bill run.
              type: string
            creditBalanceAdjustmentAmount:
              description: ""
              format: decimal
              type: string
            dueDate:
              description: |
                Payment due date as _yyyy-mm-dd_.
              format: date
              type: string
            id:
              description: |
                Invoice ID.
              type: string
            invoiceDate:
              description: |
                Invoice date as _yyyy-mm-dd_
              format: date
              type: string
            invoiceFiles:
              description: |
                URL to retrieve information about all files of a specific invoice if any file exists; otherwise absent. For example, `https://rest.zuora.com/v1/invoices/2c92c095511f5b4401512682dcfd7987/files`. If you want to view the invoice file details, call [Get invoice files](https://www.zuora.com/developer/api-reference/#operation/GET_InvoiceFiles) with the returned URL.

                If your tenant was created before Zuora Release 228 (R228), July 2018, the value of this field is an array of invoice file details. For more information about the array, see the response body of [Get invoice files](https://www.zuora.com/developer/api-reference/#operation/GET_InvoiceFiles). 

                Zuora recommends that you use the latest behavior to retrieve invoice information. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/) asking for invoice item and file references to be enabled in the REST API.
              format: URL
              type: string
            invoiceItems:
              description: |
                URL to retrieve information about all items of a specific invoice. For example, `https://rest.zuora.com/v1/invoices/2c92c095511f5b4401512682dcfd7987/items`. If you want to view the invoice item details, call [Get invoice items](https://www.zuora.com/developer/api-reference/#operation/GET_InvoiceItems) with the returned URL.

                If your tenant was created before Zuora Release 228 (R228), July 2018, the value of this field is an array of invoice item details. For more information about the array, see the response body of [Get invoice items](https://www.zuora.com/developer/api-reference/#operation/GET_InvoiceItems). 

                Zuora recommends that you use the latest behavior to retrieve invoice information. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/) asking for invoice item and file references to be enabled in the REST API. 
              format: URL
              type: string
            invoiceNumber:
              description: |
                Unique invoice ID, returned as a string.
              type: string
            invoiceTargetDate:
              description: |
                Date through which charges on this invoice are calculated, as _yyyy-mm-dd_.
              format: date
              type: string
            reversed:
              description: |
                Whether the invoice is reversed.
              type: boolean
            status:
              description: |
                Status of the invoice in the system - not the payment status, but the status of the invoice itself. Possible values are: `Posted`, `Draft`, `Canceled`, `Error`.
              type: string
          type: object
        - $ref: "#/components/schemas/InvoiceObjectNSFields"
        - $ref: "#/components/schemas/InvoiceObjectCustomFields"
      title: invoices
    GETJournalEntriesInJournalRunType:
      properties:
        journalEntries:
          description: |
            Key name that represents the list of journal entries.
          items:
            $ref: "#/components/schemas/GETJournalEntryDetailTypeWithoutSuccess"
          type: array
        nextPage:
          description: |
            URL to retrieve the next page of the response if it exists; otherwise absent.
          format: URL
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GETJournalEntryDetailType:
      allOf:
        - properties:
            accountingPeriodName:
              description: |
                Name of the accounting period that the journal entry belongs to.
              type: string
            aggregateCurrency:
              description: |
                Returns true if the journal entry is aggregating currencies. That is, if the journal entry was created when the `Aggregate transactions with different currencies during a Journal Run` setting was configured to `Yes`. Otherwise, returns `false`.
              type: boolean
            currency:
              description: |
                Currency used.
              type: string
            homeCurrency:
              description: |
                Home currency used.
              type: string
            journalEntryDate:
              description: |
                Date of the journal entry.
              format: date
              type: string
            journalEntryItems:
              description: |
                Key name that represents the list of journal entry items.
              items:
                $ref: "#/components/schemas/GETJournalEntryItemType"
              type: array
            notes:
              description: |
                
                Additional information about this record.
                Character limit: 2,000
              type: string
            number:
              description: |
                Journal entry number in the format JE-00000001.
              type: string
            segments:
              description: |
                List of segments that apply to the summary journal entry.
              items:
                $ref: "#/components/schemas/GETJournalEntrySegmentType"
              type: array
            status:
              description: |
                Status of journal entry.
              enum:
                - Created
                - Cancelled
              type: string
            success:
              description: |
                Returns `true` if the request was processed successfully.
              type: boolean
            timePeriodEnd:
              description: |
                End date of time period included in the journal entry.
              format: date
              type: string
            timePeriodStart:
              description: |
                Start date of time period included in the journal entry.
              format: date
              type: string
            transactionType:
              description: |
                Transaction type of the transactions included in the summary journal entry.
              type: string
            transferDateTime:
              description: |
                Date and time that transferredToAccounting was changed to `Yes`. This field is returned only when transferredToAccounting is `Yes`. Otherwise, this field is `null`.
              format: date-time
              type: string
            transferredBy:
              description: |
                User ID of the person who changed transferredToAccounting to `Yes`. This field is returned only when transferredToAccounting is `Yes`. Otherwise, this field is `null`.
              type: string
            transferredToAccounting:
              description: "Status shows whether the journal entry has been transferred to an accounting system. "
              enum:
                - No
                - Processing
                - Yes
                - Error
                - Ignore
              type: string
          type: object
        - $ref: "#/components/schemas/JournalEntryObjectCustomFields"
    GETJournalEntryDetailTypeWithoutSuccess:
      allOf:
        - properties:
            accountingPeriodName:
              description: |
                Name of the accounting period that the journal entry belongs to.
              type: string
            aggregateCurrency:
              description: |
                Returns true if the journal entry is aggregating currencies. That is, if the journal entry was created when the `Aggregate transactions with different currencies during a JournalRun` setting was configured to "Yes". Otherwise, returns `false`.
              type: boolean
            currency:
              description: |
                Currency used.
              type: string
            homeCurrency:
              description: |
                Home currency used.
              type: string
            journalEntryDate:
              description: |
                Date of the journal entry.
              format: date
              type: string
            journalEntryItems:
              description: |
                Key name that represents the list of journal entry items.
              items:
                $ref: "#/components/schemas/GETJournalEntryItemType"
              type: array
            notes:
              description: |
                Additional information about this record.
                Character limit: 2,000
              type: string
            number:
              description: |
                Journal entry number in the format JE-00000001.
              type: string
            segments:
              description: |
                List of segments that apply to the summary journal entry.
              items:
                $ref: "#/components/schemas/GETJournalEntrySegmentType"
              type: array
            status:
              description: "Status of journal entry. "
              enum:
                - Created
                - Cancelled
              type: string
            timePeriodEnd:
              description: |
                End date of time period included in the journal entry.
              format: date
              type: string
            timePeriodStart:
              description: |
                Start date of time period included in the journal entry.
              format: date
              type: string
            transactionType:
              description: |
                Transaction type of the transactions included in the summary journal entry.
              type: string
            transferDateTime:
              description: |
                Date and time that transferredToAccounting was changed to `Yes`. This field is returned only when transferredToAccounting is `Yes`. Otherwise, this field is `null`.
              format: date-time
              type: string
            transferredBy:
              description: |
                User ID of the person who changed transferredToAccounting to `Yes`. This field is returned only when transferredToAccounting is `Yes`. Otherwise, this field is `null`.
              type: string
            transferredToAccounting:
              description: "Status shows whether the journal entry has been transferred to an accounting system. "
              enum:
                - No
                - Processing
                - Yes
                - Error
                - Ignore
              type: string
          type: object
        - $ref: "#/components/schemas/JournalEntryObjectCustomFields"
      title: journalEntries
    GETJournalEntryItemType:
      allOf:
        - properties:
            accountingCodeName:
              description: |
                Name of the accounting code.
              type: string
            accountingCodeType:
              description: |
                Accounting code type.

                Note that `On-Account Receivable` is only available if you enable the Invoice Settlement feature. 
              enum:
                - AccountsReceivable
                - On-Account Receivable
                - Cash
                - OtherAssets
                - CustomerCashOnAccount
                - DeferredRevenue
                - SalesTaxPayable
                - OtherLiabilities
                - SalesRevenue
                - SalesDiscounts
                - OtherRevenue
                - OtherEquity
                - BadDebt
                - OtherExpenses
              type: string
            amount:
              description: |
                Journal entry item amount in transaction currency.
              format: decimal
              type: string
            glAccountName:
              description: |
                The account number in the general ledger (GL) that corresponds to the accounting code.
              type: string
            glAccountNumber:
              description: |
                The account name in the general ledger (GL) that corresponds to the accounting code.
              type: string
            homeCurrencyAmount:
              description: |
                Journal entry item amount in home currency.
              format: decimal
              type: string
            type:
              description: "Type of journal entry item. "
              enum:
                - Credit
                - Debit
              type: string
          type: object
        - $ref: "#/components/schemas/JournalEntryItemObjectCustomFields"
      title: journalEntryItems
    GETJournalEntrySegmentType:
      properties:
        segmentName:
          description: |
            Name of segment.
          type: string
        segmentValue:
          description: |
            Value of segment in this summary journal entry.
          type: string
      title: segments
      type: object
    GETJournalRunTransactionType:
      properties:
        type:
          description: |
            Transaction type. Invoice Adjustment is deprecated on Production. Zuora recommends that you use the Invoice Item Adjustment instead.

            If you enable the Invoice Settlement feature, Debit Memo Item, Credit Memo Item, and Credit Memo Application Item are available, Payment and Refund will be replaced by Payment Application and Refund Application. 

            If you enable both the Invoice Settlement feature and the Invoice Item Settlement feature, Payment and Refund will be replaced by Payment Application Item and Refund Application Item. 
          enum:
            - Invoice Item
            - Taxation Item
            - Invoice Item Adjustment (Invoice)
            - Invoice Item Adjustment (Tax)
            - Invoice Adjustment
            - Electronic Payment
            - External Payment
            - Electronic Refund
            - External Refund
            - Electronic Credit Balance Payment
            - External Credit Balance Payment
            - Electronic Credit Balance Refund
            - External Credit Balance Refund
            - Credit Balance Adjustment (Applied from Credit Balance)
            - Credit Balance Adjustment (Transferred to Credit Balance)
            - Revenue Event Item
            - Debit Memo Item (Charge)
            - Debit Memo Item (Tax)
            - Credit Memo Item (Charge)
            - Credit Memo Item (Tax)
            - Credit Memo Application Item
            - Electronic Payment Application
            - External Payment Application
            - Electronic Refund Application
            - External Refund Application
            - Electronic Payment Application Item
            - External Payment Application Item
            - Electronic Refund Application Item
            - External Refund Application Item
          type: string
      title: transactionTypes
      type: object
    GETJournalRunType:
      properties:
        aggregateCurrency:
          description: ""
          type: boolean
        executedOn:
          description: |
            Date and time the journal run was executed.
          format: date-time
          type: string
        journalEntryDate:
          description: |
            Date of the journal entry.
          format: date
          type: string
        number:
          description: |
            Journal run number.
          type: string
        segmentationRuleName:
          description: |
            Name of GL segmentation rule used in the journal run.
          type: string
        status:
          description: |
            Status of the journal run. 
          enum:
            - Pending
            - Processing
            - Completed
            - Error
            - CancelInprogress
            - Cancelled
            - DeleteInprogress
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
        targetEndDate:
          description: |
            The target end date of the journal run.
          format: date
          type: string
        targetStartDate:
          description: |
            The target start date of the journal run.
          format: date
          type: string
        totalJournalEntryCount:
          description: |
            Total number of journal entries in the journal run.
          format: int64
          type: integer
        transactionTypes:
          description: |
            Transaction types included in the journal run.
          items:
            $ref: "#/components/schemas/GETJournalRunTransactionType"
          type: array
      type: object
    GETMassUpdateType:
      properties:
        actionType:
          description: |
            Type of mass action.
          type: string
        endedOn:
          description: |
            Date and time that the mass action was completed. The format is `yyyy-MM-dd hh:mm:ss`.
          format: date-time
          type: string
        errorCount:
          description: |
            Total number of failed records.

            This field is updated in real time. When the mass action **status** is Processing, this field returns the number of records that have failed so far. When the mass action **status** is Pending, this field is null.
          type: string
        inputSize:
          description: |
            Size of the input file in bytes.
          format: int64
          type: integer
        outputSize:
          description: |
            Size of the response file in bytes.
          format: int64
          type: integer
        outputType:
          description: |
            Type of output for the response file. The following table describes the output type.

            | Output Type    | Description                         |
            |----------------|-------------------------------------|
            | (url:.csv.zip) | URL pointing to a zipped .csv file. |
          type: string
        outputURL:
          description: |
            URL to download the response file. The response file is a zipped .csv file. 
            The response file is identical to the file you uploaded to perform the mass action, with additional columns providing information about the outcome of each record. 
            This field only returns a value when the mass action **status** is Completed or Stopped. Otherwise, this field is null.
          type: string
        processedCount:
          description: |
            Total number of processed records. This field is equal to the sum of `errorCount` and `successCount`.

            This field is updated in real time. When the mass action **status** is Processing, this field returns the number of records that have been processed so far. When the mass action **status** is Pending, this field is null.
          type: string
        startedOn:
          description: |
            Date and time that Zuora started processing the mass action. The format is `yyyy-MM-dd hh:mm:ss`.
          format: date-time
          type: string
        status:
          description: |
            Status of the mass action. The following table describes the mass action statuses.

            | Status     | Description                                                                |
            |------------|----------------------------------------------------------------------------|
            | Pending    | Mass action has not yet started being processed.                           |
            | Processing | Mass action is in progress.                                                |
            | Stopping   | Mass action is in the process of stopping, but has not yet stopped.        |
            | Stopped    | Mass action has stopped.                                                   |
            | Completed  | Mass action was successfully completed. There may still be failed records. |
            | Failed     | Mass action failed. No records are processed. No response file is created. |
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
        successCount:
          description: |
            Total number of successful records.
            This field is updated in real time. When the mass action **status** is Processing, this field returns the number of records that have succeeded so far. When the mass action **status** is Pending, this field is null.
          type: string
        totalCount:
          description: |
            Total number of records in the uploaded mass action file.
            When the mass action **status** is Pending, this field is null.
          type: string
        uploadedBy:
          description: |
            Email of the person who uploaded the mass action file.
          type: string
        uploadedOn:
          description: |
            Date and time that the mass action file was uploaded. The format is `yyyy-MM-dd hh:mm:ss`.
          format: date-time
          type: string
      type: object
    GETPMAccountHolderInfo:
      description: |
        The account holder information.
      properties:
        accountHolderName:
          description: |
            The full name of the account holder.
          type: string
        addressLine1:
          description: |
            The first line of the address for the account holder.
          type: string
        addressLine2:
          description: |
            The second line of the address for the account holder. 
          type: string
        city:
          description: |
            The city where the account holder stays.
          type: string
        country:
          description: |
            The country where the account holder stays.
          type: string
        email:
          description: |
            The email address of the account holder.
          type: string
        phone:
          description: |
            The phone number of the account holder.  
          type: string
        state:
          description: |
            The state where the account holder stays.
          type: string
        zipCode:
          description: |
            The zip code for the address of the account holder.
          type: string
      title: accountHolderInfo
      type: object
    GETPaidInvoicesType:
      properties:
        appliedPaymentAmount:
          description: |
            Amount of the payment applied to this invoice.
          format: decimal
          type: string
        invoiceId:
          description: |
            Invoice ID.
          type: string
        invoiceNumber:
          description: |
            Invoice number.
          type: string
      title: paidInvoices
      type: object
    GETPaymentGatwaysResponse:
      properties:
        paymentgateways:
          description: ""
          items:
            $ref: "#/components/schemas/GETAPaymentGatwayResponse"
          type: array
        success:
          description: Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GETPaymentItemPartCollectionType:
      properties:
        itemParts:
          description: |
            Container for payment part items.
          items:
            $ref: "#/components/schemas/GETPaymentItemPartTypewithSuccess"
          type: array
        nextPage:
          description: |
            URL to retrieve the next page of the response if it exists; otherwise absent.
          format: URL
          type: string
        success:
          description: Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GETPaymentItemPartType:
      properties:
        amount:
          description: |
            The amount of the payment part item.
          format: double
          type: number
        createdById:
          description: |
            The ID of the Zuora user who created the payment part item.
          type: string
        createdDate:
          description: |
            The date and time when the payment part item was created, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-01 15:31:10.
          format: date-time
          type: string
        debitMemoItemId:
          description: |
            The ID of the debit memo item associated with the payment part item.
          type: string
        id:
          description: |
            The ID of the payment part item.
          type: string
        invoiceItemId:
          description: |
            The ID of the invoice item associated with the payment part item.
          type: string
        success:
          description: Returns `true` if the request was processed successfully.
          type: boolean
        taxItemId:
          description: |
            The ID of the taxation item associated with the payment part item.
          type: string
        updatedById:
          description: |
            The ID of the Zuora user who last updated the payment part item.
          type: string
        updatedDate:
          description: |
            The date and time when the payment part item was last updated, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-02 15:36:10.
          format: date-time
          type: string
      type: object
    GETPaymentItemPartTypewithSuccess:
      properties:
        amount:
          description: |
            The amount of the payment part item.
          format: double
          type: number
        createdById:
          description: |
            The ID of the Zuora user who created the payment part item.
          type: string
        createdDate:
          description: |
            The date and time when the payment part item was created, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-01 15:31:10.
          format: date-time
          type: string
        debitMemoItemId:
          description: |
            The ID of the debit memo item associated with the payment part item.
          type: string
        id:
          description: |
            The ID of the payment part item.
          type: string
        invoiceItemId:
          description: |
            The ID of the invoice item associated with the payment part item.
          type: string
        taxItemId:
          description: |
            The ID of the taxation item associated with the payment part item.
          type: string
        updatedById:
          description: |
            The ID of the Zuora user who last updated the payment part item.
          type: string
        updatedDate:
          description: |
            The date and time when the payment part item was last updated, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-02 15:36:10.
          format: date-time
          type: string
      title: itemParts
      type: object
    GETPaymentMethodResponse:
      allOf:
        - properties:
            accountHolderInfo:
              $ref: "#/components/schemas/GETPMAccountHolderInfo"
            id:
              description: |
                The payment method ID.
              type: string
            isDefault:
              description: |
                Indicates whether this payment method is the default payment method for the account.
              type: boolean
            mandateInfo:
              $ref: "#/components/schemas/POSTPMMandateInfo"
            status:
              description: |
                The status of the payment method.
              enum:
                - Active
                - Closed
                - Scrubbed
              type: string
            type:
              description: |
                The type of the payment method. For example, `CreditCard`.
              type: string
          type: object
        - $ref: "#/components/schemas/PaymentMethodObjectCustomFields"
        - $ref: "#/components/schemas/GETPaymentMethodResponseBankTransfer"
        - $ref: "#/components/schemas/GETPaymentMethodResponseACH"
        - $ref: "#/components/schemas/GETPaymentMethodResponseCreditCard"
        - $ref: "#/components/schemas/GETPaymentMethodResponsePayPal"
    GETPaymentMethodResponseACH:
      properties:
        bankABACode:
          description: |
            The nine-digit routing number or ABA number used by banks. This field is only required if the `type` field is set to `ACH`.
          type: string
        bankAccountName:
          description: |
            The name of the account holder, which can be either a person or a company. This field is only required if the `type` field is set to `ACH`.
          type: string
        bankAccountNumber:
          description: |
            The bank account number associated with the ACH payment. This field is only required if the `type` field is set to `ACH`.
          type: string
        bankAccountType:
          description: |
            The type of bank account associated with the ACH payment. This field is only required if the `type` field is set to `ACH`.
          enum:
            - BusinessChecking
            - Checking
            - Saving
          type: string
        bankName:
          description: |
            The name of the bank where the ACH payment account is held. This field is only required if the `type` field is set to `ACH`.
          type: string
      type: object
    GETPaymentMethodResponseBankTransfer:
      properties:
        IBAN:
          description: |
            The International Bank Account Number used to create the SEPA payment method. The value is masked.
          type: string
        accountNumber:
          description: |
            The number of the customer's bank account and it is masked.
          type: string
        bankCode:
          description: |
            The sort code or number that identifies the bank. This is also known as the sort code.         
          type: string
        bankTransferType:
          description: |
            The type of the Bank Transfer payment method. For example, `SEPA`.
          type: string
        branchCode:
          description: |
            The branch code of the bank used for Direct Debit.          
          type: string
        businessIdentificationCode:
          description: |
            The BIC code used for SEPA. The value is masked.       
          type: string
        identityNumber:
          description: |
            The identity number used for Bank Transfer.        
          type: string
      type: object
    GETPaymentMethodResponseCreditCard:
      properties:
        cardNumber:
          description: |
            The masked credit card number. 
          type: string
        expirationMonth:
          description: |+
            One or two digits expiration month (1-12).
                    
          type: integer
        expirationYear:
          description: |
            Four-digit expiration year.
          type: integer
        securityCode:
          description: |
            The CVV or CVV2 security code for the credit card or debit card.
                        Only required if changing expirationMonth, expirationYear, or cardHolderName.
                        To ensure PCI compliance, this value isn''t stored and can''t be queried.                  
          type: string
      type: object
    GETPaymentMethodResponsePayPal:
      properties:
        BAID:
          description: |
            ID of a PayPal billing agreement. For example, I-1TJ3GAGG82Y9.
          type: string
        email:
          description: |
            Email address associated with the PayPal payment method. 
          type: string
        preapprovalKey:
          description: |
            The PayPal preapproval key.
          type: string
      type: object
    GETPaymentMethodType:
      properties:
        cardHolderInfo:
          description: |
            Container for the name and billing address for the card holder.
          properties:
            addressLine1:
              description: |
                First address line, 255 characters or less.
              type: string
            addressLine2:
              description: |
                Second address line, 255 characters or less.
              type: string
            cardHolderName:
              description: |
                The full name as it appears on the card, e.g., "John J Smith", 50 characters or less.
              type: string
            city:
              description: |
                City, 40 characters or less.
              type: string
            country:
              description: |
                Country, must be a valid country name or abbreviation.
              type: string
            email:
              description: |
                Card holder's email address, 80 characters or less.
              type: string
            phone:
              description: |
                Phone number, 40 characters or less.
              type: string
            state:
              description: |
                State, must be a valid state name or 2-character abbreviation.
              type: string
            zipCode:
              description: |
                Zip code, 20 characters or less.
              type: string
          type: object
        cardNumber:
          description: |
            Credit or debit card number, 16 characters or less, masked for security purposes.
          type: string
        cardType:
          description: |
            The type of the credit card.
                
            Possible values  include `Visa`, `MasterCard`, `AmericanExpress`, `Discover`, `JCB`, and `Diners`. For more information about credit card types supported by different payment gateways, see [Supported Payment Gateways](https://knowledgecenter.zuora.com/CB_Billing/M_Payment_Gateways/Supported_Payment_Gateways).
          type: string
        defaultPaymentMethod:
          description: |
            Contains true if this is the default payment method for this customer, otherwise false.
          type: boolean
        expirationMonth:
          description: |
            One or two digit(s) expiration month (1-12).
          type: integer
        expirationYear:
          description: |
            Four-digit expiration year.
          type: integer
        id:
          description: |
            Unique ID generated by Zuora when this payment method was created.
          type: string
      title: creditCards
      type: object
    GETPaymentMethodsType:
      properties:
        creditCards:
          description: |
            Container for one or more credit or debit card records:
          items:
            $ref: "#/components/schemas/GETPaymentMethodType"
          type: array
        nextPage:
          description: |
            URL to retrieve the next page of the response if it exists; otherwise absent.
          format: URL
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GETPaymentPartType:
      properties:
        amount:
          description: |
            The amount of the payment part.
          format: double
          type: number
        createdById:
          description: |
            The ID of the Zuora user who created the payment part.
          type: string
        createdDate:
          description: |
            The date and time when the payment part was created, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-01 15:31:10.
          format: date-time
          type: string
        debitMemoId:
          description: |
            The ID of the debit memo associated with the payment part.
          type: string
        id:
          description: |
            The ID of the payment part.
          type: string
        invoiceId:
          description: |
            The ID of the invoice associated with the payment part.
          type: string
        success:
          description: Returns `true` if the request was processed successfully.
          type: boolean
        updatedById:
          description: |
            The ID of the Zuora user who last updated the payment part.
          type: string
        updatedDate:
          description: |
            The date and time when the payment part was last updated, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-02 15:36:10.
          format: date-time
          type: string
      type: object
    GETPaymentPartTypewithSuccess:
      properties:
        amount:
          description: |
            The amount of the payment part.
          format: double
          type: number
        createdById:
          description: |
            The ID of the Zuora user who created the payment part.
          type: string
        createdDate:
          description: |
            The date and time when the payment part was created, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-01 15:31:10.
          format: date-time
          type: string
        debitMemoId:
          description: |
            The ID of the debit memo associated with the payment part.
          type: string
        id:
          description: |
            The ID of the payment part.
          type: string
        invoiceId:
          description: |
            The ID of the invoice associated with the payment part.
          type: string
        updatedById:
          description: |
            The ID of the Zuora user who last updated the payment part.
          type: string
        updatedDate:
          description: |
            The date and time when the payment part was last updated, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-02 15:36:10.
          format: date-time
          type: string
      title: parts
      type: object
    GETPaymentPartsCollectionType:
      properties:
        nextPage:
          description: |
            URL to retrieve the next page of the response if it exists; otherwise absent.
          format: URL
          type: string
        parts:
          description: |
            Container for payment parts.
          items:
            $ref: "#/components/schemas/GETPaymentPartTypewithSuccess"
          type: array
        success:
          description: Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GETPaymentRunCollectionType:
      properties:
        nextPage:
          description: |
            The URL for requesting the next page of the response, if it exists; otherwise absent.
          type: string
        paymentRuns:
          description: |
            Container for payment runs.
          items:
            $ref: "#/components/schemas/GETPaymentRunType"
          type: array
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GETPaymentRunDataArrayResponse:
      properties:
        data:
          description: |
            Container for payment run data. Each element in the array is a record processed by the payment run.
          items:
            $ref: "#/components/schemas/GETPaymentRunDataElementResponse"
          type: array
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GETPaymentRunDataElementResponse:
      properties:
        accountId:
          description: |
            The customer account ID specified in the `data` field when creating the payment run.
          type: string
        amount:
          description: |
            The amount specified in the `data` field when creating the payment run. `null` is returned if it was not specified.
          type: number
        amountCollected:
          description: |
            The amount that is collected.
          type: number
        amountToCollect:
          description: |
            The amount to be collected.
          type: number
        comment:
          description: |
            The comment specified in the `data` field when creating the payment run. `null` is returned if it was not specified.
          type: string
        documentId:
          description: |
            The billing document ID specified in the `data` field when creating the payment run. `null` is returned if it was not specified.
          type: string
        documentType:
          description: |
            The billing document type specified in the `data` field when creating the payment run. `null` is returned if it was not specified.
          enum:
            - Invoice
            - DebitMemo
          type: string
        errorCode:
          description: |
            The error code of the response.
          type: string
        errorMessage:
          description: |
            The detailed information of the error response.
          type: string
        paymentGatewayId:
          description: |
            The payment gateway ID specified in the `data` field when creating the payment run. `null` is returned if it was not specified.
          type: string
        paymentMethodId:
          description: |
            The payment method ID specified in the `data` field when creating the payment run. `null` is returned if it was not specified.
          type: string
        result:
          description: |
            Indicates whether the data is processed successfully or not.
          enum:
            - Processed
            - Error
          type: string
        transactions:
          description: |
            Container for transactions that apply to the current request. Each element contains an array of the settlement/payment applied to the record.
          items:
            $ref: "#/components/schemas/GETPaymentRunDataTransactionElementResponse"
          type: array
      title: payment run data
      type: object
    GETPaymentRunDataTransactionElementResponse:
      properties:
        amount:
          description: |
            The total amount of the newly generated payment.

            **Note:** This field is only available if `type` is `Payment`.
          type: number
        appliedAmount:
          description: |
            The amount applied to the record.
          type: number
        errorCode:
          description: |
            The error code of the response.

            **Note:** This field is only available if `type` is `Payment`.
          type: string
        errorMessage:
          description: |-
            The detailed information of the error response.

            **Note:** This field is only available if `type` is `Payment`.
          type: string
        id:
          description: |
            The ID of the current transaction.
          type: string
        status:
          description: |
            The status of the newly generated payment.

            **Note:** This field is only available if `type` is `Payment`.
          enum:
            - Processed
            - Processing
            - Error
          type: string
        type:
          description: |
            The type of the current transaction.
          enum:
            - Payment
            - CreditMemo
            - UnappliedPayment
            - CreditBalanceAdjustment
          type: string
      title: payment run transaction
      type: object
    GETPaymentRunSummaryResponse:
      properties:
        numberOfCreditBalanceAdjustments:
          description: |
            **Note:** This field is only available if you have the Credit Balance feature enabled.

            The number of credit balance adjustments that are successfully processed in the payment run.
          type: integer
        numberOfCreditMemos:
          description: |
            **Note:** This field is only available if you have the Invoice Settlement feature enabled.

            The total number of credit memos that are successfully processed in the payment run.
          type: integer
        numberOfDebitMemos:
          description: |
            **Note:** This field is only available if you have the Invoice Settlement feature enabled.

            The total number of debit memos that are picked up for processing in the payment run.
          type: integer
        numberOfErrorInputData:
          description: |
            The number of input data that are processed with errors.
          type: integer
        numberOfErrors:
          description: |
            The number of payments with the status of `Error` and `Processing`.
          type: integer
        numberOfInputData:
          description: |
            The total number of input data.
          type: integer
        numberOfInvoices:
          description: |
            **Note:** This field is only available if you have the Invoice Settlement feature enabled.

            The total number of invoices that are picked up for processing in the payment run.
          type: integer
        numberOfPayments:
          description: |
            The number of payments that are successfully processed in the payment run.
          type: integer
        numberOfProcessedInputData:
          description: |
            The number of input data that are successfully processed.
          type: integer
        numberOfReceivables:
          description: |
            The total number of receivables that are picked up for processing in the payment run.

            The value of this field is the sum of the value of the `numberOfInvoices` field and that of the `numberOfDebitMemos` field.
          type: integer
        numberOfUnappliedPayments:
          description: |
            **Note:** This field is only available if you have the Invoice Settlement feature enabled.

            The number of unapplied payments that are successfully processed in the payment run.
          type: integer
        numberOfUnprocessedDebitMemos:
          description: |
            **Note:** This field is only available if you have the Invoice Settlement feature enabled.

            The number of debit memos with remaining positive balances after the payment run is completed.
          type: integer
        numberOfUnprocessedInvoices:
          description: |
            **Note:** This field is only available if you have the Invoice Settlement feature enabled.

            The number of invoices with remaining positive balances after the payment run is completed.
          type: integer
        numberOfUnprocessedReceivables:
          description: |
            The number of receivables with remaining positive balances after the payment run is completed.
          type: integer
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
        totalValues:
          description: |
            Container for total values.
          items:
            $ref: "#/components/schemas/GETPaymentRunSummaryTotalValues"
          type: array
      type: object
    GETPaymentRunSummaryTotalValues:
      properties:
        totalValueOfCreditBalance:
          description: |
            **Note:** This field is only available if you have the Credit Balance feature enabled.

            The total amount of credit balance after the payment run is completed.
          type: string
        totalValueOfCreditMemos:
          description: |
            **Note:** This field is only available if you have the Invoice Settlement feature enabled.

            The total amount of credit memos that are successfully processed in the payment run.
          type: string
        totalValueOfDebitMemos:
          description: |
            **Note:** This field is only available if you have the Invoice Settlement feature enabled.

            The total amount of debit memos that are picked up for processing in the payment run.
          type: string
        totalValueOfErrors:
          description: |
            The total amount of receivables associated with the payments with the status of `Error` and `Processing`.
          type: string
        totalValueOfInvoices:
          description: |
            **Note:** This field is only available if you have the Invoice Settlement feature enabled.

            The total amount of invoices that are picked up for processing in the payment run.
          type: string
        totalValueOfPayments:
          description: |
            The total amount of payments that are successfully processed in the payment run.
          type: string
        totalValueOfReceivables:
          description: |
            The total amount of receivables associated with the payment run.

            The value of this field is the sum of the value of the `totalValueOfInvoices` field and that of the `totalValueOfDebitMemos` field.
          type: string
        totalValueOfUnappliedPayments:
          description: |
            **Note:** This field is only available if you have the Invoice Settlement feature enabled.

            The total amount of unapplied payments that are successfully processed in the payment run.
          type: integer
        totalValueOfUnprocessedDebitMemos:
          description: |
            **Note:** This field is only available if you have the Invoice Settlement feature enabled.

            The total amount of debit memos with remaining positive balances after the payment run is completed.
          type: string
        totalValueOfUnprocessedInvoices:
          description: |
            **Note:** This field is only available if you have the Invoice Settlement feature enabled.

            The total amount of invoices with remaining positive balances after the payment run is completed.
          type: string
        totalValueOfUnprocessedReceivables:
          description: |
            The total amount of receivables with remaining positive balances after the payment run is completed.
          type: string
      title: totalValues
      type: object
    GETPaymentRunType:
      properties:
        accountId:
          description: |
            The ID of the customer account associated with the payment run.
          type: string
        applyCreditBalance:
          description: |
            **Note:** This field is only available if you have the Credit Balance feature enabled and the Invoice Settlement feature disabled.

            Whether to apply credit balances in the payment run. This field is only available when you have Invoice Settlement feature disabled.
          type: boolean
        autoApplyCreditMemo:
          description: |
            **Note:** This field is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

            Whether to automatically apply a posted credit memo to one or more receivables in the payment run.
          type: boolean
        autoApplyUnappliedPayment:
          description: |
            **Note:** This field is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

            Whether to automatically apply unapplied payments to  one or more receivables in the payment run.
          type: boolean
        batch:
          description: |
            The alias name given to a batch.
          example: Batch1
          type: string
        billCycleDay:
          description: |
            The billing cycle day (BCD), the day of the month when a bill run generates invoices for the account. 
          example: 1
          type: string
        billingRunId:
          description: |
            The ID of the bill run.
          format: uuid
          type: string
        collectPayment:
          description: |
            Whether to process electronic payments during the execution of payment runs. 
          type: boolean
        completedOn:
          description: |
            The date and time when the payment run is completed, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-01 11:39:58.
          format: date-time
          type: string
        consolidatedPayment:
          description: |
            **Note:** The **Process Electronic Payment** permission also needs to be allowed for a Manage Payment Runs role to work. See [Payments Roles](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/A_Administrator_Settings/User_Roles/e_Payments_Roles) for more information. 

            Whether to process a single payment for all receivables that are due on an account.
          type: boolean
        createdById:
          description: |
            The ID of the Zuora user who created the payment run.
          type: string
        createdDate:
          description: |
            The date and time when the payment run was created, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-01 15:31:10.
          format: date-time
          type: string
        currency:
          description: |
            A currency defined in the web-based UI administrative settings.
          example: USD
          type: string
        executedOn:
          description: |
            The date and time when the payment run is executed, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-01 11:30:37.
          format: date-time
          type: string
        id:
          description: |
            The ID of the payment run.
          type: string
        number:
          description: |
            The identification number of the payment run.
          type: string
        paymentGatewayId:
          description: |
            The ID of the gateway instance that processes the payment.
          format: uuid
          type: string
        processPaymentWithClosedPM:
          description: |
            **Note:** The **Process Electronic Payment** permission also needs to be allowed for a Manage Payment Runs role to work. See [Payments Roles](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/A_Administrator_Settings/User_Roles/e_Payments_Roles) for more information. 

            Whether to process payments even if the default payment method is closed.
          type: boolean
        runDate:
          description: |
            The date and time when the scheduled payment run is to be executed for collecting payments.
          format: date-time
          type: string
        status:
          description: |
            The status of the created payment run.
          enum:
            - Pending
            - Processing
            - Completed
            - Error
            - Canceled
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
        targetDate:
          description: |
            The target date used to determine which receivables to be collected in the payment run. 
          format: date
          type: string
        updatedById:
          description: |
            The ID of the Zuora user who last updated the payment run.
          type: string
        updatedDate:
          description: |
            The date and time when the payment run was last updated, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-02 15:36:10.
          format: date-time
          type: string
      title: paymentRuns
      type: object
    GETPaymentType:
      allOf:
        - properties:
            accountID:
              description: |
                Customer account ID.
              type: string
            accountName:
              description: |
                Customer account name.
              type: string
            accountNumber:
              description: |
                Customer account number.
              type: string
            amount:
              description: |
                Payment amount.
              format: decimal
              type: string
            effectiveDate:
              description: |
                Effective payment date as _yyyy-mm-dd_.
              format: date
              type: string
            gatewayTransactionNumber:
              description: |
                Transaction ID from payment gateway.
              type: string
            id:
              description: |
                PaymentID.
              type: string
            paidInvoices:
              description: |
                Information about one or more invoices to which this payment was applied:
              items:
                $ref: "#/components/schemas/GETPaidInvoicesType"
              type: array
            paymentMethodID:
              description: |
                Payment method.
              type: string
            paymentNumber:
              description: |
                Unique payment number.
              type: string
            status:
              description: |
                Possible values are: `Draft`, `Processing`, `Processed`, `Error`, `Voided`, `Canceled`, `Posted.
              type: string
            type:
              description: |
                Possible values are: `External`, `Electronic`.
              type: string
          type: object
        - $ref: "#/components/schemas/PaymentObjectNSFields"
        - $ref: "#/components/schemas/PaymentObjectCustomFields"
      title: payments
    GETPaymentsType:
      properties:
        nextPage:
          description: |
            URL to retrieve the next page of the response if it exists; otherwise absent.
          format: URL
          type: string
        payments:
          description: |
            Information about one or more payments:
          items:
            $ref: "#/components/schemas/GETPaymentType"
          type: array
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GETProductDiscountApplyDetailsType:
      properties:
        appliedProductRatePlanChargeId:
          description: |
            The ID of the product rate plan charge that the discount product rate plan charge applies to.
          type: string
        appliedProductRatePlanId:
          description: |
            The ID of the product rate plan that the discount product rate plan charge applies to.
          type: string
      title: productDiscountApplyDetails
      type: object
    GETProductRatePlanChargePricingTierType:
      properties:
        endingUnit:
          description: |
            Decimal defining end of tier range.
          format: decimal
          type: string
        price:
          description: |
            The decimal value of the tiered charge model. If the charge model is not a tiered type then this price field will be null and the price field directly under the productRatePlanCharges applies.
          format: decimal
          type: string
        priceFormat:
          description: |
            Tier price format.

            Allowed values:
            - flat fee 
            - per unit
          type: string
        startingUnit:
          description: |
            Decimal defining start of tier range.
          format: decimal
          type: string
        tier:
          description: |
            Unique number of the tier.
          format: int64
          type: integer
      title: tiers
      type: object
    GETProductRatePlanChargePricingType:
      properties:
        currency:
          description: |
            Currency used by the charge model. For example: USD or EUR
          type: string
        discountAmount:
          description: |
            Value subtracted from price in currency specified. Used only when the charge model is DiscountFixedAmount.
          format: decimal
          type: string
        discountPercentage:
          description: |
            Percent discount applied to the price. Used only when the charge model is DiscountPercentage.
          format: decimal
          type: string
        includedUnits:
          description: |
            Specifies the number of units in the base set of units when the charge model is Overage.
          format: decimal
          type: string
        overagePrice:
          description: |
            Price per unit when base set of units is exceeded. Used only when charge model is Overage or Tiered with Overage.
          format: decimal
          type: string
        price:
          description: |
            The decimal value that applies when the charge model is not tiered
          format: decimal
          type: string
        tiers:
          description: |
            Container for one or many defined tier ranges with distinct pricing.  Applies when model is `Tiered`, `TieredWithOverage`, or `Volume`
          items:
            $ref: "#/components/schemas/GETProductRatePlanChargePricingTierType"
          type: array
      title: pricing
      type: object
    GETProductRatePlanChargeType:
      allOf:
        - properties:
            applyDiscountTo:
              description: |
                Specifies where (to what charge type) the discount will be applied. These field values are case-sensitive.

                Permissible values:
                - RECURRING
                - USAGE
                - ONETIMERECURRING
                - ONETIMEUSAGE
                - RECURRINGUSAGE
                - ONETIMERECURRINGUSAGE
              type: string
            billingDay:
              description: |
                The bill cycle day (BCD) for the charge. The BCD determines which day of the month or week the customer is billed. The BCD value in the account can override the BCD in this object.
              type: string
            billingPeriod:
              description: |
                The billing period for the charge. The start day of the billing period is also called the bill cycle day (BCD).

                Values:
                - Month
                - Quarter
                - Annual
                - Semi-Annual
                - Specific Months
                - Week
                - Specific_Weeks
              type: string
            billingPeriodAlignment:
              description: |
                Aligns charges within the same subscription if multiple charges begin on different dates.

                Possible values:
                - AlignToCharge
                - AlignToSubscriptionStart
                - AlignToTermStart
              type: string
            billingTiming:
              description: |
                The billing timing for the charge. You can choose to bill for charges in advance or in arrears.

                Values:
                - In Advance
                - In Arrears

                **Note:** This feature is in Limited Availability. If you wish to have access to the feature, submit a request at [Zuora Global Support](https://support.zuora.com). 
              type: string
            chargeModelConfigurations:
              description: This field is for Zuora Internal Use only. See the **pricing** field for the same information as this field.
              type: object
            defaultQuantity:
              description: |
                The default quantity of units.  This field is required if you use a per-unit charge model.
              format: decimal
              type: string
            description:
              description: |
                Usually a brief line item summary of the Rate Plan Charge.
              type: string
            discountClass:
              description: |
                The class that the discount belongs to. The discount class defines the order in which discount product rate plan charges are applied.

                For more information, see [Manage Discount Classes](https://knowledgecenter.zuora.com/BC_Subscription_Management/Product_Catalog/B_Charge_Models/Manage_Discount_Classes).
              type: string
            discountLevel:
              description: |
                The level of the discount. 

                Values:
                - RatePlan
                - Subscription
                - Account
              type: string
            endDateCondition:
              description: |
                Defines when the charge ends after the charge trigger date. If the subscription ends before the charge end date, the charge ends when the subscription ends. But if the subscription end date is subsequently changed through a Renewal, or Terms and Conditions amendment, the charge will end on the charge end date.

                Values:
                - Subscription_End
                - Fixed_Period
              type: string
            financeInformation:
              description: |
                Container for finance information of a rate plan charge.
              properties:
                adjustmentLiabilityAccountingCode:
                  description: |
                    The accounting code for adjustment liability. 

                    **Note**: This field is only available if you have the RevPro Integration feature enabled. 
                  type: string
                adjustmentLiabilityAccountingCodeType:
                  description: |
                    The type associated with the adjustment liability accounting code. 

                    **Note**: This field is only available if you have the RevPro Integration feature enabled.
                  type: string
                adjustmentRevenueAccountingCode:
                  description: |
                    The accounting code for adjustment revenue. 

                    **Note**: This field is only available if you have the RevPro Integration feature enabled. 
                  type: string
                adjustmentRevenueAccountingCodeType:
                  description: |
                    The type associated with the adjustment revenue accounting code. 

                    **Note**: This field is only available if you have the RevPro Integration feature enabled.
                  type: string
                contractAssetAccountingCode:
                  description: |
                    The accounting code for contract asset. 

                    **Note**: This field is only available if you have the RevPro Integration feature enabled. 
                  type: string
                contractAssetAccountingCodeType:
                  description: |
                    The type associated with the contract asset accounting code. 

                    **Note**: This field is only available if you have the RevPro Integration feature enabled.
                  type: string
                contractLiabilityAccountingCode:
                  description: |
                    The accounting code for contract liability. 

                    **Note**: This field is only available if you have the RevPro Integration feature enabled. 
                  type: string
                contractLiabilityAccountingCodeType:
                  description: |
                    The type associated with the contract liability accounting code. 

                    **Note**: This field is only available if you have the RevPro Integration feature enabled.
                  type: string
                contractRecognizedRevenueAccountingCode:
                  description: |
                    The accounting code for contract recognized revenue. 

                    **Note**: This field is only available if you have the RevPro Integration feature enabled. 
                  type: string
                contractRecognizedRevenueAccountingCodeType:
                  description: |
                    The type associated with the contract recognized revenue accounting code. 

                    **Note**: This field is only available if you have the RevPro Integration feature enabled.
                  type: string
                deferredRevenueAccountingCode:
                  description: |
                    The accounting code for deferred revenue, such as Monthly Recurring Liability. 
                  type: string
                deferredRevenueAccountingCodeType:
                  description: |
                    The type associated with the deferred revenue accounting code, such as Deferred Revenue. 
                  type: string
                recognizedRevenueAccountingCode:
                  description: |
                    The accounting code for recognized revenue, such as Monthly Recurring Charges or Overage Charges. 
                  type: string
                recognizedRevenueAccountingCodeType:
                  description: |
                    The type associated with the recognized revenue accounting code, such as Sales Revenue or Sales Discount. 
                  type: string
                unbilledReceivablesAccountingCode:
                  description: |
                    The accounting code for unbilled receivables. 

                    **Note**: This field is only available if you have the RevPro Integration feature enabled. 
                  type: string
                unbilledReceivablesAccountingCodeType:
                  description: |
                    The type associated with the unbilled receivables accounting code. 

                    **Note**: This field is only available if you have the RevPro Integration feature enabled.
                  type: string
              title: financeInformation
              type: object
            formula:
              description: |
                The pricing formula to calculate the actual rating amount for each usage record.

                This field is only available for the usage-based charges that use the Multi-Attribute Pricing charge model. The charge model is available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information.
              type: string
            id:
              description: |
                Unique product rate-plan charge ID.
              type: string
            includedUnits:
              description: |
                Specifies the number of units in the base set of units when the charge model is Overage.
              format: decimal
              type: string
            listPriceBase:
              description: |
                The list price base for the product rate plan charge.

                Values:
                - Month
                - Billing Period
                - Per_Week
              type: string
            maxQuantity:
              description: |
                Specifies the maximum number of units for this charge. Use this field and the `minQuantity` field to create a range of units allowed in a product rate plan charge.
              format: decimal
              type: string
            minQuantity:
              description: |
                Specifies the minimum number of units for this charge. Use this field and the `maxQuantity` field to create a range of units allowed in a product rate plan charge.
              format: decimal
              type: string
            model:
              description: |
                Charge model which determines how charges are calculated. Charge models must be individually activated in Zuora Billing administration. 

                Possible values are:
                - `FlatFee`
                - `PerUnit`
                - `Overage`
                - `Volume`
                - `Tiered`
                - `TieredWithOverage`
                - `DiscountFixedAmount`
                - `DiscountPercentage`
                - `MultiAttributePricing` (available only if you have the Multi-Attribute Pricing charge model enabled. The charge model is available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information.)
                - `PreratedPerUnit` (available only if you have the Pre-rated Per Unit Pricing charge model enabled. The charge model is available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information.)
                - `PreratedPricing` (available only if you have the Pre-rated Pricing charge model enabled. The charge model is available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information.)
                - `HighWatermarkVolumePricing` (available only if you have the High Water Mark Volume Pricing charge model enabled. The charge model is available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information.)
                - `HighWatermarkTieredPricing` (available only if you have the High Water Mark Tiered Pricing charge model enabled. The charge model is available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information.)

                The value of the `pricing` field contains details about these charge models and the value of `pricingSummary` field contains their associated pricing summary values.
              type: string
            name:
              description: |
                Name of the product rate-plan charge. (Not required to be unique.)
              type: string
            numberOfPeriods:
              description: |
                Value specifies the number of periods used in the smoothing model calculations Used when overage smoothing model is `RollingWindow` or `Rollover`.
              format: int64
              type: integer
            overageCalculationOption:
              description: |
                Value specifies when to calculate overage charges.

                Values:
                - EndOfSmoothingPeriod
                - PerBillingPeriod
              type: string
            overageUnusedUnitsCreditOption:
              description: |
                Determines whether to credit the customer with unused units of usage.

                Values:
                - NoCredit
                - CreditBySpecificRate
              type: string
            prepayPeriods:
              description: |
                The number of periods to which prepayment is set. 

                **Note:** This field is only available if you already have the prepayment feature enabled. The prepayment feature is deprecated and available only for backward compatibility. Zuora does not support enabling this feature anymore.
              format: int64
              type: integer
            priceChangeOption:
              description: |
                Applies an automatic price change when a termed subscription is renewed and the following applies:

                1. AutomatedPriceChange setting is on
                2. Charge type is not one-time
                3. Charge model is not discount fixed amount

                Values:
                - NoChange (default)
                - SpecificPercentageValue
                - UseLatestProductCatalogPricing
              type: string
            priceIncreasePercentage:
              description: |
                Specifies the percentage to increase or decrease the price of a termed subscription's renewal. Use this field if you set the `PriceChangeOption` value to `SpecificPercentageValue`.

                1. AutomatedPriceChange setting is on
                2. Charge type is not one-time
                3. Charge model is not discount fixed amount

                Values: a decimal between -100 and 100
              format: decimal
              type: string
            pricing:
              description: |
                One or more price charge models with attributes that further describe the model. 
                Some attributes show as null values when not applicable.
              items:
                $ref: "#/components/schemas/GETProductRatePlanChargePricingType"
              type: array
            pricingSummary:
              description: |
                A concise description of the charge model and pricing that is suitable to show to your customers. When the rate plan charge model is `Tiered` and multi-currency is enabled, this field includes an array of string of each currency, and each string of currency includes tier price description separated by comma.

                For the following charge models, the value of this field is an empty string:
                - Multi-Attribute Pricing
                - High Water Mark Tiered Pricing
                - High Water Mark Volume Pricing
                - Pre-Rated Per Unit Pricing
                - Pre-Rated Pricing

                The charge models are available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information.
              items:
                type: string
              type: array
            productDiscountApplyDetails:
              description: |
                Container for the application details about a discount product rate plan charge. 

                Only discount product rate plan charges have values in this field.
              items:
                $ref: "#/components/schemas/GETProductDiscountApplyDetailsType"
              type: array
            ratingGroup:
              description: |
                Specifies a rating group based on which usage records are rated.

                Possible values:

                - `ByBillingPeriod` (default): The rating is based on all the usages in a billing period.
                - `ByUsageStartDate`: The rating is based on all the usages on the same usage start date. 
                - `ByUsageRecord`: The rating is based on each usage record.
                - `ByUsageUpload`: The rating is based on all the  usages in a uploaded usage file (`.xls` or `.csv`).
                - `ByGroupId`: The rating is based on all the usages in a custom group.

                **Note:** 
                - The `ByBillingPeriod` value can be applied for all charge models. 
                - The `ByUsageStartDate`, `ByUsageRecord`, and `ByUsageUpload` values can only be applied for per unit, volume pricing, and tiered pricing charge models. 
                - The `ByGroupId` value is only available if you have the Active Rating feature enabled.
                - Use this field only for Usage charges. One-Time Charges and Recurring Charges return `NULL`.
              type: string
            revRecCode:
              description: |
                Associates this product rate plan charge with a specific revenue recognition code. The value is a valid revenue recognition code.
              maxLength: 70
              type: string
            revRecTriggerCondition:
              description: |
                Specifies when revenue recognition begins.
              enum:
                - ContractEffectiveDate
                - ServiceActivationDate
                - CustomerAcceptanceDate
              maxLength: 22
              type: string
            revenueRecognitionRuleName:
              description: |
                The name of the revenue recognition rule governing the revenue schedule.
              type: string
            smoothingModel:
              description: |
                Specifies the smoothing model for an overage smoothing charge model or an tiered with overage model, which is an advanced type of a usage model that avoids spikes in usage charges. If a customer's usage spikes in a single period, then an overage smoothing model eases overage charges by considering usage and multiple periods.

                One of the following values shows which smoothing model will be applied to the charge when `Overage` or `Tiered with Overage` is used:

                - `RollingWindow` considers a number of periods to smooth usage. The rolling window starts and increments forward based on billing frequency. When allowed usage is met, then period resets and a new window begins.
                - `Rollover` considers a fixed number of periods before calculating usage. The net balance at the end of a period is unused usage, which is carried over to the next period's balance.
              type: string
            specificBillingPeriod:
              description: |
                When the billing period is set to `Specific` Months then this positive integer reflects the number of months for billing period charges.
              format: int64
              type: integer
            taxCode:
              description: |
                Specifies the tax code for taxation rules; used by Zuora Tax.
              type: string
            taxMode:
              description: |
                Specifies how to define taxation for the charge; used by Zuora Tax. Possible values are: `TaxExclusive`, `TaxInclusive`.
              type: string
            taxable:
              description: |
                Specifies whether the charge is taxable; used by Zuora Tax. Possible values are:`true`, `false`.
              type: boolean
            triggerEvent:
              description: |
                Specifies when to start billing the customer for the charge.

                Values: one of the following:
                - `ContractEffective` is the date when the subscription's contract goes into effect and the charge is ready to be billed.
                - `ServiceActivation` is the date when the services or products for a subscription have been activated and the customers have access.
                - `CustomerAcceptance` is when the customer accepts the services or products for a subscription. 
                - `SpecificDate` is the date specified.
              type: string
            type:
              description: |
                The type of charge. Possible values are: `OneTime`, `Recurring`, `Usage`.
              type: string
            uom:
              description: |
                Describes the Units of Measure (uom) configured in **Settings > Billing** for the productRatePlanCharges.

                Values: `Each`, `License`, `Seat`, or `null`
              type: string
            upToPeriods:
              description: |
                Specifies the length of the period during which the charge is active. If this period ends before the subscription ends, the charge ends when this period ends.
                If the subscription end date is subsequently changed through a Renewal, or Terms and Conditions amendment, the charge end date will change accordingly up to the original period end.
              format: int64
              type: integer
            upToPeriodsType:
              description: |+
                The period type used to define when the charge ends.

                Values:
                - Billing_Periods
                - Days
                - Weeks
                - Months
                - Years
                  
              type: string
            usageRecordRatingOption:
              description: |
                Determines how Zuora processes usage records for per-unit usage charges. 
              type: string
            useDiscountSpecificAccountingCode:
              description: |
                Determines whether to define a new accounting code for the new discount charge.
                Values: `true`, `false`
              type: boolean
            useTenantDefaultForPriceChange:
              description: |
                Shows the tenant-level percentage uplift value for an automatic price change to a termed subscription's renewal. You set the tenant uplift value in the web-based UI: **Settings > Billing > Define Default Subscription Settings**.

                Values: `true`, `false`
              type: boolean
          type: object
        - $ref: "#/components/schemas/ProductRatePlanChargeObjectNSFields"
        - $ref: "#/components/schemas/ProductRatePlanChargeObjectCustomFields"
      title: productRatePlanCharges
    GETProductRatePlanType:
      allOf:
        - properties:
            description:
              description: |
                Rate plan description.
              type: string
            effectiveEndDate:
              description: |
                Final date the rate plan is active, as `yyyy-mm-dd`. After this date, the rate plan status is `Expired`.
              format: date
              type: string
            effectiveStartDate:
              description: |
                First date the rate plan is active (i.e., available to be subscribed to), as `yyyy-mm-dd`.  Before this date, the status is `NotStarted`.
              format: date
              type: string
            id:
              description: |
                Unique product rate-plan charge ID.
              type: string
            name:
              description: |
                Name of the product rate-plan charge. (Not required to be unique.)
              type: string
            productRatePlanCharges:
              description: |
                Field attributes describing the product rate plan charges:
              items:
                $ref: "#/components/schemas/GETProductRatePlanChargeType"
              type: array
            status:
              description: |
                Possible vales are: `Active`, `Expired`, `NotStarted`.
              type: string
          type: object
        - $ref: "#/components/schemas/ProductRatePlanObjectNSFields"
        - $ref: "#/components/schemas/ProductRatePlanObjectCustomFields"
      title: productRatePlans
    GETProductRatePlansResponse:
      properties:
        nextPage:
          description: |
            URL to retrieve the next page of the response if it exists; otherwise absent.
          format: URL
          type: string
        productRatePlans:
          description: |
            Container for one or more products.
          items:
            $ref: "#/components/schemas/GETProductRatePlanType"
          type: array
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GETProductType:
      allOf:
        - properties:
            category:
              description: |
                Category of the product. Used by Zuora Quotes Guided Product Selector.

                Possible values are:
                  - Base Products
                  - Add On Services
                  - Miscellaneous Products
              type: string
            description:
              description: |
                Optional product description.
              type: string
            effectiveEndDate:
              description: |
                The date when the product expires and cannot be subscribed to anymore, as `yyyy-mm-dd`.
              format: date
              type: string
            effectiveStartDate:
              description: |
                The date when the product becomes available and can be subscribed to, as `yyyy-mm-dd`.
              format: date
              type: string
            id:
              description: |
                Product ID.
              type: string
            name:
              description: |
                Product name, up to 100 characters.
              type: string
            productFeatures:
              description: |
                Container for one or more product features. Only available when the following settings are enabled:
                - The Entitlements feature in your tenant
                - The Enable Feature Specification in Product and Subscriptions setting in Settings > Billing
              items:
                $ref: "#/components/schemas/GetProductFeatureType"
              type: array
            productRatePlans:
              description: |
                URL to retrieve information about all product rate plans of a specific product. For example, `/v1/rateplan/40289f466463d683016463ef8b7301a0/productRatePlan`. If you want to view the product rate plan details, call [List all product rate plans of a product](https://www.zuora.com/developer/api-reference/#operation/GET_ProductRatePlans) with the returned URL.

                This field is in Zuora REST API version control. If you set the `zuora-version` request header to `230.0` or later, the value of this field is a URL. Zuora recommends that you use the latest behavior to retrieve product information.

                If you do not set the `zuora-version` request header or you set this header to `229.0` or earlier, the value of this field is an array of product rate plan details. For more information about the array, see the response body of [List all product rate plans of a product](https://www.zuora.com/developer/api-reference/#operation/GET_ProductRatePlans). **Note**: The array contains a maximum of 300 product rate plans. Additionally, across all product rate plans, at most 300 product rate plan charges are returned.
              format: URL
              type: string
            sku:
              description: |
                Unique product SKU, up to 50 characters.
              type: string
            tags:
              description: ""
              type: string
          type: object
        - $ref: "#/components/schemas/ProductObjectNSFields"
        - $ref: "#/components/schemas/ProductObjectCustomFields"
      title: products
    GETPublicEmailTemplateResponse:
      example:
        active: true
        bccEmailAddress: user@example.com
        ccEmailAddress: user@example.com
        ccEmailType: SpecificEmails
        createdBy: 6e569e1e05f040eda51a927b140c0ac3
        createdOn: 2017-04-18T07:36:19.798Z
        description: Email when an account is edited
        emailBody: Dear user,<p>the account <Account.Name> has been edited. <p>Example Co. Ltd.
        emailSubject: Account <Account.Number> has been edited
        encodingType: UTF8
        eventTypeName: AccountEdit
        fromEmailAddress: null
        fromEmailType: TenantEmail
        fromName: Example Co. Ltd.
        id: 6e569e1e05f040eda51a927b140c0ac2
        isHtml: true
        name: Account Edit Email
        replyToEmailAddress: null
        replyToEmailType: TenantEmail
        toEmailAddress: null
        toEmailType: BillToContact
        updatedBy: 6e569e1e05f040eda51a927b140c0ac4
        updatedOn: 2017-04-18T07:36:19.798Z
      properties:
        active:
          description: The status of the email template.
          type: boolean
        bccEmailAddress:
          description: Email BCC address.
          format: email
          type: string
        ccEmailAddress:
          description: Email CC address.
          type: string
        ccEmailType:
          default: SpecificEmails
          description: Email cc type.
          enum:
            - BillToContact
            - SoldToContact
            - SpecificEmails
            - TenantAdmin
            - BillToAndSoldToContacts
            - RunOwner
            - AllContacts
            - InvoiceOwnerBillToContact
            - InvoiceOwnerSoldToContact
            - InvoiceOwnerBillToAndSoldToContacts
            - InvoiceOwnerAllContacts
          type: string
        createdBy:
          description: The ID of the user who created the notification definition.
          format: uuid
          type: string
        createdOn:
          description: The time when the notification definition was created. Specified in the UTC timezone in the ISO860 format (YYYY-MM-DDThh:mm:ss.sTZD). E.g. 1997-07-16T19:20:30.45+00:00
          format: date-time
          type: string
        description:
          description: The description of the email template.
          maxLength: 255
          type: string
        emailBody:
          description: |-
            The email body. You can add merge fields in the email object using angle brackets. 
            User can also embed html tags if 'isHtml' is true.
          type: string
        emailSubject:
          description: The email subject. You can add merge fields in the email subject using angle brackets.
          type: string
        encodingType:
          description: The endcode type of the email body.
          enum:
            - UTF8
            - Shift_JIS
            - ISO_2022_JP
            - EUC_JP
            - X_SJIS_0213
          type: string
        eventTypeName:
          description: The name of the event type.
          minLength: 1
          type: string
        eventTypeNamespace:
          description: |
            The namespace of the `eventTypeName` field. 
          type: string
        fromEmailAddress:
          description: If formEmailType is SpecificEmail, this field is required.
          type: string
        fromEmailType:
          description: The from email type.
          enum:
            - TenantEmail
            - SpecificEmail
          type: string
        fromName:
          description: The name of email sender.
          maxLength: 50
          type: string
        id:
          description: The filter rule associated with this notification definition.
          format: uuid
          type: string
        isHtml:
          description: Specified whether the style of email body is HTML.
          type: boolean
        name:
          description: The name of the email template.
          maxLength: 255
          type: string
        replyToEmailAddress:
          description: If replyToEmailType is SpecificEmail, this field is required
          type: string
        replyToEmailType:
          description: The reply email type.
          enum:
            - TenantEmail
            - SpecificEmail
          type: string
        toEmailAddress:
          description: If toEmailType is SpecificEmail, this field is required.
          type: string
        toEmailType:
          description: Email receive type.
          enum:
            - BillToContact
            - SoldToContact
            - SpecificEmails
            - TenantAdmin
            - BillToAndSoldToContacts
            - RunOwner
            - AllContacts
            - InvoiceOwnerBillToContact
            - InvoiceOwnerSoldToContact
            - InvoiceOwnerBillToAndSoldToContacts
            - InvoiceOwnerAllContacts
          type: string
        updatedBy:
          description: The ID of the user who updated the notification definition.
          format: uuid
          type: string
        updatedOn:
          description: The time when the notification definition was updated. Specified in the UTC timezone in the ISO860 format (YYYY-MM-DDThh:mm:ss.sTZD). E.g. 1997-07-16T19:20:30.45+00:00
          format: date-time
          type: string
      type: object
    GETPublicNotificationDefinitionResponse:
      example:
        active: true
        callout:
          active: true
          calloutAuth:
            domain: example_domain
            password: example_password
            preemptive: true
            username: example_user
          calloutBaseurl: https://www.example.com/callout/AccountEdit
          calloutParams:
            AccountName: <Account.Name>
            AccountNumber: <Account.AccountNumber>
          calloutRetry: true
          description: Callout when an account is edited
          eventTypeName: AccountEdit
          httpMethod: POST
          id: 6e569e1e05f040eda51a927b140c0ac7
          name: Callout for Account Edited
          requiredAuth: true
        calloutActive: true
        communicationProfileId: 6e569e1e05f040eda51a927b140c0ac5
        createdBy: 6e569e1e05f040eda51a927b140c0ac3
        createdOn: 2017-04-18T07:36:19.798Z
        description: Notification sent out when an account is edited
        emailActive: true
        emailTemplateId: 6e569e1e05f040eda51a927b140c0ac6
        eventTypeName: AccountEdit
        filterRule:
          condition: Account.Balance >= _VIP_BALANCE_AMOUNT && Account.Status == _ACCOUNT_STATUS
          description: Filter rule to test if an account is a VIP account
          eventTypeName: null
          id: 6e569e1e05f040eda51a927b140c0ac8
          parameters:
            _ACCOUNT_STATUS:
              description: The status of the VIP Account
              displayName: VIP Account Status
              options:
                - Draft
                - Active
                - Canceled
              valueType: STRING
            _VIP_BALANCE_AMOUNT:
              description: The minimum account balance
              displayName: VIP Account Balance
              options: null
              valueType: BIG_DECIMAL
        filterRuleParams:
          _EDITED_FROM: UI
          _VIP_ACCOUNT_BALANCE: "100000"
        id: 6e569e1e05f040eda51a927b140c0ac2
        name: Account Edit Notification
        updatedBy: 6e569e1e05f040eda51a927b140c0ac4
        updatedOn: 2017-04-18T07:36:19.798Z
      properties:
        active:
          description: The status of the notification definition. The default value is true.
          type: boolean
        callout:
          properties:
            active:
              default: true
              description: The status of the callout. The default is true.
              type: boolean
            calloutAuth:
              $ref: "#/components/schemas/CalloutAuth"
            calloutBaseurl:
              description: The callout URL. It must start with 'https://'
              example: https://***
              format: url
              minLength: 10
              type: string
            calloutParams:
              $ref: "#/components/schemas/CalloutMergeFields"
            calloutRetry:
              default: true
              description: Specified whether to retry the callout when the callout fails. The default is true.
              type: boolean
            description:
              description: Description for the callout.
              maxLength: 255
              type: string
            eventTypeName:
              description: The name of the event type.
              minLength: 1
              type: string
            httpMethod:
              description: The HTTP method of the callout.
              enum:
                - GET
                - PUT
                - POST
                - DELETE
              example: POST
              type: string
            id:
              description: The ID of the callout. If `calloutActive` is true, a callout is required. The eventTypeName of the callout MUST be the same as the eventTypeName.
              format: uuid
              type: string
            name:
              description: The name of the created callout.
              maxLength: 255
              type: string
            requiredAuth:
              description: Specifies whether the callout requires auth.
              type: boolean
          type: object
        calloutActive:
          description: The status of the callout action. The default value is false.
          type: boolean
        communicationProfileId:
          description: The profile that the notification definition belongs to.
          format: uuid
          type: string
        createdBy:
          description: The ID of the user who created the notification definition.
          format: uuid
          type: string
        createdOn:
          description: The time when the notification definition was created. Specified in the UTC timezone in the ISO860 format (YYYY-MM-DDThh:mm:ss.sTZD). E.g. 1997-07-16T19:20:30.45+00:00
          format: date-time
          type: string
        description:
          description: Description of the notification definition
          maxLength: 255
          type: string
        emailActive:
          description: The status of the email action. The default value is false.
          type: boolean
        emailTemplateId:
          description: The ID of the email template. In the request, there should be at least one email template or callout.
          format: uuid
          type: string
        eventTypeName:
          description: The name of the event type.
          minLength: 1
          type: string
        eventTypeNamespace:
          description: |
            The namespace of the `eventTypeName` field. 
          type: string
        filterRule:
          description: ""
          properties:
            condition:
              description: |
                The filter rule conditions, written in [JEXL](http://commons.apache.org/proper/commons-jexl/).
                The rule might contain event context merge fields and data source merge fields. Data source merge fields must be from [the base object of the event or from the joined objects of the base object](https://knowledgecenter.zuora.com/DC_Developers/M_Export_ZOQL#Data_Sources_and_Objects). Notifications with invalid merge fields will fail to evaluate, thus will not be invoked. For example, to trigger an event when an invoice is posted with the amount over 1000, you would define the following condition on the `Invoice` object:

                ```changeType == 'UPDATE' && Invoice.Status == 'Posted' && Invoice.Status_old != 'Posted' && Invoice.Amount > 1000```

                There are conventions and keywords you need to be aware of. For example:

                * `changeType` is a keyword to specify what kind of change happened to the object. Allowed values are `INSERT`, `UPDATE` or `DELETE`.

                * `Invoice.Status` refers to field `Status` of the Zuora object `Invoice`.

                * A variable with the `_old` suffix means it’s a previous value of the corresponding object field. The "_old" fields are only available on the base objects.
              example: Account.Balance >= _VIP_BALANCE_AMOUNT && Account.Status == _ACCOUNT_STATUS
              type: string
            description:
              description: The description of the filter rule.
              maxLength: 255
              type: string
            eventTypeName:
              description: The value is `null`.
              minLength: 1
              type: string
            id:
              description: The ID of the filter rule. If not specified or null, the notification definition is always qualified to process events of "eventType".
              format: uuid
              type: string
            parameters:
              $ref: "#/components/schemas/FilterRuleParameterDefinitions"
          type: object
        filterRuleParams:
          $ref: "#/components/schemas/FilterRuleParameterValues"
        id:
          description: The filter rule associated with this notification definition.
          format: uuid
          type: string
        name:
          description: The name of the notification definition.
          maxLength: 255
          type: string
        updatedBy:
          description: The ID of the user who updated the notification definition.
          format: uuid
          type: string
        updatedOn:
          description: The time when the notification was updated. Specified in the UTC timezone in the ISO860 format (YYYY-MM-DDThh:mm:ss.sTZD). E.g. 1997-07-16T19:20:30.45+00:00
          format: date-time
          type: string
      type: object
    GETRSDetailForProductChargeType:
      allOf:
        - properties:
            accountId:
              description: |
                The ID of a customer account.
              type: string
            amount:
              description: |
                The revenue schedule amount, which is the sum of all revenue items. 

                This field cannot be null and must be formatted based on the currency, such as `JPY 30` or `USD 30.15`. Test out the currency to ensure you are using the proper formatting; otherwise, the response will fail and this error message is returned: `Allocation amount with wrong decimal places`.
              type: string
            createdOn:
              description: |
                The date and time when the record was created, in `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
              type: string
            currency:
              description: |
                The type of currency used.
              type: string
            linkedTransactionId:
              description: |
                The linked transaction ID for billing transactions. This field is used for all rules except for the custom unlimited or manual recognition rule models. If using the custom unlimited rule model, then the field value must be null. If the field is not null, then the referenceId field must be null.
              type: string
            linkedTransactionNumber:
              description: |
                The number for the linked invoice item, invoice item adjustment, or debit memo item transaction. This field is used for all rules except for the custom unlimited or manual recognition rule models. If using the custom unlimited or manual recognition rule models, then the field value is null.
              type: string
            linkedTransactionType:
              description: |
                The type of linked transaction for billing transactions, which can be invoice item, invoice item adjustment, or debit memo item. This field is used for all rules except for the custom unlimited or manual recognition rule models.
              type: string
            notes:
              description: |
                Additional information about this record.
              type: string
            number:
              description: |
                The revenue schedule number. The revenue schedule number is always prefixed with "RS", for example, "RS-00000001".
              type: string
            productChargeId:
              description: |
                The ID of a product rate plan charge.
              type: string
            recognitionRuleName:
              description: |
                The name of the recognition rule.
              type: string
            recognizedRevenue:
              description: |
                The revenue that was distributed in a closed accounting period.
              type: string
            referenceId:
              description: |
                The reference ID is used only in the custom unlimited rule to create a revenue schedule. In this scenario, the revenue schedule is not linked to a credit memo item.
              type: string
            revenueItems:
              description: |
                Revenue items are listed in ascending order by the accounting period start date.
              items:
                $ref: "#/components/schemas/GETRsRevenueItemType"
              type: array
            revenueScheduleDate:
              description: |
                The effective date of the revenue schedule. For example, the revenue schedule date for bookings-based revenue recognition is typically set to the order date or contract date.

                The date cannot be in a closed accounting period. The date must be in `yyyy-mm-dd` format.
              format: date
              type: string
            undistributedUnrecognizedRevenue:
              description: |
                The revenue in the open-ended accounting period.
              type: string
            unrecognizedRevenue:
              description: |
                The revenue distributed in all open accounting periods, which includes the open-ended accounting period.
              type: string
            updatedOn:
              description: |
                The date and time when the revenue automation start date was set, in `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/RevenueScheduleObjectCustomFields"
    GETRSDetailType:
      allOf:
        - properties:
            accountId:
              description: |
                An account ID.
              type: string
            amount:
              description: |
                The revenue schedule amount, which is the sum of all revenue items. This field cannot be null and must be formatted based on the currency, such as `JPY 30` or `USD 30.15`. Test out the currency to ensure you are using the proper formatting otherwise, the response will fail and this error message is returned: `Allocation amount with wrong decimal places.`
              format: decimal
              type: string
            createdOn:
              description: |
                The date and time when the record was created, in `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
              type: string
            currency:
              description: |
                The type of currency used.
              type: string
            linkedTransactionId:
              description: |
                The linked transaction ID for billing transactions. This field is used for all rules except for the custom unlimited or manual recognition rule models. If using the custom unlimited rule model, then the field value must be null. If the field is not null, then the referenceId field must be null.
              type: string
            linkedTransactionNumber:
              description: |
                The number for the linked invoice item or invoice item adjustment transaction. This field is used for all rules except for the custom unlimited or manual recognition rule models. If using the custom unlimited or manual recognition rule models, then the field value is null.
              type: string
            linkedTransactionType:
              description: |
                The type of linked transaction for billing transactions, which can be invoice item or invoice item adjustment. This field is used for all rules except for the custom unlimited or manual recognition rule models.
              type: string
            notes:
              description: |
                Additional information about this record.
              type: string
            number:
              description: |
                Revenue schedule number. The revenue schedule number is always prefixed with "RS", for example, "RS-00000001".
              type: string
            recognitionRuleName:
              description: |
                The name of the recognition rule.
              type: string
            recognizedRevenue:
              description: |
                The revenue that was distributed in a closed accounting period.
              format: decimal
              type: string
            referenceId:
              description: |
                Reference ID is used only in the custom unlimited rule to create a revenue schedule. In this scenario, the revenue schedule is not linked to an invoice item or invoice item adjustment.
              type: string
            revenueItems:
              description: |
                Revenue items are listed in ascending order by the accounting period start date.
              items:
                $ref: "#/components/schemas/GETRsRevenueItemType"
              type: array
            revenueScheduleDate:
              description: |
                The effective date of the revenue schedule. For example, the revenue schedule date for bookings-based revenue recognition is typically set to the order date or contract date.

                The date cannot be in a closed accounting period. The date must be in `yyyy-mm-dd` format.
              format: date
              type: string
            subscriptionChargeId:
              description: |
                The original subscription charge ID.
              type: string
            subscriptionId:
              description: |
                The original subscription ID.
              type: string
            success:
              description: |
                Returns `true` if the request was processed successfully.
              type: boolean
            undistributedUnrecognizedRevenue:
              description: |
                Revenue in the open-ended accounting period.
              format: decimal
              type: string
            unrecognizedRevenue:
              description: |
                Revenue distributed in all open accounting periods, which includes the open-ended accounting period.
              format: decimal
              type: string
            updatedOn:
              description: |
                The date and time when the revenue automation start date was set, in `yyyy-mm-dd hh:mm:ss` formst.
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/RevenueScheduleObjectCustomFields"
    GETRSDetailWithoutSuccessType:
      allOf:
        - properties:
            accountId:
              description: |
                An account ID.
              type: string
            amount:
              description: |
                The revenue schedule amount, which is the sum of all revenue items. This field cannot be null and must be formatted based on the currency, such as `JPY 30` or `USD 30.15`. Test out the currency to ensure you are using the proper formatting otherwise, the response will fail and this error message is returned: `Allocation amount with wrong decimal places.`
              format: decimal
              type: string
            createdOn:
              description: |
                The date and time when the record was created, in `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
              type: string
            currency:
              description: |
                The type of currency used.
              type: string
            linkedTransactionId:
              description: |
                The linked transaction ID for billing transactions. This field is used for all rules except for the custom unlimited or manual recognition rule models. If using the custom unlimited rule model, then the field value must be null. If the field is not null, then the referenceId field must be null.
              type: string
            linkedTransactionNumber:
              description: |
                The number for the linked invoice item or invoice item adjustment transaction. This field is used for all rules except for the custom unlimited or manual recognition rule models. If using the custom unlimited or manual recognition rule models, then the field value is null.
              type: string
            linkedTransactionType:
              description: |
                The type of linked transaction for billing transactions, which can be invoice item or invoice item adjustment. This field is used for all rules except for the custom unlimited or manual recognition rule models.
              type: string
            notes:
              description: |
                Additional information about this record.
              type: string
            number:
              description: |
                Revenue schedule number. The revenue schedule number is always prefixed with "RS", for example, "RS-00000001".
              type: string
            recognitionRuleName:
              description: |
                The name of the recognition rule.
              type: string
            recognizedRevenue:
              description: |
                The revenue that was distributed in a closed accounting period.
              format: decimal
              type: string
            referenceId:
              description: |
                Reference ID is used only in the custom unlimited rule to create a revenue schedule. In this scenario, the revenue schedule is not linked to an invoice item or invoice item adjustment.
              type: string
            revenueItems:
              description: |
                Revenue items are listed in ascending order by the accounting period start date.
              items:
                $ref: "#/components/schemas/GETRsRevenueItemType"
              type: array
            revenueScheduleDate:
              description: |
                The effective date of the revenue schedule. For example, the revenue schedule date for bookings-based revenue recognition is typically set to the order date or contract date.

                The date cannot be in a closed accounting period. The date must be in the `yyyy-mm-dd` format.
              format: date
              type: string
            subscriptionChargeId:
              description: |
                The original subscription charge ID.
              type: string
            subscriptionId:
              description: |
                The original subscription ID.
              type: string
            undistributedUnrecognizedRevenue:
              description: |
                Revenue in the open-ended accounting period.
              format: decimal
              type: string
            unrecognizedRevenue:
              description: |
                Revenue distributed in all open accounting periods, which includes the open-ended accounting period.
              format: decimal
              type: string
            updatedOn:
              description: |
                The date when the revenue automation start date was set, in `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/RevenueScheduleObjectCustomFields"
      title: revenueSchedules
    GETRSDetailsByChargeType:
      properties:
        nextPage:
          description: |
            URL to retrieve the next page of the response if it exists; otherwise absent.
          format: URL
          type: string
        revenueSchedules:
          description: |
            Represents how revenue will be recognized over time.

            This contains the details of a revenue schedule. If you do not specify the `pageSize` variable, the default number of revenue schedules returned per invocation is 8, and if there are more than 8 revenue schedules to be returned, the `nextPage` field will provide a hyperlink to view the next page(s) of revenue events. The order of revenue schedules is descending by the `updatedOn` field.
          items:
            $ref: "#/components/schemas/GETRSDetailWithoutSuccessType"
          type: array
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GETRSDetailsByProductChargeType:
      example: ""
      properties:
        nextPage:
          description: |
            URL to retrieve the next page of the response if it exists; otherwise absent.
          format: URL
          type: string
        revenueSchedules:
          description: |
            How revenue will be recognized over time.
          items:
            $ref: "#/components/schemas/GETRSDetailForProductChargeType"
          type: array
        success:
          description: Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GETRampByRampNumberResponseType:
      allOf:
        - properties:
            ramp:
              $ref: "#/components/schemas/RampResponse"
          type: object
        - $ref: "#/components/schemas/CommonResponseType"
    GETRampMetricsByOrderNumberResponseType:
      allOf:
        - properties:
            rampMetrics:
              items:
                $ref: "#/components/schemas/OrderRampMetrics"
              type: array
          type: object
        - $ref: "#/components/schemas/CommonResponseType"
    GETRampMetricsByRampNumberResponseType:
      allOf:
        - properties:
            rampMetrics:
              $ref: "#/components/schemas/RampMetrics"
          type: object
        - $ref: "#/components/schemas/CommonResponseType"
    GETRampMetricsBySubscriptionKeyResponseType:
      allOf:
        - properties:
            rampMetrics:
              $ref: "#/components/schemas/RampMetrics"
          type: object
        - $ref: "#/components/schemas/CommonResponseType"
    GETRampsBySubscriptionKeyResponseType:
      allOf:
        - properties:
            ramps:
              items:
                $ref: "#/components/schemas/RampResponse"
              type: array
          type: object
        - $ref: "#/components/schemas/CommonResponseType"
    GETRefundCollectionType:
      properties:
        nextPage:
          description: |
            URL to retrieve the next page of the response if it exists; otherwise absent.
          format: URL
          type: string
        refunds:
          description: |
            Container for refunds.
          items:
            $ref: "#/components/schemas/GETRefundTypewithSuccess"
          type: array
        success:
          description: Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GETRefundCreditMemoType:
      allOf:
        - properties:
            accountId:
              description: |
                The ID of the account associated with this refund. Zuora associates the refund automatically with the account from the associated payment.
              type: string
            amount:
              description: |
                The total amount of the refund.
              format: double
              type: number
            cancelledOn:
              description: |
                The date and time when the refund was cancelled, in `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
              type: string
            comment:
              description: |
                Comments about the refund.
              type: string
            createdById:
              description: |
                The ID of the Zuora user who created the refund.
              type: string
            createdDate:
              description: |
                The date and time when the refund was created, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-06 15:31:10.
              format: date-time
              type: string
            creditMemoId:
              description: |
                The ID of the credit memo that is refunded.
              type: string
            financeInformation:
              description: |
                Container for the finance information related to the refund.
              properties:
                bankAccountAccountingCode:
                  description: |
                    The accounting code that maps to a bank account in your accounting system.
                  type: string
                bankAccountAccountingCodeType:
                  description: |
                    The type of the accounting code that maps to a bank account in your accounting system.
                  type: string
                transferredToAccounting:
                  description: |
                    Whether the refund was transferred to an external accounting system. Use this field for integration with accounting systems, such as NetSuite. 
                  enum:
                    - Processing
                    - Yes
                    - No
                    - Error
                    - Ignore
                  type: string
                unappliedPaymentAccountingCode:
                  description: |
                    The accounting code for the unapplied payment.
                  type: string
                unappliedPaymentAccountingCodeType:
                  description: |
                    The type of the accounting code for the unapplied payment.
                  type: string
              type: object
            gatewayId:
              description: |
                The ID of the gateway instance that processes the refund.
              type: string
            gatewayResponse:
              description: |
                The message returned from the payment gateway for the refund. This message is gateway-dependent.
              type: string
            gatewayResponseCode:
              description: |
                The response code returned from the payment gateway for the refund. This code is gateway-dependent.
              type: string
            gatewayState:
              description: |
                The status of the refund in the gateway.
              enum:
                - MarkedForSubmission
                - Submitted
                - Settled
                - NotSubmitted
                - FailedToSettle
              type: string
            id:
              description: |
                The ID of the created refund.
              type: string
            markedForSubmissionOn:
              description: |
                The date and time when a refund was marked and waiting for batch submission to the payment process, in `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
              type: string
            methodType:
              description: |
                How an external refund was issued to a customer.
              enum:
                - ACH
                - Cash
                - Check
                - CreditCard
                - PayPal
                - WireTransfer
                - DebitCard
                - CreditCardReferenceTransaction
                - BankTransfer
                - Other
              type: string
            number:
              description: |
                The unique identification number of the refund.
              type: string
            paymentId:
              description: |
                The ID of the payment associated with the refund.
              type: string
            paymentMethodId:
              description: |
                The unique ID of the payment method that the customer used to make the refund.
              type: string
            paymentMethodSnapshotId:
              description: |
                The unique ID of the payment method snapshot, which is a copy of the particular payment method used in a transaction.
              type: string
            reasonCode:
              description: |
                A code identifying the reason for the transaction.
              type: string
            referenceId:
              description: |
                The transaction ID returned by the payment gateway for an electronic refund. Use this field to reconcile refunds between your gateway and Zuora Payments.
              type: string
            refundDate:
              description: |
                The date when the refund takes effect, in yyyy-mm-dd format.
              format: date
              type: string
            refundTransactionTime:
              description: |
                The date and time when the refund was issued, in `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
              type: string
            secondRefundReferenceId:
              description: |
                The transaction ID returned by the payment gateway if there is an additional transaction for the refund. Use this field to reconcile payments between your gateway and Zuora Payments.
              type: string
            settledOn:
              description: |
                The date and time when the refund was settled in the payment processor, in `yyyy-mm-dd hh:mm:ss` format. This field is used by the Spectrum gateway only and not applicable to other gateways.
              format: date-time
              type: string
            softDescriptor:
              description: |
                A payment gateway-specific field that maps to Zuora for the gateways, Orbital, Vantiv and Verifi.
              type: string
            softDescriptorPhone:
              description: |
                A payment gateway-specific field that maps to Zuora for the gateways, Orbital, Vantiv and Verifi.
              type: string
            status:
              description: |
                The status of the refund.
              enum:
                - Processed
                - Canceled
                - Error
                - Processing
              type: string
            submittedOn:
              description: |
                The date and time when the refund was submitted, in `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
              type: string
            success:
              description: Returns `true` if the request was processed successfully.
              type: boolean
            type:
              description: |
                The type of the refund.
              enum:
                - External
                - Electronic
              type: string
            updatedById:
              description: |
                The ID of the Zuora user who last updated the refund.
              type: string
            updatedDate:
              description: |
                The date and time when the refund was last updated, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-07 15:36:10.
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/RefundObjectNSFields"
        - $ref: "#/components/schemas/RefundObjectCustomFields"
    GETRefundItemPartCollectionType:
      properties:
        itemParts:
          description: |
            Container for refund part items.
          items:
            $ref: "#/components/schemas/GETRefundItemPartTypewithSuccess"
          type: array
        nextPage:
          description: |
            URL to retrieve the next page of the response if it exists; otherwise absent.
          format: URL
          type: string
        success:
          description: Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GETRefundItemPartType:
      properties:
        amount:
          description: |
            The amount of the refund part item.
          format: double
          type: number
        createdById:
          description: |
            The ID of the Zuora user who created the refund part item.
          type: string
        createdDate:
          description: |
            The date and time when the refund part item was created, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-01 15:31:10.
          format: date-time
          type: string
        creditMemoItemId:
          description: |
            The ID of the credit memo item associated with the refund part item.
          type: string
        creditTaxItemId:
          description: |
            The ID of the credit memo taxation item associated with the refund part item.
          type: string
        id:
          description: |
            The ID of the refund part item.
          type: string
        success:
          description: Returns `true` if the request was processed successfully.
          type: boolean
        updatedById:
          description: |
            The ID of the Zuora user who last updated the refund part item.
          type: string
        updatedDate:
          description: |
            The date and time when the refund part item was last updated, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-02 15:36:10.
          format: date-time
          type: string
      type: object
    GETRefundItemPartTypewithSuccess:
      properties:
        amount:
          description: |
            The amount of the refund part item.
          format: double
          type: number
        createdById:
          description: |
            The ID of the Zuora user who created the refund part item.
          type: string
        createdDate:
          description: |
            The date and time when the refund part item was created, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-01 15:31:10.
          format: date-time
          type: string
        creditMemoItemId:
          description: |
            The ID of the credit memo item associated with the refund part item.
          type: string
        creditTaxItemId:
          description: |
            The ID of the credit memo taxation item associated with the refund part item.
          type: string
        id:
          description: |
            The ID of the refund part item.
          type: string
        updatedById:
          description: |
            The ID of the Zuora user who last updated the refund part item.
          type: string
        updatedDate:
          description: |
            The date and time when the refund part item was last updated, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-02 15:36:10.
          format: date-time
          type: string
      title: itemParts
      type: object
    GETRefundPartCollectionType:
      properties:
        parts:
          description: |
            Container for refund parts.
          items:
            $ref: "#/components/schemas/RefundPartResponseTypewithSuccess"
          type: array
        success:
          description: Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GETRefundPaymentType:
      allOf:
        - properties:
            accountId:
              description: |
                The ID of the account associated with this refund. Zuora associates the refund automatically with the account from the associated payment.
              type: string
            amount:
              description: |
                The total amount of the refund.
              format: double
              type: number
            cancelledOn:
              description: |
                The date and time when the refund was cancelled, in `yyyy-mm-dd hh:mm:ss` format. 
              format: date-time
              type: string
            comment:
              description: |
                Comments about the refund.
              type: string
            createdById:
              description: |
                The ID of the Zuora user who created the refund.
              type: string
            createdDate:
              description: |
                The date and time when the refund was created, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-01 15:31:10. 
              format: date-time
              type: string
            creditMemoId:
              description: |
                The ID of the credit memo associated with the refund.
              type: string
            financeInformation:
              description: |
                Container for the finance information related to the refund.
              properties:
                bankAccountAccountingCode:
                  description: |
                    The accounting code that maps to a bank account in your accounting system.
                  type: string
                bankAccountAccountingCodeType:
                  description: |
                    The type of the accounting code that maps to a bank account in your accounting system.
                  type: string
                transferredToAccounting:
                  description: |
                    Whether the refund was transferred to an external accounting system. Use this field for integration with accounting systems, such as NetSuite. 
                  enum:
                    - Processing
                    - Yes
                    - No
                    - Error
                    - Ignore
                  type: string
                unappliedPaymentAccountingCode:
                  description: |
                    The accounting code for the unapplied payment.
                  type: string
                unappliedPaymentAccountingCodeType:
                  description: |
                    The type of the accounting code for the unapplied payment.
                  type: string
              type: object
            gatewayId:
              description: |
                The ID of the gateway instance that processes the refund.
              type: string
            gatewayReconciliationReason:
              description: |
                The reason of gateway reconciliation.
              type: string
            gatewayReconciliationStatus:
              description: |
                The status of gateway reconciliation.
              type: string
            gatewayResponse:
              description: |
                The message returned from the payment gateway for the refund. This message is gateway-dependent.
              type: string
            gatewayResponseCode:
              description: |
                The code returned from the payment gateway for the refund. This code is gateway-dependent.
              type: string
            gatewayState:
              description: |
                The status of the refund in the gateway.
              enum:
                - MarkedForSubmission
                - Submitted
                - Settled
                - NotSubmitted
                - FailedToSettle
              type: string
            id:
              description: |
                The ID of the created refund.
              type: string
            markedForSubmissionOn:
              description: |
                The date and time when a refund was marked and waiting for batch submission to the payment process, in `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
              type: string
            methodType:
              description: |
                How an external refund was issued to a customer.
              enum:
                - ACH
                - Cash
                - Check
                - CreditCard
                - PayPal
                - WireTransfer
                - DebitCard
                - CreditCardReferenceTransaction
                - BankTransfer
                - Other
              type: string
            number:
              description: |
                The unique identification number of the refund.
              type: string
            paymentId:
              description: |
                The ID of the payment that is refunded.
              type: string
            paymentMethodId:
              description: |
                The unique ID of the payment method that the customer used to make the refund. 
              type: string
            paymentMethodSnapshotId:
              description: |
                The unique ID of the payment method snapshot, which is a copy of the particular payment method used in a transaction.
              type: string
            payoutId:
              description: |
                The payout ID of the refund from the gateway side.
              type: string
            reasonCode:
              description: |
                A code identifying the reason for the transaction. 
              type: string
            referenceId:
              description: |
                The transaction ID returned by the payment gateway for an electronic refund. Use this field to reconcile refunds between your gateway and Zuora Payments.
              type: string
            refundDate:
              description: |
                The date when the refund takes effect, in `yyyy-mm-dd` format.
              format: date
              type: string
            refundTransactionTime:
              description: |
                The date and time when the refund was issued, in `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
              type: string
            secondRefundReferenceId:
              description: |
                The transaction ID returned by the payment gateway if there is an additional transaction for the refund. Use this field to reconcile payments between your gateway and Zuora Payments.
              type: string
            settledOn:
              description: |
                The date and time when the refund was settled in the payment processor, in `yyyy-mm-dd hh:mm:ss` format. This field is used by the Spectrum gateway only and not applicable to other gateways.
              format: date-time
              type: string
            softDescriptor:
              description: |
                A payment gateway-specific field that maps to Zuora for the gateways, Orbital, Vantiv and Verifi.
              type: string
            softDescriptorPhone:
              description: |
                A payment gateway-specific field that maps to Zuora for the gateways, Orbital, Vantiv and Verifi.
              type: string
            status:
              description: |
                The status of the refund.
              enum:
                - Processed
                - Canceled
                - Error
                - Processing
              type: string
            submittedOn:
              description: |
                The date and time when the refund was submitted, in `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
              type: string
            success:
              description: Returns `true` if the request was processed successfully.
              type: boolean
            type:
              description: |
                The type of the refund.
              enum:
                - External
                - Electronic
              type: string
            updatedById:
              description: |
                The ID of the the Zuora user who last updated the refund.
              type: string
            updatedDate:
              description: |
                The date and time when the refund was last updated, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-02 15:36:10.
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/RefundObjectNSFields"
        - $ref: "#/components/schemas/RefundObjectCustomFields"
    GETRefundType:
      allOf:
        - properties:
            accountId:
              description: |
                The ID of the account associated with this refund. Zuora associates the refund automatically with the account from the associated payment or credit memo.
              type: string
            amount:
              description: |
                The total amount of the refund.
              format: double
              type: number
            cancelledOn:
              description: |
                The date and time when the refund was cancelled, in `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
              type: string
            comment:
              description: |
                Comments about the refund.
              type: string
            createdById:
              description: |
                The ID of the Zuora user who created the refund.
              type: string
            createdDate:
              description: |
                The date and time when the refund was created, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-01 15:31:10.
              format: date-time
              type: string
            creditMemoId:
              description: |
                The ID of the credit memo that is refunded.
              type: string
            financeInformation:
              description: |
                Container for the finance information related to the refund.
              properties:
                bankAccountAccountingCode:
                  description: |
                    The accounting code that maps to a bank account in your accounting system.
                  type: string
                bankAccountAccountingCodeType:
                  description: |
                    The type of the accounting code that maps to a bank account in your accounting system.
                  type: string
                transferredToAccounting:
                  description: |
                    Whether the refund was transferred to an external accounting system. Use this field for integration with accounting systems, such as NetSuite. 
                  enum:
                    - Processing
                    - Yes
                    - No
                    - Error
                    - Ignore
                  type: string
                unappliedPaymentAccountingCode:
                  description: |
                    The accounting code for the unapplied payment.
                  type: string
                unappliedPaymentAccountingCodeType:
                  description: |
                    The type of the accounting code for the unapplied payment.
                  type: string
              type: object
            gatewayId:
              description: |
                The ID of the gateway instance that processes the refund.
              type: string
            gatewayReconciliationReason:
              description: |
                The reason of gateway reconciliation.
              type: string
            gatewayReconciliationStatus:
              description: |
                The status of gateway reconciliation.
              type: string
            gatewayResponse:
              description: |
                The message returned from the payment gateway for the refund. This message is gateway-dependent.
              type: string
            gatewayResponseCode:
              description: |
                The code returned from the payment gateway for the refund. This code is gateway-dependent.
              type: string
            gatewayState:
              description: |
                The status of the refund in the gateway.
              enum:
                - MarkedForSubmission
                - Submitted
                - Settled
                - NotSubmitted
                - FailedToSettle
              type: string
            id:
              description: |
                The ID of the refund.
              type: string
            markedForSubmissionOn:
              description: |
                The date and time when a refund was marked and waiting for batch submission to the payment process, in `yyyy-mm-dd hh:mm:ss` format. 
              format: date-time
              type: string
            methodType:
              description: |
                How an external refund was issued to a customer. 
              enum:
                - ACH
                - Cash
                - Check
                - CreditCard
                - PayPal
                - WireTransfer
                - DebitCard
                - CreditCardReferenceTransaction
                - BankTransfer
                - Other
              type: string
            number:
              description: |
                The unique identification number of the refund.
              type: string
            paymentId:
              description: |
                The ID of the payment that is refunded.
              type: string
            paymentMethodId:
              description: |
                The unique ID of the payment method that the customer used to make the refund.
              type: string
            paymentMethodSnapshotId:
              description: |
                The unique ID of the payment method snapshot, which is a copy of the particular payment method used in a transaction.
              type: string
            payoutId:
              description: |
                The payout ID of the refund from the gateway side.
              type: string
            reasonCode:
              description: |
                A code identifying the reason for the transaction.
              type: string
            referenceId:
              description: |
                The transaction ID returned by the payment gateway for an electronic refund. Use this field to reconcile refunds between your gateway and Zuora Payments.
              type: string
            refundDate:
              description: |
                The date when the refund takes effect, in `yyyy-mm-dd` format. For example, 2017-03-01.
              format: date
              type: string
            refundTransactionTime:
              description: |
                The date and time when the refund was issued, in `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
              type: string
            secondRefundReferenceId:
              description: |
                The transaction ID returned by the payment gateway if there is an additional transaction for the refund. Use this field to reconcile payments between your gateway and Zuora Payments.
              type: string
            settledOn:
              description: |
                The date and time when the refund was settled in the payment processor, in `yyyy-mm-dd hh:mm:ss` format. This field is used by the Spectrum gateway only and not applicable to other gateways.
              format: date-time
              type: string
            softDescriptor:
              description: |
                A payment gateway-specific field that maps Zuora to other gateways.
              type: string
            softDescriptorPhone:
              description: |
                A payment gateway-specific field that maps Zuora to other gateways.
              type: string
            status:
              description: |
                The status of the refund. 
              enum:
                - Processed
                - Canceled
                - Error
                - Processing
              type: string
            submittedOn:
              description: |
                The date and time when the refund was submitted, in `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
              type: string
            success:
              description: Returns `true` if the request was processed successfully.
              type: boolean
            type:
              description: |
                The type of the refund. 
              enum:
                - External
                - Electronic
              type: string
            updatedById:
              description: |
                The ID of the Zuora user who last updated the refund.
              type: string
            updatedDate:
              description: |
                The date and time when the refund was last updated, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-02 15:36:10.
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/RefundObjectNSFields"
        - $ref: "#/components/schemas/RefundObjectCustomFields"
    GETRefundTypewithSuccess:
      allOf:
        - properties:
            accountId:
              description: |
                The ID of the account associated with this refund. Zuora associates the refund automatically with the account from the associated payment or credit memo.
              type: string
            amount:
              description: |
                The total amount of the refund.
              format: double
              type: number
            cancelledOn:
              description: |
                The date and time when the refund was cancelled, in `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
              type: string
            comment:
              description: |
                Comments about the refund.
              type: string
            createdById:
              description: |
                The ID of the Zuora user who created the refund.
              type: string
            createdDate:
              description: |
                The date and time when the refund was created, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-01 15:31:10.
              format: date-time
              type: string
            creditMemoId:
              description: |
                The ID of the credit memo that is refunded.
              type: string
            financeInformation:
              description: |
                Container for the finance information related to the refund.
              properties:
                bankAccountAccountingCode:
                  description: |
                    The accounting code that maps to a bank account in your accounting system.
                  type: string
                bankAccountAccountingCodeType:
                  description: |
                    The type of the accounting code that maps to a bank account in your accounting system.
                  type: string
                transferredToAccounting:
                  description: |
                    Whether the refund was transferred to an external accounting system. Use this field for integration with accounting systems, such as NetSuite. 
                  enum:
                    - Processing
                    - Yes
                    - No
                    - Error
                    - Ignore
                  type: string
                unappliedPaymentAccountingCode:
                  description: |
                    The accounting code for the unapplied payment.
                  type: string
                unappliedPaymentAccountingCodeType:
                  description: |
                    The type of the accounting code for the unapplied payment.
                  type: string
              type: object
            gatewayId:
              description: |
                The ID of the gateway instance that processes the refund.
              type: string
            gatewayReconciliationReason:
              description: |
                The reason of gateway reconciliation.
              type: string
            gatewayReconciliationStatus:
              description: |
                The status of gateway reconciliation.
              type: string
            gatewayResponse:
              description: |
                The message returned from the payment gateway for the refund. This message is gateway-dependent.
              type: string
            gatewayResponseCode:
              description: |
                The code returned from the payment gateway for the refund. This code is gateway-dependent.
              type: string
            gatewayState:
              description: |
                The status of the refund in the gateway. 
              enum:
                - MarkedForSubmission
                - Submitted
                - Settled
                - NotSubmitted
                - FailedToSettle
              type: string
            id:
              description: |
                The ID of the refund.
              type: string
            markedForSubmissionOn:
              description: |
                The date and time when a refund was marked and waiting for batch submission to the payment process, in `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
              type: string
            methodType:
              description: |
                How an external refund was issued to a customer. 
              enum:
                - ACH
                - Cash
                - Check
                - CreditCard
                - PayPal
                - WireTransfer
                - DebitCard
                - CreditCardReferenceTransaction
                - BankTransfer
                - Other
              type: string
            number:
              description: |
                The unique identification number of the refund.
              type: string
            paymentId:
              description: |
                The ID of the payment that is refunded.
              type: string
            paymentMethodId:
              description: |
                The unique ID of the payment method that the customer used to make the refund.
              type: string
            paymentMethodSnapshotId:
              description: |
                The unique ID of the payment method snapshot, which is a copy of the particular payment method used in a transaction.
              type: string
            payoutId:
              description: |
                The payout ID of the refund from the gateway side.
              type: string
            reasonCode:
              description: |
                A code identifying the reason for the transaction.
              type: string
            referenceId:
              description: |
                The transaction ID returned by the payment gateway for an electronic refund. Use this field to reconcile refunds between your gateway and Zuora Payments.
              type: string
            refundDate:
              description: |
                The date when the refund takes effect, in `yyyy-mm-dd` format. For example, 2017-03-01.
              format: date
              type: string
            refundTransactionTime:
              description: |
                The date and time when the refund was issued, in `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
              type: string
            secondRefundReferenceId:
              description: |
                The transaction ID returned by the payment gateway if there is an additional transaction for the refund. Use this field to reconcile payments between your gateway and Zuora Payments.
              type: string
            settledOn:
              description: |
                The date and time when the refund was settled in the payment processor, in `yyyy-mm-dd hh:mm:ss` format. This field is used by the Spectrum gateway only and not applicable to other gateways.
              format: date-time
              type: string
            softDescriptor:
              description: |
                A payment gateway-specific field that maps Zuora to other gateways.
              type: string
            softDescriptorPhone:
              description: |
                A payment gateway-specific field that maps Zuora to other gateways.
              type: string
            status:
              description: |
                The status of the refund. 
              enum:
                - Processed
                - Canceled
                - Error
                - Processing
              type: string
            submittedOn:
              description: |
                The date and time when the refund was submitted, in `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
              type: string
            type:
              description: |
                The type of the refund. 
              enum:
                - External
                - Electronic
              type: string
            updatedById:
              description: |
                The ID of the Zuora user who last updated the refund.
              type: string
            updatedDate:
              description: |
                The date and time when the refund was last updated, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-02 15:36:10.
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/RefundObjectNSFields"
        - $ref: "#/components/schemas/RefundObjectCustomFields"
      title: refunds
    GETRevenueEventDetailType:
      allOf:
        - properties:
            accountId:
              description: |
                An account ID.
              type: string
            createdOn:
              description: |
                The date when the record was created in YYYY-MM-DD HH:MM:SS format.
              format: date-time
              type: string
            currency:
              description: |
                The type of currency used.
              type: string
            eventType:
              description: |
                Label of the revenue event type. Revenue event type labels can be duplicated. You can configure your revenue event type labels by navigating to **Settings > Finance > Configure Revenue Event Types** in the Zuora UI.

                Note that `Credit Memo Posted` and `Debit Memo Posted` are only available if you enable the Invoice Settlement feature.
              enum:
                - Invoice Posted
                - Invoice Item Adjustment Created
                - Invoice Canceled
                - Invoice Item Adjustment Canceled
                - Revenue Distributed
                - Credit Memo Posted
                - Debit Memo Posted
              type: string
            notes:
              description: |
                Additional information about this record.
              type: string
            number:
              description: |
                The revenue event number created when a revenue event occurs.
              type: string
            recognitionEnd:
              description: |
                The end date of a recognition period in YYYY-MM-DD format. 

                The maximum difference of the recognitionStart and recognitionEnd date fields is equal to 250 multiplied by the length of an accounting period.
              format: date
              type: string
            recognitionStart:
              description: |
                The start date of a recognition period in YYYY-MM-DD format.
              format: date
              type: string
            revenueItems:
              description: |
                Revenue items are listed in ascending order by the accounting period start date.
              items:
                $ref: "#/components/schemas/GETRevenueItemType"
              type: array
            subscriptionChargeId:
              description: |
                The original subscription charge ID.
              type: string
            subscriptionId:
              description: |
                The original subscription ID.
              type: string
            success:
              description: |
                Returns `true` if the request was processed successfully.
              type: boolean
          type: object
        - $ref: "#/components/schemas/RevenueEventObjectCustomFields"
    GETRevenueEventDetailWithoutSuccessType:
      allOf:
        - properties:
            accountId:
              description: |
                An account ID.
              type: string
            createdOn:
              description: |
                The date when the record was created in YYYY-MM-DD HH:MM:SS format.
              format: date-time
              type: string
            currency:
              description: The type of currency used.
              type: string
            eventType:
              description: |
                Label of the revenue event type. Revenue event type labels can be duplicated. You can configure your revenue event type labels by navigating to **Settings > Finance > Configure Revenue Event Types** in the Zuora UI.

                Note that `Credit Memo Posted` and `Debit Memo Posted` are only available if you enable the Invoice Settlement feature.
              enum:
                - Invoice Posted
                - Invoice Item Adjustment Created
                - Invoice Canceled
                - Invoice Item Adjustment Canceled
                - Revenue Distributed
                - Credit Memo Posted
                - Debit Memo Posted
              type: string
            notes:
              description: |
                Additional information about this record.
              type: string
            number:
              description: |
                The revenue event number created when a revenue event occurs.
              type: string
            recognitionEnd:
              description: |
                The end date of a recognition period in YYYY-MM-DD format. 

                The maximum difference of the recognitionStart and recognitionEnd date fields is equal to 250 multiplied by the length of an accounting period.
              format: date
              type: string
            recognitionStart:
              description: |
                The start date of a recognition period in YYYY-MM-DD format.
              format: date
              type: string
            revenueItems:
              description: |
                Revenue items are listed in ascending order by the accounting period start date.
              items:
                $ref: "#/components/schemas/GETRevenueItemType"
              type: array
            subscriptionChargeId:
              description: |
                The original subscription charge ID.
              type: string
            subscriptionId:
              description: |
                The original subscription ID.
              type: string
          type: object
        - $ref: "#/components/schemas/RevenueEventObjectCustomFields"
      title: revenueEventDetails
    GETRevenueEventDetailsType:
      properties:
        nextPage:
          description: |
            URL to retrieve the next page of the response if it exists; otherwise absent.
          format: URL
          type: string
        revenueEventDetails:
          description: |
            Represents a change to a revenue schedule, such as posting an invoice or distributing revenue.
          items:
            $ref: "#/components/schemas/GETRevenueEventDetailWithoutSuccessType"
          type: array
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GETRevenueItemType:
      allOf:
        - properties:
            accountingPeriodEndDate:
              description: |
                The accounting period end date. The accounting period end date of the open-ended accounting period is null. 
              format: date
              type: string
            accountingPeriodName:
              description: |
                Name of the accounting period. The open-ended accounting period is named `Open-Ended`. 
              type: string
            accountingPeriodStartDate:
              description: |
                The accounting period start date.
              format: date
              type: string
            amount:
              description: |
                The revenue schedule amount, which is the sum of all revenue items. This field cannot be null and must be formatted based on the currency, such as *JPY 30* or *USD 30.15*. Test out the currency to ensure you are using the proper formatting otherwise, the response will fail and this error message is returned:  `Allocation amount with wrong decimal places.`
              format: decimal
              type: string
            currency:
              description: |
                The type of currency used. 
              type: string
            isAccountingPeriodClosed:
              description: |
                Indicates if the accounting period is closed or open. 
              type: boolean
          type: object
        - $ref: "#/components/schemas/RevenueEventItemObjectCustomFields"
      title: revenueItems
    GETRevenueItemTypeResponse:
      properties:
        accountingPeriodEndDate:
          description: |
            The accounting period end date. The accounting period end date of the open-ended accounting period is null.
          format: date
          type: string
        accountingPeriodName:
          description: |
            Name of the accounting period. The open-ended accounting period is named Open-Ended. 
          type: string
        accountingPeriodStartDate:
          description: |
            The accounting period start date.
          format: date
          type: string
        amount:
          description: |
            The amount of the revenue item.
          format: decimal
          type: string
        currency:
          description: |
            The type of currency used. 
          type: string
        isAccountingPeriodClosed:
          description: |
            Indicates if the accounting period is closed or open. 
          type: boolean
      title: revenueItems
      type: object
    GETRevenueItemsType:
      properties:
        nextPage:
          description: |
            URL to retrieve the next page of the response if it exists; otherwise absent.
          format: URL
          type: string
        revenueItems:
          description: |
            Revenue items are listed in ascending order by the accounting period start date.
          items:
            $ref: "#/components/schemas/GETRevenueItemType"
          type: array
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GETRevenueRecognitionRuleAssociationType:
      properties:
        revenueRecognitionRuleName:
          description: |
            The name of the revenue recognition rule governing the revenue
            schedule.
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GETRevenueStartDateSettingType:
      properties:
        startDate:
          description: |
            The date on which revenue automation starts. This is the first day of an accounting period.
          format: date
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
        updatedBy:
          description: |
            The user who made the change.
          type: string
        updatedOn:
          description: |
            The date when the revenue automation start date was set.
          format: date-time
          type: string
      type: object
    GETRsRevenueItemType:
      allOf:
        - properties:
            accountingPeriodEndDate:
              description: |
                The accounting period end date. The accounting period end date of the open-ended accounting period is null.
              format: date
              type: string
            accountingPeriodName:
              description: |
                The name of the accounting period. The open-ended accounting period is named `Open-Ended`.
              type: string
            accountingPeriodStartDate:
              description: |
                The accounting period start date.
              format: date
              type: string
            amount:
              description: |
                The amount of the revenue item.
              format: decimal
              type: string
            currency:
              description: |
                The type of currency used.
              type: string
            deferredRevenueAccountingCode:
              description: |
                The accounting code for deferred revenue, such as Monthly Recurring Liability. Required only when `overrideChargeAccountingCodes` is `true`. Otherwise, this value is ignored.
              type: string
            deferredRevenueAccountingCodeType:
              description: |
                The type of the deferred revenue accounting code, such as Deferred Revenue. Required only when `overrideChargeAccountingCodes` is `true`. Otherwise, this value is ignored.
              type: string
            isAccountingPeriodClosed:
              description: |
                Indicates if the accounting period is closed or open.
              type: boolean
            recognizedRevenueAccountingCode:
              description: |
                The accounting code for recognized revenue, such as Monthly Recurring Charges or Overage Charges. Required only when `overrideChargeAccountingCodes` is `true`. Otherwise, the value is ignored.
              type: string
            recognizedRevenueAccountingCodeType:
              description: |
                The type of the recognized revenue accounting code, such as Sales Revenue or Sales Discount. Required only when `overrideChargeAccountingCodes` is `true`. Otherwise, this value is ignored.
              type: string
          type: object
        - $ref: "#/components/schemas/RevenueScheduleItemObjectCustomFields"
      title: revenueItems
    GETRsRevenueItemsType:
      properties:
        nextPage:
          description: |
            URL to retrieve the next page of the response if it exists; otherwise absent.
          format: URL
          type: string
        revenueItems:
          description: |
            Revenue items are listed in ascending order by the accounting period start date.
          items:
            $ref: "#/components/schemas/GETRsRevenueItemType"
          type: array
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GETSequenceSetResponse:
      description: ""
      properties:
        creditMemo:
          $ref: "#/components/schemas/CreditMemoEntityPrefix"
        debitMemo:
          $ref: "#/components/schemas/DebitMemoEntityPrefix"
        id:
          description: |
            The unique ID of the sequence set. For example, 402892c74c9193cd014c96bbe7c101f9.
          type: string
        invoice:
          $ref: "#/components/schemas/InvoiceEntityPrefix"
        name:
          description: |
            The name of the sequence set.
          type: string
        payment:
          $ref: "#/components/schemas/PaymentEntityPrefix"
        refund:
          $ref: "#/components/schemas/RefundEntityPrefix"
      title: sequenceSets
      type: object
    GETSequenceSetsResponse:
      description: ""
      properties:
        sequenceSets:
          description: |
            Array of sequence sets configured for billing documents, payments, and refunds.
          items:
            $ref: "#/components/schemas/GETSequenceSetResponse"
          type: array
        success:
          description: |
            Indicates whether the call succeeded.
          type: boolean
      type: object
    GETSubscriptionProductFeatureType:
      properties:
        description:
          description: |
            Feature description.
          type: string
        featureCode:
          description: |
            Feature code, up to 255 characters long.
          type: string
        id:
          description: |
            SubscriptionProductFeature ID.
          type: string
        name:
          description: |
            Feature name, up to 255 characters long.
          type: string
      title: subscriptionProductFeatures
      type: object
    GETSubscriptionRatePlanChargesType:
      allOf:
        - properties:
            applyDiscountTo:
              description: |
                Specifies the type of charges a specific discount applies to. 

                This field is only used when applied to a discount charge model. If you are not using a discount charge model, the value is null.

                Possible values:

                * `RECURRING`
                * `USAGE`
                * `ONETIMERECURRING`
                * `ONETIMEUSAGE`
                * `RECURRINGUSAGE`
                * `ONETIMERECURRINGUSAGE`
              type: string
            billingDay:
              description: |
                Billing cycle day (BCD), which is when bill runs generate invoices
                for charges associated with the product rate plan charge or the account.  

                Values:

                * `DefaultFromCustomer`
                * `SpecificDayofMonth(#)`
                * `SubscriptionStartDay`
                * `ChargeTriggerDay`
                * `SpecificDayofWeek/dayofweek`: in which dayofweek is the day in the week you define your billing periods to start.

                In the response data, a day-of-the-month value (`1`-`31`) appears in place of the hash sign above ("#"). If this value exceeds the number of days in a particular month, the last day of the month is used as the BCD.
              type: string
            billingPeriod:
              description: |
                Allows billing period to be overridden on the rate plan charge.
              type: string
            billingPeriodAlignment:
              description: |
                Possible values:

                * `AlignToCharge`
                * `AlignToSubscriptionStart`
                * `AlignToTermStart`
              type: string
            billingTiming:
              description: |
                The billing timing for the charge. This field is only used if the `ratePlanChargeType` value is `Recurring`.

                Possible values are:

                * `In Advance`
                * `In Arrears`

                **Note:** This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).
              type: string
            chargeModelConfiguration:
              $ref: "#/components/schemas/ChargeModelConfigurationType"
            chargedThroughDate:
              description: |
                The date through which a customer has been billed for the charge.
              format: date
              type: string
            currency:
              description: |
                Currency used by the account. For example, `USD` or `EUR`.
              type: string
            description:
              description: |
                Description of the rate plan charge.
              type: string
            discountAmount:
              description: |
                The amount of the discount.
              type: number
            discountApplyDetails:
              description: |
                Container for the application details about a discount rate plan charge. 

                Only discount rate plan charges have values in this field.
              items:
                $ref: "#/components/schemas/GETDiscountApplyDetailsType"
              type: array
            discountClass:
              description: |
                The class that the discount belongs to. The discount class defines the order in which discount rate plan charges are applied.

                For more information, see [Manage Discount Classes](https://knowledgecenter.zuora.com/BC_Subscription_Management/Product_Catalog/B_Charge_Models/Manage_Discount_Classes).
              type: string
            discountLevel:
              description: |
                The level of the discount. Values: `RatePlan`, `Subscription`, `Account`.
              type: string
            discountPercentage:
              description: |
                The amount of the discount as a percentage.
              type: number
            dmrc:
              description: |
                The change (delta) of monthly recurring charge exists when the change in monthly recurring revenue caused by an amendment or a new subscription.
              type: number
            done:
              description: |
                A value of `true` indicates that an invoice for a charge segment has been completed. A value of `false` indicates that an invoice has not been completed for the charge segment.
              type: boolean
            dtcv:
              description: |
                After an amendment or an AutomatedPriceChange event, `dtcv` displays the change (delta) for the total contract value (TCV) amount for this charge, compared with its previous value with recurring charge types.
              type: number
            effectiveEndDate:
              description: |
                The effective end date of the rate plan charge.
              format: date
              type: string
            effectiveStartDate:
              description: |
                The effective start date of the rate plan charge.
              format: date
              type: string
            endDateCondition:
              description: |
                Defines when the charge ends after the charge trigger date.

                If the subscription ends before the charge end date, the charge ends when the subscription ends. But if the subscription end date is subsequently changed through a Renewal, or Terms and Conditions amendment, the charge will end on the charge end date.

                Values:

                * `Subscription_End`
                * `Fixed_Period`
                * `Specific_End_Date`
              type: string
            id:
              description: |
                Rate plan charge ID.
              type: string
            includedUnits:
              description: |
                Specifies the number of units in the base set of units.
              type: number
            listPriceBase:
              description: |
                List price base; possible values are:

                * `Per_Billing_Period`
                * `Per_Month`
                * `Per_Week`
              type: string
            model:
              description: |
                Charge model; possible values are:

                * `FlatFee`
                * `PerUnit`
                * `Overage`
                * `Volume`
                * `Tiered`
                * `TieredWithOverage`
                * `DiscountFixedAmount`
                * `DiscountPercentage`
                * `MultiAttributePricing`
                * `PreratedPerUnit`
                * `PreratedPricing`
                * `HighWatermarkVolumePricing`
                * `HighWatermarkTieredPricing`
              type: string
            mrr:
              description: |
                Monthly recurring revenue of the rate plan charge.
              type: number
            name:
              description: |
                Charge name.
              type: string
            number:
              description: |
                Charge number.
              type: string
            numberOfPeriods:
              description: |
                Specifies the number of periods to use when calculating charges in an overage smoothing charge model.
              format: int64
              type: integer
            originalChargeId:
              description: |
                The original ID of the rate plan charge.
              type: string
            overageCalculationOption:
              description: |
                Determines when to calculate overage charges.
              type: string
            overagePrice:
              description: |
                The price for units over the allowed amount.
              type: number
            overageUnusedUnitsCreditOption:
              description: |
                Determines whether to credit the customer with unused units of usage.
              type: string
            price:
              description: |
                The price associated with the rate plan charge expressed as a decimal.
              type: number
            priceChangeOption:
              description: |
                When the following is true:

                1. AutomatedPriceChange setting is on

                2. Charge type is not one-time

                3. Charge model is not discount percentage

                Then an automatic price change can have a value for when a termed subscription is renewed. 

                Values (one of the following):

                * `NoChange` (default)
                * `SpecificPercentageValue`
                * `UseLatestProductCatalogPricing`
              type: string
            priceIncreasePercentage:
              description: |
                A planned future price increase amount as a percentage.
              type: number
            pricingSummary:
              description: |
                Concise description of rate plan charge model.
              type: string
            processedThroughDate:
              description: |
                The date until when charges have been processed. When billing in arrears, such as usage, this field value is the the same as the `ChargedThroughDate` value. This date is the earliest date when a charge can be amended.
              format: date
              type: string
            productRatePlanChargeId:
              description: ""
              type: string
            quantity:
              description: |
                The quantity of units, such as the number of authors in a hosted wiki service. Valid for all charge models except for Flat Fee pricing.
              type: number
            ratingGroup:
              description: |
                Specifies a rating group based on which usage records are rated.

                Possible values:

                - `ByBillingPeriod` (default): The rating is based on all the usages in a billing period.
                - `ByUsageStartDate`: The rating is based on all the usages on the same usage start date. 
                - `ByUsageRecord`: The rating is based on each usage record.
                - `ByUsageUpload`: The rating is based on all the  usages in a uploaded usage file (`.xls` or `.csv`).
                - `ByGroupId`: The rating is based on all the usages in a custom group.

                **Note:** 
                - The `ByBillingPeriod` value can be applied for all charge models. 
                - The `ByUsageStartDate`, `ByUsageRecord`, and `ByUsageUpload` values can only be applied for per unit, volume pricing, and tiered pricing charge models. 
                - The `ByGroupId` value is only available if you have the Active Rating feature enabled.
                - Use this field only for Usage charges. One-Time Charges and Recurring Charges return `NULL`.
              type: string
            segment:
              description: |
                The identifying number of the subscription rate plan segment. Segments are numbered sequentially, starting with 1.
              format: int64
              type: integer
            smoothingModel:
              description: |
                Specifies when revenue recognition begins. When charge model is `Overage` or `TieredWithOverage`, `smoothingModel` will be one of the following values:

                * `ContractEffectiveDate`
                * `ServiceActivationDate`
                * `CustomerAcceptanceDate`
              type: string
            specificBillingPeriod:
              description: |
                Customizes the number of month or week for the charges billing period. This field is required if you set the value of the `BillingPeriod` field to `Specific_Months` or `Specific_Weeks`.
              format: int64
              type: integer
            specificEndDate:
              description: |
                The specific date on which the charge ends. If the subscription ends before the specific end date, the charge ends when the subscription ends. But if the subscription end date is subsequently changed through a Renewal, or Terms and Conditions amendment, the charge will end on the specific end date.
              format: date
              type: string
            tcv:
              description: |
                The total contract value.
              type: number
            tiers:
              description: |
                One or many defined ranges with distinct pricing.
              items:
                $ref: "#/components/schemas/GETTierType"
              type: array
            triggerDate:
              description: |
                The date that the rate plan charge will be triggered.
              format: date
              type: string
            triggerEvent:
              description: |
                The event that will cause the rate plan charge to be triggered.

                Possible values: 

                * `ContractEffective`
                * `ServiceActivation`
                * `CustomerAcceptance`
                * `SpecificDate`
              type: string
            type:
              description: |
                Charge type. Possible values are: `OneTime`, `Recurring`, `Usage`.
              type: string
            unusedUnitsCreditRates:
              description: |
                Specifies the rate to credit a customer for unused units of usage. This field is applicable only for overage charge models when the 
                `OverageUnusedUnitsCreditOption` field value is `CreditBySpecificRate`.
              type: number
            uom:
              description: |
                Specifies the units to measure usage. 
              type: string
            upToPeriods:
              description: |
                Specifies the length of the period during which the charge is active. If this period ends before the subscription ends, the charge ends when this period ends.

                If the subscription end date is subsequently changed through a Renewal, or Terms and Conditions amendment, the charge end date will change accordingly up to the original period end.
              type: string
            upToPeriodsType:
              description: |
                The period type used to define when the charge ends. 

                Values:

                * `Billing_Periods`
                * `Days`
                * `Weeks`
                * `Months`
                * `Years`
              type: string
            usageRecordRatingOption:
              description: |
                Determines how Zuora processes usage records for per-unit usage charges. 
              type: string
            version:
              description: |
                Rate plan charge revision number.
              format: int64
              type: integer
          type: object
        - $ref: "#/components/schemas/RatePlanChargeObjectCustomFields"
      title: ratePlanCharges
    GETSubscriptionRatePlanType:
      allOf:
        - properties:
            id:
              description: |
                Rate plan ID.
              type: string
            lastChangeType:
              description: |
                The last amendment on the rate plan.

                Possible Values:

                * `Add`
                * `Update`
                * `Remove`
              type: string
            productId:
              description: ""
              type: string
            productName:
              description: ""
              type: string
            productRatePlanId:
              description: ""
              type: string
            productSku:
              description: |
                The unique SKU for the product.
              type: string
            ratePlanCharges:
              description: |
                Container for one or more charges.
              items:
                $ref: "#/components/schemas/GETSubscriptionRatePlanChargesType"
              type: array
            ratePlanName:
              description: |
                Name of the rate plan.
              type: string
            subscriptionProductFeatures:
              description: |-
                Container for one or more features. 

                Only available when the following settings are enabled:

                * The Entitlements feature in your tenant.

                * The Enable Feature Specification in Product and Subscriptions setting in Zuora Billing Settings
              items:
                $ref: "#/components/schemas/GETSubscriptionProductFeatureType"
              type: array
          type: object
        - $ref: "#/components/schemas/RatePlanObjectCustomFields"
      title: ratePlans
    GETSubscriptionType:
      allOf:
        - properties:
            accountId:
              description: ""
              type: string
            accountName:
              description: ""
              type: string
            accountNumber:
              description: ""
              type: string
            autoRenew:
              description: |
                If `true`, the subscription automatically renews at the end of the term. Default is `false`.
              type: boolean
            contractEffectiveDate:
              description: |
                Effective contract date for this subscription, as yyyy-mm-dd.
              format: date
              type: string
            contractedMrr:
              description: |
                Monthly recurring revenue of the subscription.
              type: number
            currentTerm:
              description: |
                The length of the period for the current subscription term.
              format: int64
              type: integer
            currentTermPeriodType:
              description: |
                The period type for the current subscription term.

                Values are:

                * `Month` (default)
                * `Year`
                * `Day`
                * `Week`
              type: string
            customerAcceptanceDate:
              description: |
                The date on which the services or products within a subscription have been accepted by the customer, as yyyy-mm-dd.
              format: date
              type: string
            id:
              description: |
                Subscription ID.
              type: string
            initialTerm:
              description: |
                The length of the period for the first subscription term.
              format: int64
              type: integer
            initialTermPeriodType:
              description: |
                The period type for the first subscription term.

                Values are:

                * `Month` (default)
                * `Year`
                * `Day`
                * `Week`
              type: string
            invoiceOwnerAccountId:
              description: ""
              type: string
            invoiceOwnerAccountName:
              description: ""
              type: string
            invoiceOwnerAccountNumber:
              description: ""
              type: string
            invoiceSeparately:
              description: |
                Separates a single subscription from other subscriptions and creates an invoice for the subscription. 

                If the value is `true`, the subscription is billed separately from other subscriptions. If the value is `false`, the subscription is included with other subscriptions in the account invoice.
              type: string
            notes:
              description: |
                A string of up to 65,535 characters.
              type: string
            orderNumber:
              description: |
                The order number of the order in which the changes on the subscription are made. 

                **Note:** This field is only available if you have the [Order Metrics](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AA_Overview_of_Orders#Order_Metrics) feature enabled. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/). We will investigate your use cases and data before enabling this feature for you.
              type: string
            ratePlans:
              description: |
                Container for rate plans.
              items:
                $ref: "#/components/schemas/GETSubscriptionRatePlanType"
              type: array
            renewalSetting:
              description: |
                Specifies whether a termed subscription will remain `TERMED` or change to `EVERGREEN` when it is renewed. 

                Values are:

                * `RENEW_WITH_SPECIFIC_TERM` (default)
                * `RENEW_TO_EVERGREEN`
              type: string
            renewalTerm:
              description: |
                The length of the period for the subscription renewal term.
              format: int64
              type: integer
            renewalTermPeriodType:
              description: |
                The period type for the subscription renewal term.

                Values are:

                * `Month` (default)
                * `Year`
                * `Day`
                * `Week`
              type: string
            revision:
              description: |
                An auto-generated decimal value uniquely tagged with a subscription. The value always contains one decimal place, for example, the revision of a new subscription is 1.0. If a further version of the subscription is created, the revision value will be increased by 1. Also, the revision value is always incremental regardless of deletion of subscription versions.
              type: string
            serviceActivationDate:
              description: |
                The date on which the services or products within a subscription have been activated and access has been provided to the customer, as yyyy-mm-dd
              format: date
              type: string
            status:
              description: |
                Subscription status; possible values are:

                * `Draft`
                * `Pending Activation`
                * `Pending Acceptance`
                * `Active`
                * `Cancelled`
                * `Suspended` (This value is in Limited Availability.)
              type: string
            subscriptionEndDate:
              description: |
                The date when the subscription term ends, where the subscription ends at midnight the day before.
                For example, if the `subscriptionEndDate` is 12/31/2016, the subscriptions ends at midnight (00:00:00 hours) on 12/30/2016.
                This date is the same as the term end date or the cancelation date, as appropriate.
              format: date
              type: string
            subscriptionNumber:
              description: ""
              type: string
            subscriptionStartDate:
              description: |
                Date the subscription becomes effective.
              format: date
              type: string
            termEndDate:
              description: |
                Date the subscription term ends. If the subscription is evergreen, this is null or is the cancellation date (if one has been set).
              format: date
              type: string
            termStartDate:
              description: |
                Date the subscription term begins. If this is a renewal subscription, this date is different from the subscription start date.
              format: date
              type: string
            termType:
              description: |
                Possible values are: `TERMED`, `EVERGREEN`.
              type: string
            totalContractedValue:
              description: |
                Total contracted value of the subscription.
              type: number
          type: object
        - $ref: "#/components/schemas/SubscriptionObjectQTFields"
        - $ref: "#/components/schemas/SubscriptionObjectNSFields"
        - $ref: "#/components/schemas/SubscriptionObjectCustomFields"
      title: subscriptions
    GETSubscriptionTypeWithSuccess:
      allOf:
        - properties:
            accountId:
              description: The ID of the account associated with this subscription.
              type: string
            accountName:
              description: The name of the account associated with this subscription.
              type: string
            accountNumber:
              description: The number of the account associated with this subscription.
              type: string
            autoRenew:
              description: |
                If `true`, the subscription automatically renews at the end of the term. Default is `false`.
              type: boolean
            contractEffectiveDate:
              description: |
                Effective contract date for this subscription, as yyyy-mm-dd.
              format: date
              type: string
            contractedMrr:
              description: |
                Monthly recurring revenue of the subscription.
              type: number
            currentTerm:
              description: |
                The length of the period for the current subscription term.
              format: int64
              type: integer
            currentTermPeriodType:
              description: |
                The period type for the current subscription term.

                Values are:

                * `Month` (default)
                * `Year`
                * `Day`
                * `Week`
              type: string
            customerAcceptanceDate:
              description: |
                The date on which the services or products within a subscription have been accepted by the customer, as yyyy-mm-dd.
              format: date
              type: string
            id:
              description: |
                Subscription ID.
              type: string
            initialTerm:
              description: |
                The length of the period for the first subscription term.
              format: int64
              type: integer
            initialTermPeriodType:
              description: |
                The period type for the first subscription term.

                Values are:

                * `Month` (default)
                * `Year`
                * `Day`
                * `Week`
              type: string
            invoiceOwnerAccountId:
              description: ""
              type: string
            invoiceOwnerAccountName:
              description: ""
              type: string
            invoiceOwnerAccountNumber:
              description: ""
              type: string
            invoiceSeparately:
              description: |
                Separates a single subscription from other subscriptions and creates an invoice for the subscription. 

                If the value is `true`, the subscription is billed separately from other subscriptions. If the value is `false`, the subscription is included with other subscriptions in the account invoice.
              type: string
            notes:
              description: |
                A string of up to 65,535 characters.
              type: string
            orderNumber:
              description: |
                The order number of the order in which the changes on the subscription are made. 

                **Note:** This field is only available if you have the [Order Metrics](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AA_Overview_of_Orders#Order_Metrics) feature enabled. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/). We will investigate your use cases and data before enabling this feature for you.
              type: string
            ratePlans:
              description: |
                Container for rate plans.
              items:
                $ref: "#/components/schemas/GETSubscriptionRatePlanType"
              type: array
            renewalSetting:
              description: |
                Specifies whether a termed subscription will remain `TERMED` or change to `EVERGREEN` when it is renewed. 

                Values are:

                * `RENEW_WITH_SPECIFIC_TERM` (default)
                * `RENEW_TO_EVERGREEN`
              type: string
            renewalTerm:
              description: |
                The length of the period for the subscription renewal term.
              format: int64
              type: integer
            renewalTermPeriodType:
              description: |
                The period type for the subscription renewal term.

                Values are:

                * `Month` (default)
                * `Year`
                * `Day`
                * `Week`
              type: string
            revision:
              description: |
                An auto-generated decimal value uniquely tagged with a subscription. The value always contains one decimal place, for example, the revision of a new subscription is 1.0. If a further version of the subscription is created, the revision value will be increased by 1. Also, the revision value is always incremental regardless of deletion of subscription versions.
              type: string
            serviceActivationDate:
              description: |
                The date on which the services or products within a subscription have been activated and access has been provided to the customer, as yyyy-mm-dd
              format: date
              type: string
            status:
              description: |
                Subscription status; possible values are:

                * `Draft`
                * `Pending Activation`
                * `Pending Acceptance`
                * `Active`
                * `Cancelled`
                * `Suspended` (This value is in Limited Availability.)
              type: string
            subscriptionEndDate:
              description: |
                The date when the subscription term ends, where the subscription ends at midnight the day before.
                For example, if the `subscriptionEndDate` is 12/31/2016, the subscriptions ends at midnight (00:00:00 hours) on 12/30/2016.
                This date is the same as the term end date or the cancelation date, as appropriate.
              format: date
              type: string
            subscriptionNumber:
              description: Subscription number.
              type: string
            subscriptionStartDate:
              description: |
                Date the subscription becomes effective.
              format: date
              type: string
            success:
              description: |
                Returns `true` if the request was processed successfully.
              type: boolean
            termEndDate:
              description: |
                Date the subscription term ends. If the subscription is evergreen, this is null or is the cancellation date (if one has been set).
              format: date
              type: string
            termStartDate:
              description: |
                Date the subscription term begins. If this is a renewal subscription, this date is different from the subscription start date.
              format: date
              type: string
            termType:
              description: |
                Possible values are: `TERMED`, `EVERGREEN`.
              type: string
            totalContractedValue:
              description: |
                Total contracted value of the subscription.
              type: number
          type: object
        - $ref: "#/components/schemas/SubscriptionObjectQTFields"
        - $ref: "#/components/schemas/SubscriptionObjectNSFields"
        - $ref: "#/components/schemas/SubscriptionObjectCustomFields"
    GETSubscriptionWrapper:
      properties:
        nextPage:
          description: |
            URL to retrieve the next page of the response if it exists; otherwise absent.
          format: URL
          type: string
        subscriptions:
          description: |
            Array of subscriptions.
          items:
            $ref: "#/components/schemas/GETSubscriptionType"
          type: array
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GETTaxationItemListType:
      properties:
        success:
          description: Returns `true` if the request was processed successfully.
          type: boolean
        taxationItems:
          description: |
            Container for taxation items.
          items:
            $ref: "#/components/schemas/GETTaxationItemTypewithSuccess"
          type: array
      type: object
    GETTaxationItemType:
      allOf:
        - properties:
            createdById:
              description: |
                The ID of the Zuora user who created the taxation item. 
              type: string
            createdDate:
              description: |
                The date and time when the taxation item was created in the Zuora system, in `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
              type: string
            exemptAmount:
              description: |
                The calculated tax amount excluded due to the exemption.
              format: double
              type: number
            financeInformation:
              description: |
                Container for the finance information related to the taxation item.
              properties:
                onAccountAccountingCode:
                  description: |
                    The accounting code that maps to an on account in your accounting system.
                  type: string
                onAccountAccountingCodeType:
                  description: |
                    The type of the accounting code that maps to an on account in your accounting system.
                  type: string
                salesTaxPayableAccountingCode:
                  description: |
                    The accounting code for the sales taxes payable.
                  type: string
                salesTaxPayableAccountingCodeType:
                  description: |
                    The type of the accounting code for the sales taxes payable.
                  type: string
              type: object
            id:
              description: |
                The ID of the taxation item.
              type: string
            jurisdiction:
              description: |
                The jurisdiction that applies the tax or VAT. This value is typically a state, province, county, or city.
              type: string
            locationCode:
              description: |
                The identifier for the location based on the value of the `taxCode` field. 
              type: string
            memoItemId:
              description: |
                The ID of the credit or debit memo associated with the taxation item.
              type: string
            name:
              description: |
                The name of the taxation item.
              type: string
            sourceTaxItemId:
              description: |
                The ID of the taxation item of the invoice, which the credit or debit memo is created from.
              type: string
            success:
              description: Returns `true` if the request was processed successfully.
              type: boolean
            taxAmount:
              description: |
                The amount of the tax applied to the credit or debit memo.
              format: double
              type: number
            taxCode:
              description: |
                The tax code identifies which tax rules and tax rates to apply to a specific credit or debit memo.
              type: string
            taxCodeDescription:
              description: |
                The description of the tax code.
              type: string
            taxDate:
              description: |
                The date when the tax is applied to the credit or debit memo.
              format: date
              type: string
            taxRate:
              description: |
                The tax rate applied to the credit or debit memo.
              format: double
              type: number
            taxRateDescription:
              description: |
                The description of the tax rate.
              type: string
            taxRateType:
              description: |
                The type of the tax rate applied to the credit or debit memo.
              enum:
                - Percentage
                - FlatFee
              type: string
            updatedById:
              description: |
                The ID of the Zuora user who last updated the taxation item.
              type: string
            updatedDate:
              description: |
                The date and time when the taxation item was last updated, in `yyyy-mm-dd hh:mm:ss` format. 
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/TaxationItemObjectCustomFields"
    GETTaxationItemTypewithSuccess:
      allOf:
        - properties:
            createdById:
              description: |
                The ID of the Zuora user who created the taxation item.
              type: string
            createdDate:
              description: |
                The date and time when the taxation item was created in the Zuora system, in `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
              type: string
            exemptAmount:
              description: |
                The amount of taxes or VAT for which the customer has an exemption.
              format: double
              type: number
            financeInformation:
              description: |
                Container for the finance information related to the taxation item.
              properties:
                onAccountAccountingCode:
                  description: |
                    The accounting code that maps to an on account in your accounting system.
                  type: string
                onAccountAccountingCodeType:
                  description: |
                    The type of the accounting code that maps to an on account in your accounting system.
                  type: string
                salesTaxPayableAccountingCode:
                  description: |
                    The accounting code for the sales taxes payable.
                  type: string
                salesTaxPayableAccountingCodeType:
                  description: |
                    The type of the accounting code for the sales taxes payable.
                  type: string
              type: object
            id:
              description: |
                The ID of the taxation item.
              type: string
            jurisdiction:
              description: |
                The jurisdiction that applies the tax or VAT. This value is typically a state, province, county, or city.
              type: string
            locationCode:
              description: |
                The identifier for the location based on the value of the `taxCode` field.
              type: string
            memoItemId:
              description: |
                The ID of the credit or debit memo associated with the taxation item.
              type: string
            name:
              description: |
                The name of the taxation item.
              type: string
            sourceTaxItemId:
              description: |
                The ID of the taxation item of the invoice, which the credit or debit memo is created from.
              type: string
            taxAmount:
              description: |
                The amount of the tax applied to the credit or debit memo.
              format: double
              type: number
            taxCode:
              description: |
                The tax code identifies which tax rules and tax rates to apply to a specific credit or debit memo.
              type: string
            taxCodeDescription:
              description: |
                The description of the tax code.
              type: string
            taxDate:
              description: |
                The date when the tax is applied to the credit or debit memo.
              format: date
              type: string
            taxRate:
              description: |
                The tax rate applied to the credit or debit memo.
              format: double
              type: number
            taxRateDescription:
              description: |
                The description of the tax rate.
              type: string
            taxRateType:
              description: |
                The type of the tax rate applied to the credit or debit memo.
              enum:
                - Percentage
                - FlatFee
              type: string
            updatedById:
              description: |
                The ID of the Zuora user who last updated the taxation item.
              type: string
            updatedDate:
              description: |
                The date and time when the taxation item was last updated, in `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/TaxationItemObjectCustomFields"
      title: taxationItems
    GETTaxationItemsOfCreditMemoItemType:
      allOf:
        - properties:
            data:
              description: |
                Container for the taxation items of the credit memo item.
              items:
                $ref: "#/components/schemas/GETCMTaxItemTypeNew"
              type: array
            nextPage:
              description: |
                URL to retrieve the next page of the response if it exists; otherwise absent.
              format: URL
              type: string
            success:
              description: Returns `true` if the request was processed successfully.
              type: boolean
          type: object
    GETTaxationItemsOfDebitMemoItemType:
      allOf:
        - properties:
            data:
              description: |
                Container for the taxation items of the debit memo item.
              items:
                $ref: "#/components/schemas/GETDMTaxItemTypeNew"
              type: array
            nextPage:
              description: |
                URL to retrieve the next page of the response if it exists; otherwise absent.
              format: URL
              type: string
            success:
              description: Returns `true` if the request was processed successfully.
              type: boolean
          type: object
    GETTierType:
      properties:
        endingUnit:
          description: |
            Decimal defining end of tier range.
          type: number
        price:
          description: |
            The decimal value of the tiered charge model. If the charge model is not a tiered type then this price field will be null and the `price` field directly under the `productRatePlanCharges` applies.
          type: number
        priceFormat:
          description: |
            Tier price format. Allowed values: `flat fee`, `per unit`.
          type: string
        startingUnit:
          description: |
            Decimal defining start of tier range.
          type: number
        tier:
          description: |
            Unique number of the tier.
          format: int64
          type: integer
      title: tiers
      type: object
    GETUsageType:
      allOf:
        - properties:
            accountId:
              description: |
                Customer account ID.
              type: string
            accountName:
              description: |
                Customer account name.
              type: string
            accountNumber:
              description: |
                Customer account number.
              type: string
            chargeNumber:
              description: |
                Number of the rate-plan charge that pays for this usage.
              type: string
            id:
              description: |
                Unique ID for the usage item.
              type: string
            quantity:
              description: |
                Number of units used.
              format: decimal
              type: string
            sourceName:
              description: |
                Source of the usage data. Possible values are: `Import`, `API`.
              type: string
            startDateTime:
              description: |
                Start date of the time period in which usage is tracked. Zuora uses this field value to determine the usage date.
              format: date-time
              type: string
            status:
              description: |
                Possible values are: `Importing`, `Pending`, `Processed`.
              type: string
            submissionDateTime:
              description: |
                Date when usage was submitted.
              format: date-time
              type: string
            subscriptionNumber:
              description: |
                Number of the subscription covering this usage.
              type: string
            unitOfMeasure:
              description: |
                Unit used to measure consumption.
              type: string
          type: object
        - $ref: "#/components/schemas/UsageObjectCustomFields"
      title: usage
    GETUsageWrapper:
      properties:
        nextPage:
          description: |
            URL to retrieve the next page of the response if it exists; otherwise absent.
          format: URL
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
        usage:
          description: |
            Contains one or more usage items.
          items:
            $ref: "#/components/schemas/GETUsageType"
          type: array
      type: object
    GatewayOption:
      properties:
        name:
          description: |
            The name of a gateway-specific parameter. This field is optional, but you must pass value for this field when using the `GatewayOptionData` field. Otherwise, the additional payment gateway parameter will not be mapped.
          type: string
        value:
          description: |
            The value of the gateway-specific parameter. This field is optional, but you must pass value for this field when using the `GatewayOptionData` field. Otherwise, the additional payment gateway parameter will not be mapped.
          type: string
      type: object
    GenerateBillingDocumentResponseType:
      properties:
        creditMemos:
          description: |
            Container for generated credit memos.

            **Note:** This container is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
          items:
            $ref: "#/components/schemas/CreditMemoResponseType"
          type: array
        invoices:
          description: |
            Container for generated invoics.
          items:
            $ref: "#/components/schemas/InvoiceResponseType"
          type: array
        success:
          description: Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GetAllOrdersResponseType:
      properties:
        nextPage:
          description: |
            URL to retrieve the next page of the response if it exists; otherwise absent.
          format: URL
          type: string
        orders:
          items:
            $ref: "#/components/schemas/Order"
          type: array
        success:
          description: |
            Indicates whether the call succeeded.
          type: boolean
      type: object
    GetBillingPreviewRunResponse:
      description: get billingPreviewRun response
      properties:
        assumeRenewal:
          description: ""
          type: string
        batch:
          description: |
            The customer batch included in the billing preview run. 
          type: string
        chargeTypeToExclude:
          description: |
            The charge types excluded from the forecast run.
          type: string
        createdById:
          description: |
            The ID of the user who created the billing preview run.
          type: string
        createdDate:
          description: |
            The date and time when the billing preview run was created.
          format: datetime
          type: string
        endDate:
          description: |
            The date and time when the billing preview run completes.
          format: datetime
          type: string
        errorMessage:
          description: |
            The error message generated by a failed billing preview run.
          type: string
        includingEvergreenSubscription:
          description: |
            Indicates if evergreen subscriptions are included in the billing preview run.
          type: boolean
        resultFileUrl:
          description: |
            The URL of the zipped CSV result file generated by the billing preview run. This file contains the preview invoice item data and credit memo item data for the specified customers.

            **Note:** The credit memo item data is only available if you have Invoice Settlement feature enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
          type: string
        runNumber:
          description: |
            The run number of the billing preview run.
          type: string
        startDate:
          description: |
            The date and time when the billing preview run starts.
          format: datetime
          type: string
        status:
          description: |
            The status of the >billing preview run.

            **Possible values:** 

            * 0: Pending
            * 1: Processing
            * 2: Completed
            * 3: Error
            * 4: Canceled
          type: string
        succeededAccounts:
          description: |
            The number of accounts for which preview invoice item data and credit memo item data was successfully generated during the billing preview run.

            **Note:** The credit memo item data is only available if you have Invoice Settlement feature enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
          type: integer
        success:
          description: Returns `true` if the request was processed successfully.
          type: boolean
        targetDate:
          description: |
            The target date for the billing preview run.          
          format: date
          type: string
        totalAccounts:
          description: |
            The total number of accounts in the billing preview run.
          format: int32
          type: integer
        updatedById:
          description: |
            The ID of the user who last updated the billing preview run.
          type: string
        updatedDate:
          description: |
            The date and time when the billing preview run was last updated.
          format: date-time
          type: string
      type: object
    GetCustomObjectsAllNamespacesResponse:
      properties:
        count:
          description: The number of namespaces for custom object definitions.
          example: 1
          type: integer
        namespaces:
          items:
            $ref: "#/components/schemas/CustomObjectsNamespace"
          type: array
      type: object
    GetDataQueryJobResponse:
      properties:
        data:
          $ref: "#/components/schemas/DataQueryJob"
      type: object
    GetDataQueryJobsResponse:
      properties:
        data:
          description: |
            List of data query jobs. The query jobs are listed in reverse order of creation.
          items:
            $ref: "#/components/schemas/DataQueryJob"
          type: array
      type: object
    GetDebitMemoApplicationPartCollectionType:
      properties:
        applicationParts:
          description: |
            Container for application parts.
          items:
            $ref: "#/components/schemas/GetDebitMemoApplicationPartType"
          type: array
        nextPage:
          description: |
            URL to retrieve the next page of the response if it exists; otherwise absent.
          format: URL
          type: string
        success:
          description: Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GetDebitMemoApplicationPartType:
      properties:
        appliedAmount:
          description: |
            The amount that is applied to the debit memo.
          format: double
          type: number
        createdById:
          description: |
            The ID of the Zuora user who created the payment or credit memo.
          format: uuid
          type: string
        createdDate:
          description: |
            The date and time when the payment or credit memo was created, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-12-01 15:31:10.
          format: date-time
          type: string
        creditMemoId:
          description: |
            The ID of credit memo that is applied to the specified debit memo.
          format: uuid
          type: string
        paymentId:
          description: |
            The ID of the payment that is applied to the specified debit memo.
          format: uuid
          type: string
        updatedById:
          description: |
            The ID of the Zuora user who last updated the payment or credit memo.
          format: uuid
          type: string
        updatedDate:
          description: |
            The date and time when the payment or credit memo was last updated, in `yyyy-mm-dd hh:mm:ss` format. For example, 2018-01-02 11:42:16.
          format: date-time
          type: string
      title: applicationParts
      type: object
    GetHostedPageType:
      properties:
        pageId:
          description: |
            Page ID of the Payment Page that Zuora assigns when it is created.
          type: string
        pageName:
          description: |
            Name of the Payment Page that specified during the page configuration.
          type: string
        pageType:
          description: |
            Payment method type of this Payment Page, e.g. 'Credit Card', 'ACH', or 'Bank Transfer'.
          type: string
        pageVersion:
          description: |
            Version of the Payment Page. 1 for Payment Pages 1.0 or 2 for Payment Pages 2.0.
          type: string
      title: hostedpages
      type: object
    GetHostedPagesType:
      properties:
        hostedpages:
          description: |
            Container for the hosted page information.
          items:
            $ref: "#/components/schemas/GetHostedPageType"
          type: array
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GetInvoiceApplicationPartCollectionType:
      properties:
        applicationParts:
          description: |
            Container for application parts.
          items:
            $ref: "#/components/schemas/GetInvoiceApplicationPartType"
          type: array
        nextPage:
          description: |
            URL to retrieve the next page of the response if it exists; otherwise absent.
          format: URL
          type: string
        success:
          description: Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    GetInvoiceApplicationPartType:
      properties:
        appliedAmount:
          description: |
            The amount that is applied to the invoice.
          format: double
          type: number
        createdById:
          description: |
            The ID of the Zuora user who created the payment or credit memo.
          format: uuid
          type: string
        createdDate:
          description: |
            The date and time when the payment or credit memo was created, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-12-01 15:31:10.
          format: date-time
          type: string
        creditMemoId:
          description: |
            The ID of credit memo that is applied to the specified invoice.
          format: uuid
          type: string
        paymentId:
          description: |
            The ID of the payment that is applied to the specified invoice.
          format: uuid
          type: string
        updatedById:
          description: |
            The ID of the Zuora user who last updated the payment or credit memo.
          format: uuid
          type: string
        updatedDate:
          description: |
            The date and time when the payment or credit memo was last updated, in `yyyy-mm-dd hh:mm:ss` format. For example, 2018-01-02 11:42:16.
          format: date-time
          type: string
      title: applicationParts
      type: object
    GetOrderLineItemResponseType:
      allOf:
        - $ref: "#/components/schemas/CommonResponseType"
        - properties:
            orderLineItem:
              $ref: "#/components/schemas/OrderLineItem"
          type: object
    GetOrderResponse:
      allOf:
        - $ref: "#/components/schemas/CommonResponseType"
        - properties:
            order:
              $ref: "#/components/schemas/Order"
          type: object
    GetOrderResponseForEvergreen:
      allOf:
        - $ref: "#/components/schemas/CommonResponseType"
        - properties:
            order:
              $ref: "#/components/schemas/OrderForEvergreen"
          type: object
    GetOrderResume:
      description: |
        Information about an order action of type `Resume`.
      properties:
        extendsTerm:
          description: |
            Specifies whether to extend the subscription term by the length of time the suspension is in effect. Note this field is not applicable in a Resume order action auto-created by the Order Metrics migration.
          type: boolean
        resumeDate:
          description: |
            The resume date when the resumption takes effect.
          format: date
          type: string
        resumePeriods:
          description: |
            This field is applicable only when the `resumePolicy` field is set to `FixedPeriodsFromToday` or `FixedPeriodsFromSuspendDate`. It must be used together with the `resumePeriodsType` field. Note this field is not applicable in a Resume order action auto-created by the Order Metrics migration.

            The total number of the periods used to specify when a subscription resumption takes effect. The subscription resumption will take place after the specified time frame (`suspendPeriods` multiplied by `suspendPeriodsType`) from today's date. 
          type: integer
        resumePeriodsType:
          description: |
            This field is applicable only when the `resumePolicy` field is set to `FixedPeriodsFromToday` or `FixedPeriodsFromSuspendDate`. It must be used together with the `resumePeriods` field. Note this field is not applicable in a Resume order action auto-created by the Order Metrics migration.

            The period type used to specify when a subscription resumption takes effect. The subscription suspension will take place after the specified time frame (`suspendPeriods` multiplied by `suspendPeriodsType`) from today's date. 
          enum:
            - Day
            - Week
            - Month
            - Year
          type: string
        resumePolicy:
          description: |
            Resume methods. Specify a way to resume a subscription. See [Resume Date](https://knowledgecenter.zuora.com/BC_Subscription_Management/Subscriptions/Resume_a_Subscription#Resume_Date) for more information. Note this field is not applicable in a Resume order action auto-created by the Order Metrics migration.

            If `SuspendDate` is specfied, the resumption will take place on the same day as the suspension. 
          enum:
            - Today
            - FixedPeriodsFromSuspendDate
            - FixedPeriodsFromToday
            - SpecificDate
            - SuspendDate
          type: string
        resumeSpecificDate:
          description: |
            This field is applicable only when the `resumePolicy` field is set to `SpecificDate`. Note this field is not applicable in a Resume order action auto-created by the Order Metrics migration.

            A specific date when the subscription resumption takes effect, in YYYY-MM-DD format. The value should not be earlier than the subscription suspension date.
          format: date
          type: string
      title: Resume
      type: object
    GetOrderSuspend:
      description: |
        Information about an order action of type `Suspend`.
      properties:
        suspendDate:
          description: |
            The suspend date when the suspension takes effect. 
          format: date
          type: string
        suspendPeriods:
          description: |
            This field is applicable only when the `suspendPolicy` field is set to `FixedPeriodsFromToday`. It must be used together with the `suspendPeriodsType` field. Note this field is not applicable in a Suspend order action auto-created by the Order Metrics migration.

            The total number of the periods used to specify when a subscription suspension takes effect. The subscription suspension will take place after the specified time frame (`suspendPeriods` multiplied by `suspendPeriodsType`) from today's date. 
          type: integer
        suspendPeriodsType:
          description: |
            This field is applicable only when the `suspendPolicy` field is set to `FixedPeriodsFromToday`. It must be used together with the `suspendPeriods` field. Note this field is not applicable in a Suspend order action auto-created by the Order Metrics migration.

            The period type used to specify when a subscription suspension takes effect. The subscription suspension will take place after the specified time frame (`suspendPeriods` multiplied by `suspendPeriodsType`) from today's date. 
          enum:
            - Day
            - Week
            - Month
            - Year
          type: string
        suspendPolicy:
          description: |
            Suspend methods. Specify a way to suspend a subscription. See [Suspend Date](https://knowledgecenter.zuora.com/BC_Subscription_Management/Subscriptions/Suspend_a_Subscription#Suspend_Date) for more information. Note this field is not applicable in a Suspend order action auto-created by the Order Metrics migration.
          enum:
            - Today
            - EndOfLastInvoicePeriod
            - FixedPeriodsFromToday
            - SpecificDate
          type: string
        suspendSpecificDate:
          description: |
            This field is applicable only when the `suspendPolicy` field is set to `SpecificDate`. Note this field is not applicable in a Suspend order action auto-created by the Order Metrics migration.

            A specific date when the subscription suspension takes effect, in YYYY-MM-DD format. The value should not be earlier than the subscription's contract effective date or later than the subscription's term end date.
          format: date
          type: string
      title: Suspend
      type: object
    GetOrdersResponse:
      allOf:
        - $ref: "#/components/schemas/CommonResponseType"
        - properties:
            nextPage:
              description: |
                URL to retrieve the next page of the response if it exists; otherwise absent.
              format: URL
              type: string
            orders:
              items:
                $ref: "#/components/schemas/Order"
              type: array
          type: object
    GetProductFeatureType:
      allOf:
        - properties:
            code:
              description: |
                Feature code, up to 255 characters long.
              type: string
            description:
              description: |
                Feature description.
              type: string
            id:
              description: |
                Feature ID.
              type: string
            name:
              description: |
                Feature name, up to 255 characters long.
              type: string
            status:
              description: ""
              type: string
          type: object
        - $ref: "#/components/schemas/ProductFeatureObjectCustomFields"
      title: productFeatures
    GetStoredCredentialProfilesResponse:
      properties:
        profiles:
          description: |
            Container for stored credential profiles.
          properties:
            activatedOn:
              description: |
                The date when the stored credential profile was activated (if applicable).
              format: date-time
              type: string
            agreedOn:
              description: |
                The date when the stored credential profile was created.
              format: date-time
              type: string
            brand:
              description: |
                The stored credential transaction framework. For example, Visa.
              type: string
            cancelledOn:
              description: |
                The date when the stored credential profile was cancelled (if applicable).
              format: date-time
              type: string
            consentAgreementRef:
              description: |
                Your reference for the consent agreement that you have established with the customer.
              maxLength: 128
              type: string
            consentAgreementSrc:
              enum:
                - External
              type: string
            expiredOn:
              description: |
                The date when the stored credential profile was expired (if applicable).
              format: date-time
              type: string
            number:
              description: |
                The number that identifies the stored credential profile within the payment method.
              type: integer
            paymentMethodId:
              description: |
                ID of the payment method.
              type: string
            status:
              description: |
                The status of the stored credential profile.

                * `Agreed` - The stored credential profile has not been validated via an authorization transaction with the payment gateway.
                * `Active` - The stored credential profile has been validated via an authorization transaction with the payment gateway.
                * `Cancelled` - The stored credentials are no longer valid, per a customer request. Zuora cannot use the stored credentials in transactions.
                * `Expired` - The stored credentials are no longer valid, per an expiration policy in the stored credential transaction framework. Zuora cannot use the stored credentials in transactions.
              enum:
                - Agreed
                - Active
                - Cancelled
                - Expired
              type: string
            type:
              enum:
                - Recurring
                - Unscheduled
              type: string
          type: object
        success:
          type: boolean
      type: object
    GetSubscriptionTermInfoResponseType:
      allOf:
        - $ref: "#/components/schemas/CommonResponseType"
        - properties:
            nextPage:
              description: |
                The URL of the next page of terms.
              format: URL
              type: string
            terms:
              items:
                $ref: "#/components/schemas/Term"
              type: array
          type: object
    GetWorkflowResponse:
      properties:
        cpuTime:
          description: |
            The overall CPU time for the execution of the workflow.
          format: time
          type: string
        createdAt:
          description: |
            The date and time when the workflow is created, in the `YYYY-MM-DD HH:MM:SS` format..
          format: datetime
          type: string
        finishedAt:
          description: |
            The date and time when the execution of the workflow completes, in the `YYYY-MM-DD HH:MM:SS` format.
          format: datetime
          type: string
        id:
          description: |
            The unique ID of the workflow.
          type: integer
        messages:
          description: |
            Messages from tasks.
          type: object
        name:
          description: |
            The unique run number of the workflow.
          type: string
        originalWorkflowId:
          description: |
            The ID of the workflow setup.
          type: string
        runTime:
          description: |
            The execution time of the workflow including the waiting time, in seconds.
          format: double
          type: number
        status:
          description: |
            The status of the workflow:
              - Queued: The workflow is in queue for being processed.
              - Processing: The workflow is in process.
              - Stopping: The workflow is being stopped through Zuora UI.
              - Stopped: The workflow is stopped through Zuora UI.
              - Finished: The workflow is finished. When a workflow is finished, it might have tasks pending for retry or delay. Pending tasks do not block the onfinish branch of the workflow, but they block the oncomplete branch of the iterate. 
          enum:
            - Queued
            - Processing
            - Stopping
            - Stopped
            - Finished
          type: string
        tasks:
          description: |
            An object containing task counts.
          properties:
            error:
              description: |
                The number of tasks in **Error** state.
              type: integer
            pending:
              description: |
                The number of tasks in **Pending** state.
              type: integer
            processing:
              description: |
                The number of tasks in **Processing** state.
              type: integer
            queued:
              description: |
                The number of tasks in **Queued** state.
              type: integer
            stopped:
              description: |
                The number of tasks in **Stopped** state.
              type: integer
            success:
              description: |
                The number of tasks in **Success** state.
              type: integer
            total:
              description: |
                The total number of tasks.
              type: integer
          type: object
        type:
          description: |
            The type of the current workflow.
            Possible values:
                - `Workflow::Setup`: The workflow is a setup and is used for creating workflow instances.
                - `Workflow::Instance`: The workflow is an execution that has data.
          type: string
        updatedAt:
          description: |
            The date and time when the workflow is updated the last time, in the `YYYY-MM-DD HH:MM:SS` format.
          format: datetime
          type: string
      type: object
    GetWorkflowSetupResponse:
      properties:
        callout_trigger:
          description: |
            If true, the workflow will run upon an API callout. This field must be `true` for integrating with the Configurable Payment Retry feature or the Collections Window feature in Collect.
          type: boolean
        createdAt:
          description: |
            The date and time when the workflow was created, in the `YYYY-MM-DD HH:MM:SS` format
          format: datetime
          type: string
        description:
          description: |
            The description of the workflow definition
          type: string
        id:
          description: |
            The unique ID of the workflow definition
          type: integer
        interval:
          description: |
            The cron expression for workflows with scheduled_trigger as `true`
          type: string
        name:
          description: |
            The name of the workflow definition
          type: string
        ondemand_trigger:
          description: |
            If true, the workflow will run when manually initiated.
          type: boolean
        priority:
          description: |
            Can be `High`, `Medium`, or `Low`. Higher-priority workflows take precedence over lower-priority workflows. When a workflow of higher priority is initiated, it will be placed ahead of lower-priority workflows that are running. Depending on the available resources, lower-priority workflows may be paused until resources are released.
          type: string
        scheduled_trigger:
          description: |
            If true, the workflow will run based on the configured schedule with the interval field.
          type: boolean
        status:
          description: |
            Can be `Active` or `Inactive`. Active workfow definitions run like normal. Inactive workflow definitions cannot be run.
          type: string
        timezone:
          description: |
            The timezone that corresponds with the cron expression in the interval field. See the [list of accepted timezone values](https://docs.google.com/spreadsheets/d/1skhepi-q5l9LyaMUPZjU_V9gzTphNMqNyV6ST5mygEo/edit?usp=sharing).
          type: string
        updatedAt:
          description: |
            The date and time when the workflow was updated the last time, in the `YYYY-MM-DD HH:MM:SS` format
          format: datetime
          type: string
      type: object
    GetWorkflowsResponse:
      properties:
        data:
          description: |
            The list of workflows retrieved. 
          items:
            $ref: "#/components/schemas/Workflow"
          type: array
        pagination:
          description: |
            An object containing pagination information for the list of workflows returned by the api
          properties:
            next_page:
              description: |
                A string containing the URL where the next page of data can be retrieved.
              type: string
            page:
              description: |
                An integer denoting the current page number.
              type: integer
            page_length:
              description: |
                An  integer denoting the number of workflows in this response.
              type: integer
          type: object
      type: object
    InitialTerm:
      description: The length of the period for the current subscription term.
      properties:
        period:
          description: Specify only when the termType is 'TERMED'.
          maximum: 100
          minimum: 0
          type: integer
        periodType:
          description: Specify only when the termType is 'TERMED'.
          enum:
            - Month
            - Year
            - Day
            - Week
          type: string
        startDate:
          description: |
            The start date of the current term.
          format: date
          type: string
        termType:
          enum:
            - TERMED
            - EVERGREEN
          type: string
      required:
        - termType
      type: object
    Invoice:
      properties:
        AccountId:
          description: ""
          type: string
        AdjustmentAmount:
          description: |2-
             The amount of the invoice adjustments associated with the invoice. **Character limi**t: 16

            **Values**: a valid currency amount 
          format: double
          type: number
        Amount:
          description: |2-
             The sum of all charges and taxes associated with the invoice.


            **Character limit**: 16

            **Values**: automatically generated 
          format: double
          type: number
        AmountWithoutTax:
          description: |2-
             The sum of all charges associated with the invoice. Taxes are excluded from this value.


            **Character limit**: 16

            **Values**: automatically generated 
          format: double
          type: number
        Balance:
          description: |2-
             The remaining balance of the invoice after all payments, adjustments, and refunds are applied.


            **Character limit**: 16

            **Values**: automatically generated 
          format: double
          type: number
        BillRunId:
          description: |2-
             The ID of a Bill Run.


            **Character limit**: 32

            **Values**: a BillRun ID 
          type: string
        Body:
          description: " Required "
          type: string
        Comments:
          description: |2-
             Additional information related to the invoice that a Zuora user added to the invoice.


            **Character limit**: 255

            **Values:** a string of 255 characters or fewer 
          type: string
        CreatedById:
          description: |2-
             The user ID of the person who created the invoice. If a bill run generated the invoice, then the value is the user ID of person who created the bill run.


            **Character limit**: 32

            **Values**: automatically generated 
          type: string
        CreatedDate:
          description: |2-
             The date when the invoice was generated.


            **Character limit**: 29

            **Values**: automatically generated 
          format: date-time
          type: string
        CreditBalanceAdjustmentAmount:
          description: |2+
             The currency amount of the adjustment applied to the customer's credit balance.


            **Character limit**: 16

            **Values**: a valid currency amount This field is only available if the [Zuora Global Support](http://support.zuora.com/) to enable this feature.


          format: double
          type: number
        DueDate:
          description: |2-
             The date by which the payment for this invoice is due.


            **Character limit**: 29 
          format: date
          type: string
        IncludesOneTime:
          description: |2-
             Specifies whether the invoice includes one-time charges.


            **Character limit**: 5

            **Values**: automatically generated from one of the following: `True` (default), `False` 
          type: boolean
        IncludesRecurring:
          description: |2-
             Specifies whether the invoice includes recurring charges.


            **Character limit**: 5

            **Values**: automatically generated from one of the following: `True` (default), `False` 
          type: boolean
        IncludesUsage:
          description: |2-
             Specifies whether the invoice includes usage charges.


            **Character limit**: 5

            **Values**: automatically generated from one of the following: `True `(default), `False` 
          type: boolean
        InvoiceDate:
          description: |2-
             Specifies the date on which to generate the invoice.


            **Character limit**: 29 
          format: date
          type: string
        InvoiceNumber:
          description: |2-
             The unique identification number for the invoice. This number is returned as a string.


            **Character limit**: 32

            **Values**: automatically generated 
          type: string
        LastEmailSentDate:
          description: |2-
             The date when the invoice was last emailed.


            **Character limit**: 29

            **Values**: automatically generated 
          format: date-time
          type: string
        PaymentAmount:
          description: |2-
             The amount of payments applied to the invoice.


            **Character limit**: 16 **Value**s: automatically generated 
          format: double
          type: number
        PostedBy:
          description: |2-
             The user ID of the person who moved the invoice to Posted status.


            **Character limit**: 32

            **Values**: automatically generated 
          type: string
        PostedDate:
          description: |2-
             The date when the invoice was posted.


            **Character limit:** 29

            **Values**: automatically generated 
          format: date-time
          type: string
        RefundAmount:
          description: |2-
             Specifies the amount of a refund that was applied against an earlier payment on the invoice.


            **Character limit**: 16

            **Values**: automatically generated 
          format: double
          type: number
        RegenerateInvoicePDF:
          description: |2-
             Regenerates a PDF of an invoice that was already generated.

            **Character limit**: 5

            **Values**: `True`, `False` 
          type: boolean
        Status:
          description: |2+
             The status of the invoice in the system. This status is not the status of the payment of the invoice, just the status of the invoice itself.


            **Character limit**: 8

            **Values**: one of the following:

            -  Draft (default, automatically set upon invoice creation)

            -  Posted

            -  Canceled

          type: string
        TargetDate:
          description: |2-
             This date is used to determine which charges are to be billed. All charges that are to be billed on this date or prior will be included in this bill run.


            **Character limit**: 29 
          format: date
          type: string
        TaxAmount:
          description: |2-
             The total amount of the taxes applied to the invoice.


            **Character limit**: 16

            **Values**: automatically generated 
          format: double
          type: number
        TaxExemptAmount:
          description: |2-
             The total amount of the invoice that is exempt from taxation.


            **Character limit**: 16

            **Values**: automatically generated 
          format: double
          type: number
        TransferredToAccounting:
          description: |2-
             Specifies whether or not the invoice was transferred to an external accounting system, such as NetSuite.


            **Character limit**: 10

            **Values**: Processing, Yes, Error, Ignore 
          type: string
        UpdatedById:
          description: ""
          type: string
        UpdatedDate:
          description: |2-
             The date when the invoice was last updated.


            **Character limit**: 29

            **Values**: automatically generated 
          format: date-time
          type: string
      type: object
    InvoiceAdjustmentObjectCustomFields:
      additionalProperties:
        description: |
          Custom fields of the Invoice Adjustment object. The name of each custom field has the form <code>*customField*__c</code>. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
      description: |
        Container for custom fields of an Invoice Adjustment object.
      title: invoiceAdjustmentFieldsCustom
      type: object
    InvoiceDataInvoice:
      allOf:
        - properties:
            AccountId:
              description: ""
              type: string
            AdjustmentAmount:
              description: |2-
                 The amount of the invoice adjustments associated with the invoice. **Character limi**t: 16


                **Values**: a valid currency amount 
              format: double
              type: number
            Amount:
              description: |2-
                 The sum of all charges and taxes associated with the invoice.


                **Character limit**: 16


                **Values**: automatically generated 
              format: double
              type: number
            AmountWithoutTax:
              description: |2-
                 The sum of all charges associated with the invoice. Taxes are excluded from this value.


                **Character limit**: 16


                **Values**: automatically generated 
              format: double
              type: number
            Balance:
              description: |2-
                 The remaining balance of the invoice after all payments, adjustments, and refunds are applied.


                **Character limit**: 16


                **Values**: automatically generated 
              format: double
              type: number
            BillRunId:
              description: |2-
                 The ID of a Bill Run.


                **Character limit**: 32


                **Values**: a BillRun ID 
              type: string
            Body:
              description: " Required "
              type: string
            Comments:
              description: |2-
                 Additional information related to the invoice that a Zuora user added to the invoice.


                **Character limit**: 255 **Values:** a string of 255 characters or fewer 
              type: string
            CreatedById:
              description: |2-
                 The user ID of the person who created the invoice. If a bill run generated the invoice, then the value is the user ID of person who created the bill run.


                **Character limit**: 32


                **Values**: automatically generated 
              type: string
            CreatedDate:
              description: |2-
                 The date when the invoice was generated.


                **Character limit**: 29


                **Values**: automatically generated 
              format: date-time
              type: string
            CreditBalanceAdjustmentAmount:
              description: |2+
                 The currency amount of the adjustment applied to the customer's credit balance.


                **Character limit**: 16


                **Values**: a valid currency amount This field is only available if the [Zuora Global Support](http://support.zuora.com/) to enable this feature.


              format: double
              type: number
            DueDate:
              description: |2-
                 The date by which the payment for this invoice is due.


                **Character limit**: 29 
              format: date
              type: string
            IncludesOneTime:
              description: |2-
                 Specifies whether the invoice includes one-time charges. You can use this field only with the `generate
                ` call for the Invoice object.


                **Character limit**: 5


                **Values**: automatically generated from one of the following: `True` (default), `False` 
              type: boolean
            IncludesRecurring:
              description: |2-
                 Specifies whether the invoice includes recurring charges. You can use this field only with the `generate
                `call for the Invoice object.


                **Character limit**: 5


                **Values**: automatically generated from one of the following: `True` (default), `False` 
              type: boolean
            IncludesUsage:
              description: |2-
                 Specifies whether the invoice includes usage charges. You can use this field only with the `generate
                `call for the Invoice object.


                **Character limit**: 5


                **Values**: automatically generated from one of the following: `True `(default), `False` 
              type: boolean
            InvoiceDate:
              description: |2-
                 Specifies the date on which to generate the invoice.


                **Character limit**: 29 
              format: date
              type: string
            InvoiceNumber:
              description: |2-
                 The unique identification number for the invoice. This number is returned as a string.


                **Character limit**: 32


                **Values**: automatically generated 
              type: string
            LastEmailSentDate:
              description: |2-
                 The date when the invoice was last emailed.


                **Character limit**: 29


                **Values**: automatically generated 
              format: date-time
              type: string
            PaymentAmount:
              description: |2-
                 The amount of payments applied to the invoice.


                **Character limit**: 16 **Value**s: automatically generated 
              format: double
              type: number
            PostedBy:
              description: |2-
                 The user ID of the person who moved the invoice to Posted status.


                **Character limit**: 32


                **Values**: automatically generated 
              type: string
            PostedDate:
              description: |2-
                 The date when the invoice was posted.
                **Character limit:** 29


                **Values**: automatically generated 
              format: date-time
              type: string
            RefundAmount:
              description: |2-
                 Specifies the amount of a refund that was applied against an earlier payment on the invoice.


                **Character limit**: 16


                **Values**: automatically generated 
              format: double
              type: number
            RegenerateInvoicePDF:
              description: |2-
                 Regenerates a PDF of an invoice that was already generated. Add this field to an `update
                ` call to regenerate an invoice PDF. Note that when you set the `RegenerateInvoicePDF` field to `true`, you cannot update any other fields in the same `update
                ` call. Otherwise, you will receive the following `INVALID_VALUE` error: &quot;When field RegenerateInvoicePDF is set to true to regenerate the invoice PDF file, changes on other fields of the invoice are not allowed.&quot;

                **Character limit**: 5


                **Values**: `True`, `False` 
              type: boolean
            Status:
              description: |2+
                 The status of the invoice in the system. This status is not the status of the payment of the invoice, just the status of the invoice itself.


                **Character limit**: 8


                **Values**: one of the following:

                -  Draft (default, automatically set upon invoice creation)

                -  Posted

                -  Canceled

              type: string
            TargetDate:
              description: |2-
                 This date is used to determine which charges are to be billed. All charges that are to be billed on this date or prior will be included in this bill run.


                **Character limit**: 29 
              format: date
              type: string
            TaxAmount:
              description: |2-
                 The total amount of the taxes applied to the invoice.


                **Character limit**: 16


                **Values**: automatically generated 
              format: double
              type: number
            TaxExemptAmount:
              description: |2-
                 The total amount of the invoice that is exempt from taxation.


                **Character limit**: 16


                **Values**: automatically generated 
              format: double
              type: number
            TransferredToAccounting:
              description: |2-
                 Specifies whether or not the invoice was transferred to an external accounting system, such as NetSuite.


                **Character limit**: 10


                **Values**: Processing, Yes, Error, Ignore 
              type: string
            UpdatedById:
              description: ""
              type: string
            UpdatedDate:
              description: |2-
                 The date when the invoice was last updated.


                **Character limit**: 29


                **Values**: automatically generated 
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/InvoiceObjectNSFields"
        - $ref: "#/components/schemas/InvoiceObjectCustomFields"
      description: ""
      title: Invoice
    InvoiceEntityPrefix:
      description: |
        Container for the prefix and starting document number of invoices.
      properties:
        prefix:
          description: |
            The prefix of invoices.
          example: INV
          type: string
        startNumber:
          description: |
            The starting document number of invoices.
          example: 10
          type: integer
      title: Invoice
      type: object
    InvoiceFile:
      properties:
        id:
          description: |
            The ID of the invoice PDF file. This is the ID for the file object and different from the file handle ID in the `pdfFileUrl` field. To open a file, you have to use the file handle ID.
          type: string
        pdfFileUrl:
          description: |
            The REST URL for the invoice PDF file. Click the URL to open the invoice PDF file.
          type: string
        versionNumber:
          description: |
            The version number of the invoice PDF file.
          format: int64
          type: integer
      title: invoiceFiles
      type: object
    InvoiceItem:
      allOf:
        - properties:
            accountingCode:
              description: The accounting code associated with the invoice item.
              type: string
            appliedToItemId:
              description: The unique ID of the invoice item that the discount charge is applied to.
              type: string
            availableToCreditAmount:
              description: |
                The amount of the invoice item that is available to credit.        
              format: decimal
              type: number
            balance:
              description: The balance of the invoice item.
              format: decimal
              type: string
            bookingReference:
              description: |
                The booking reference of the invoice item.

                **Note:** This field is only available if you have Unified Invoicing enabled.
              type: string
            chargeAmount:
              description: |
                The amount of the charge. 

                This amount does not include taxes regardless if the charge's tax mode is inclusive or exclusive.
              format: decimal
              type: string
            chargeDescription:
              description: The description of the charge.
              type: string
            chargeId:
              description: The unique ID of the charge.
              type: string
            chargeName:
              description: The name of the charge.
              type: string
            deferredRevenueAccountingCode:
              description: |
                The deferred revenue accounting code associated with the invoice item.

                **Note:** This field is only available if you have Zuora Finance enabled.
              type: string
            description:
              description: The description of the invoice item.
              type: string
            id:
              description: Item ID.
              type: string
            itemType:
              description: |
                The type of the invoice item.

                **Note:** This field is only available if you have Unified Invoicing enabled. 
              type: string
            productName:
              description: Name of the product associated with this item.
              type: string
            productRatePlanChargeId:
              description: |
                The ID of the product rate plan charge that the invoice item is created from.

                **Note:** This field is only available if you have Unified Invoicing enabled. 
              type: string
            purchaseOrderNumber:
              description: |
                The purchase order number associated with the invoice item.

                **Note:** This field is only available if you have Unified Invoicing enabled. 
              type: string
            quantity:
              description: The quantity of this item, in the configured unit of measure for the charge.
              format: decimal
              type: string
            recognizedRevenueAccountingCode:
              description: |
                The recognized revenue accounting code associated with the invoice item.

                **Note:** This field is only available if you have Zuora Finance enabled.
              type: string
            revRecCode:
              description: |
                The revenue recognition code.

                **Note:** This field is only available if you have Unified Invoicing enabled.
              type: string
            revRecTriggerCondition:
              description: |
                The date when revenue recognition is triggered.

                **Note:** This field is only available if you have Unified Invoicing enabled.
              enum:
                - ContractEffectiveDate
                - ServiceActivationDate
                - CustomerAcceptanceDate
              type: string
            revenueRecognitionRuleName:
              description: |
                The tevenue recognition rule of the invoice item.

                **Note:** This field is only available if you have Zuora Finance enabled.
              type: string
            serviceEndDate:
              description: The end date of the service period for this item, i.e., the last day of the service period, as _yyyy-mm-dd_.
              format: date
              type: string
            serviceStartDate:
              description: The start date of the service period for this item, as _yyyy-mm-dd_. For a one-time fee item, the date of the charge.
              format: date
              type: string
            sku:
              description: |
                The SKU of the invoice item.

                **Note:** This field is only available if you have Unified Invoicing enabled.
              type: string
            subscriptionId:
              description: The ID of the subscription for this item.
              type: string
            subscriptionName:
              description: The name of the subscription for this item.
              type: string
            success:
              description: Returns `true` if the request was processed successfully.
              type: boolean
            taxAmount:
              description: Tax applied to the charge.
              format: decimal
              type: string
            taxCode:
              description: |
                The tax code of the invoice item.
                **Note** Only when taxation feature is enabled, this field can be presented.
              type: string
            taxMode:
              description: |
                The tax mode of the invoice item.
                **Note** Only when taxation feature is enabled, this field can be presented.
              type: string
            taxationItems:
              description: |
                Container for the taxation items of the invoice item. 
              properties:
                data:
                  description: |
                    List of taxation items.
                  items:
                    $ref: "#/components/schemas/GETInvoiceTaxItemType"
                  type: array
                nextPage:
                  description: |
                    URL to retrieve the next page of the response if it exists; otherwise absent.
                  format: URL
                  type: string
              type: object
            unitOfMeasure:
              description: Unit used to measure consumption.
              type: string
            unitPrice:
              description: The per-unit price of the invoice item.
              format: double
              type: number
          type: object
        - $ref: "#/components/schemas/InvoiceItemObjectNSFields"
        - $ref: "#/components/schemas/InvoiceItemObjectCustomFields"
      title: invoiceItems
    InvoiceItemAdjustmentObjectCustomFields:
      additionalProperties:
        description: |
          Custom fields of the Invoice Item Adjustment object. The name of each custom field has the form <code>*customField*__c</code>. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
      description: |
        Container for custom fields of an Invoice Item Adjustment object.
      title: invoiceItemAdjustmentFieldsCustom
      type: object
    InvoiceItemAdjustmentObjectNSFields:
      description: |
        Container for Invoice Item Adjustment fields provided by the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
      properties:
        InvoiceItemAdjustment.IntegrationId__NS:
          description: |
            ID of the corresponding object in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        InvoiceItemAdjustment.IntegrationStatus__NS:
          description: |
            Status of the invoice item adjustment's synchronization with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        InvoiceItemAdjustment.SyncDate__NS:
          description: |
            Date when the invoice item adjustment was synchronized with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
      title: invoiceItemAdjustmentFieldsNS
      type: object
    InvoiceItemObjectCustomFields:
      additionalProperties:
        description: |
          Custom fields of the Invoice Item object. The name of each custom field has the form <code>*customField*__c</code>. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
      description: |
        Container for custom fields of an Invoice Item object.
      title: invoiceItemFieldsCustom
      type: object
    InvoiceItemObjectNSFields:
      description: |
        Container for Invoice Item fields provided by the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
      properties:
        IntegrationId__NS:
          description: |
            ID of the corresponding object in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        IntegrationStatus__NS:
          description: |
            Status of the invoice item's synchronization with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        SyncDate__NS:
          description: |
            Date when the invoice item was synchronized with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
      title: invoiceItemFieldsNS
      type: object
    InvoiceItemPreviewResult:
      properties:
        additionalInfo:
          properties:
            quantity:
              type: number
            unitOfMeasure:
              type: string
          type: object
        amountWithoutTax:
          type: number
        appliedToChargeNumber:
          description: Available when the chargeNumber of the charge that discount applies to was specified in the request or when the order is amending an existing subscription.
          type: string
        chargeDescription:
          type: string
        chargeName:
          type: string
        chargeNumber:
          description: Available when the chargeNumber was specified in the request or when the order is amending an existing subscription.
          type: string
        processingType:
          enum:
            - Charge
            - Discount
            - Tax
          type: string
        productName:
          type: string
        productRatePlanChargeId:
          type: string
        serviceEndDate:
          format: date
          type: string
        serviceStartDate:
          format: date
          type: string
        subscriptionNumber:
          type: string
        taxAmount:
          type: number
      type: object
    InvoiceObjectCustomFields:
      additionalProperties:
        description: |
          Custom fields of the Invoice object. The name of each custom field has the form <code>*customField*__c</code>. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
      description: |
        Container for custom fields of an Invoice object.
      title: invoiceFieldsCustom
      type: object
    InvoiceObjectNSFields:
      description: |
        Container for Invoice fields provided by the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
      properties:
        IntegrationId__NS:
          description: |
            ID of the corresponding object in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        IntegrationStatus__NS:
          description: |
            Status of the invoice's synchronization with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        SyncDate__NS:
          description: |
            Date when the invoice was synchronized with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
      title: invoiceFieldsNS
      type: object
    InvoicePayment:
      properties:
        Amount:
          description: |
            The amount of the payment to apply to an invoice.
          format: decimal
          type: string
        InvoiceId:
          description: |
            The ID of the invoice that the payment is applied to.
          type: string
        PaymentId:
          description: |
            The ID of the payment.
          type: string
      required:
        - Amount
        - InvoiceId
      type: object
    InvoiceProcessingOptions:
      properties:
        InvoiceDate:
          description: " The invoice date."
          format: date
          type: string
        InvoiceTargetDate:
          description: " The date that determines which charges to bill. Charges prior to this date or on this date are billed on the resulting invoices. "
          format: date
          type: string
      required:
        - InvoiceTargetDate
      type: object
    InvoiceResponseType:
      properties:
        id:
          description: |
            The ID of the generated invoice.
          type: string
      title: invoices
      type: object
    JobResult:
      allOf:
        - $ref: "#/components/schemas/CommonResponseType"
        - properties:
            accountId:
              description: The account ID for the order. This field is returned only when the `returnIds` query parameter in the "Create an order asynchronously" operation is set to `true`.
              type: string
            accountNumber:
              description: The account number for the order.
              type: string
            creditMemoIds:
              description: An array of the credit memo IDs that are generated in the "Create an order asynchronously" operation. This field is returned only when the `returnIds` query parameter in the "Create an order asynchronously" operation is set to `true`.
              items:
                type: string
              type: array
            creditMemoNumbers:
              description: An array of the credit memo numbers generated in this order request. The credit memo is only available if you have the Invoice Settlement feature enabled.
              items:
                type: string
              type: array
            invoiceId:
              description: An array of the invoice IDs that are generated in the "Create an order asynchronously" operation. This field is returned only when the `returnIds` query parameter in the "Create an order asynchronously" operation is set to `true`.
              items:
                type: string
              type: string
            invoiceNumbers:
              description: An array of the invoice numbers generated in this order request. Normally it includes one invoice number only, but can include multiple items when a subscription was tagged as invoice separately.
              items:
                type: string
              type: array
            orderId:
              description: The ID of the order created. This field is returned only when the `returnIds` query parameter in the "Create an order asynchronously" operation is set to `true`.
              type: string
            orderLineItems:
              items:
                properties:
                  id:
                    description: The sytem generated Id for the Order Line Item.
                    format: UUID
                    type: string
                  itemNumber:
                    description: The number for the Order Line Item.
                    format: UUID
                    type: string
                type: object
              type: array
            orderNumber:
              description: The order number of the order created.
              type: string
            paidAmount:
              description: The total amount collected in this order request.
              type: string
            paymentId:
              description: The ID of the payment that is collected in the "Create an order asynchronously" operation. This field is returned only when the `returnIds` query parameter in the "Create an order asynchronously" operation is set to `true`.
              type: string
            paymentNumber:
              description: The payment number that collected in this order request.
              type: string
            ramps:
              description: |
                **Note**: This field is only available if you have the Ramps feature enabled. The [Orders](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/AA_Overview_of_Orders) feature must be enabled before you can access the [Ramps](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Ramps_and_Ramp_Metrics/A_Overview_of_Ramps_and_Ramp_Metrics) feature. The Ramps feature is available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information coming October 2020.

                The ramp definitions created by this order request.
              items:
                properties:
                  rampNumber:
                    description: The number of the ramp definition.
                    type: string
                  subscriptionNumber:
                    description: The number of the subscription that this ramp deal definition is applied to.
                    type: string
                type: object
              type: array
            status:
              description: Status of the order. `Pending` is only applicable for an order that contains a `CreateSubscription` order action.
              enum:
                - Completed
                - Pending
              type: string
            subscriptionIds:
              description: Container for the IDs of the subscriptions in the order. This field is returned only when the `returnIds` query parameter in the "Create an order asynchronously" operation is set to `true`.
              items:
                type: string
              type: array
            subscriptionNumbers:
              description: |
                **Note:** This field is in Zuora REST API version control. Supported minor versions are 222.4 or earlier. To use this field in the method, you must set the `zuora-version` parameter to the minor version number in the request header.

                Container for the subscription numbers of the subscriptions in an order.
              items:
                type: string
              type: array
            subscriptions:
              description: |
                **Note:** This field is in Zuora REST API version control. Supported minor versions are 223.0 or later. To use this field in the method, you must set the `zuora-version` parameter to the minor version number in the request header.

                Container for the subscription numbers and statuses in an order.
              items:
                properties:
                  status:
                    description: Status of the subscription. `Pending Activation` and `Pending Acceptance` are only applicable for an order that contains a `CreateSubscription` order action.
                    enum:
                      - Active
                      - Pending Activation
                      - Pending Acceptance
                      - Cancelled
                    type: string
                  subscriptionNumber:
                    description: Subscription number of the subscription included in this order.
                    type: string
                type: object
              type: array
          type: object
      description: |
        **Note:** The schema of the `result` nested field is the same as the response body schema of either the ["Create an order"](https://www.zuora.com/developer/api-reference/#operation/POST_Order) or the ["Preview an order"](https://www.zuora.com/developer/api-reference/#operation/POST_PreviewOrder) operation, depending on the purpose of the job.

        The following schema for the nested `result` field is defined as the response body schema of "Create an order". See [Preview an Order](https://www.zuora.com/developer/api-reference/#operation/POST_PreviewOrder) for the response body schema of "Preview an order". 
    JournalEntryItemObjectCustomFields:
      additionalProperties:
        description: |
          Custom fields of the Journal Entry Item object. The name of each custom field has the form <code>*customField*__c</code>. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
      description: |
        Container for custom fields of a Journal Entry Item object.
      title: journalEntryItemFieldsCustom
      type: object
    JournalEntryObjectCustomFields:
      additionalProperties:
        description: |
          Custom fields of the Journal Entry object. The name of each custom field has the form <code>*customField*__c</code>. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
      description: |
        Container for custom fields of a Journal Entry object.
      title: journalEntryFieldsCustom
      type: object
    LastTerm:
      description: The length of the period for the current subscription term.
      properties:
        period:
          description: Specify only when the termType is 'TERMED'.
          maximum: 100
          minimum: 0
          type: integer
        periodType:
          description: Specify only when the termType is 'TERMED'.
          enum:
            - Month
            - Year
            - Day
            - Week
          type: string
        startDate:
          description: |
            The start date of the current term. You can change the term start date of a renewed subscription through a T&Cs order action. However, when changing it to an earlier date, this date must not be earlier than the term start date of the current term before this T&Cs.
          format: date
          type: string
        termType:
          enum:
            - TERMED
            - EVERGREEN
          type: string
      required:
        - termType
      type: object
    Linkage:
      description: Used to represent the relationship between workflow tasks
      properties:
        linkage_type:
          enum:
            - Start
            - Success
            - Failure
            - Iterate
            - true
            - false
            - Approve
            - Reject
          type: string
        source_task_id:
          description: the task that spawned the target task
          type: integer
        source_workflow_id:
          description: the workflow the target task is associated with
          type: integer
        target_task_id:
          description: the task that the source task is linked to.
          type: integer
      type: object
    ListAllSettingsResponse:
      properties:
        settings:
          items:
            $ref: "#/components/schemas/SettingItemWithOperationsInformation"
          type: array
      title: allSettings
      type: object
    MigrationUpdateCustomObjectDefinitionsRequest:
      additionalProperties: false
      properties:
        actions:
          description: The actions of updating custom object definitions, to be performed as parts of the migration.  Currently only one action per migration is supported.
          items:
            $ref: "#/components/schemas/CustomObjectDefinitionUpdateActionRequest"
          maxItems: 1
          minItems: 1
          type: array
      required:
        - actions
      type: object
    MigrationUpdateCustomObjectDefinitionsResponse:
      additionalProperties: false
      properties:
        actions:
          description: The actions of updating custom object definitions, to be performed as parts of the migration.  Currently only one action per migration is supported.
          items:
            $ref: "#/components/schemas/CustomObjectDefinitionUpdateActionResponse"
          maxItems: 1
          minItems: 1
          type: array
      type: object
    ModifiedStoredCredentialProfileResponse:
      properties:
        number:
          description: |
            The number that identifies the stored credential profile within the payment method.
          type: integer
        paymentMethodId:
          description: |
            ID of the payment method.
          type: string
        success:
          type: boolean
      type: object
    NewChargeMetrics:
      properties:
        ChargeNumber:
          description: ""
          type: string
        DMRR:
          description: ""
          format: double
          type: number
        DTCV:
          description: ""
          format: double
          type: number
        MRR:
          description: ""
          format: double
          type: number
        OriginalId:
          description: ""
          type: string
        OriginalRatePlanId:
          description: ""
          type: string
        ProductRatePlanChargeId:
          description: ""
          type: string
        ProductRatePlanId:
          description: ""
          type: string
        TCV:
          description: ""
          format: double
          type: number
      type: object
    NotificationsHistoryDeletionTaskResponse:
      description: The notification history deletion task information.
      properties:
        accountId:
          description: The ID of the account whose notification histories are deleted by the current deletion task.
          format: uuid
          type: string
        createdBy:
          description: The ID of the user who submits the notification history deletion task.
          format: uuid
          type: string
        createdOn:
          description: The timestamp when the notification history deletion task is created.
          type: integer
        id:
          description: The ID of the notification history deletion task.
          format: uuid
          type: string
        status:
          description: The status of the notification history deletion task.
          enum:
            - RUNNING
            - FINISHED
            - FAILED
          type: string
        tenantId:
          description: The ID of the tenant where the notification history deletion task runs.
          type: string
      type: object
    OneTimeFlatFeePricingOverride:
      description: |
        Pricing information about a one-time charge that uses the "flat fee" charge model. In this charge model, the charge has a fixed price.
      properties:
        listPrice:
          description: |
            Price of the charge.
          type: number
      required:
        - listPrice
      title: oneTimeFlatFee
      type: object
    OneTimePerUnitPricingOverride:
      description: |
        Pricing information about a one-time charge that uses the "per unit" charge model. In this charge model, the charge has a fixed price per unit purchased.
      properties:
        listPrice:
          description: |
            Per-unit price of the charge.
          type: number
        quantity:
          description: |
            Number of units purchased.
          minimum: 0
          type: number
      title: oneTimePerUnit
      type: object
    OneTimeTieredPricingOverride:
      description: |
        Pricing information about a one-time charge that uses the "tiered pricing" charge model. In this charge model, the charge has cumulative pricing tiers that become effective as units are purchased.
      properties:
        quantity:
          description: |
            Number of units purchased.
          minimum: 0
          type: number
        tiers:
          description: |
            List of cumulative pricing tiers in the charge.
          items:
            $ref: "#/components/schemas/ChargeTier"
          type: array
      title: oneTimeTiered
      type: object
    OneTimeVolumePricingOverride:
      description: |
        Pricing information about a one-time charge that uses the "volume pricing" charge model. In this charge model, the charge has a variable price per unit, depending on how many units are purchased.
      properties:
        quantity:
          description: |
            Number of units purchased.
          minimum: 0
          type: number
        tiers:
          description: |
            List of variable pricing tiers in the charge.
          items:
            $ref: "#/components/schemas/ChargeTier"
          type: array
      title: oneTimeVolume
      type: object
    Order:
      description: Represents the order information that will be returned in the GET call.
      properties:
        createdBy:
          description: The ID of the user who created this order.
          type: string
        createdDate:
          description: The time that the order gets created in the system, in the `YYYY-MM-DD HH:MM:SS` format.
          format: datetime
          type: string
        currency:
          description: Currency code.
          type: string
        customFields:
          $ref: "#/components/schemas/OrderObjectCustomFields"
        description:
          description: A description of the order.
          maxLength: 500
          type: string
        existingAccountNumber:
          description: The account number that this order has been created under. This is also the invoice owner of the subscriptions included in this order.
          type: string
        orderDate:
          description: The date when the order is signed. All the order actions under this order will use this order date as the contract effective date if no additinal contractEffectiveDate is provided.
          format: date
          type: string
        orderLineItems:
          description: |
            [Order Line Items](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Line_Items/AA_Overview_of_Order_Line_Items) are non subscription based items created by an Order, representing transactional charges such as one-time fees, physical goods, or professional service charges that are not sold as subscription services. 

            With the Order Line Items feature enabled, you can now launch non-subscription and hybrid monetization business models in Zuora, in addition to subscription business models. 

            **Note:** The [Order Line Items](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Line_Items/AA_Overview_of_Order_Line_Items) feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. If you want to join this early adopter program, submit a request at [Zuora Global Support](https://support.zuora.com/). 
          items:
            $ref: "#/components/schemas/OrderLineItemRetrieveOrder"
          type: array
        orderNumber:
          description: The order number of the order.
          type: string
        status:
          description: The status of the order. If the order contains any `Pending Activation` or `Pending Acceptance` subscription, the order status will be `Pending`; otherwise the order status is `Completed`.
          enum:
            - Completed
            - Pending
          type: string
        subscriptions:
          description: Represents a processed subscription, including the origin request (order actions) that create this version of subscription and the processing result (order metrics). The reference part in the request will be overridden with the info in the new subscription version.
          items:
            properties:
              baseVersion:
                description: The base version of the subscription.
                type: integer
              customFields:
                $ref: "#/components/schemas/SubscriptionObjectCustomFields"
              newVersion:
                description: The latest version of the subscription.
                type: integer
              orderActions:
                items:
                  $ref: "#/components/schemas/OrderAction"
                type: array
              quote:
                $ref: "#/components/schemas/QuoteObjectFields"
              ramp:
                description: |
                  **Note**: This field is only available if you have the Ramps feature enabled. The [Orders](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/AA_Overview_of_Orders) feature must be enabled before you can access the [Ramps](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Ramps_and_Ramp_Metrics/A_Overview_of_Ramps_and_Ramp_Metrics) feature. The Ramps feature is available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information coming October 2020.

                  The ramp definition.
                items:
                  $ref: "#/components/schemas/RampResponse"
                type: object
              sequence:
                description: The sequence number of a certain subscription processed by the order.
                type: integer
              subscriptionNumber:
                description: The new subscription number for a new subscription created, or the existing subscription number. Unlike the order request, the subscription number here always has a value.
                type: string
            type: object
          type: array
        updatedBy:
          description: The ID of the user who updated this order.
          type: string
        updatedDate:
          description: The time that the order gets updated in the system(for example, an order description update), in the `YYYY-MM-DD HH:MM:SS` format.
          format: datetime
          type: string
      type: object
    OrderAction:
      description: Represents the processed order action.
      properties:
        addProduct:
          $ref: "#/components/schemas/RatePlanOverride"
        cancelSubscription:
          $ref: "#/components/schemas/CancelSubscription"
        createSubscription:
          $ref: "#/components/schemas/CreateSubscription"
        customFields:
          $ref: "#/components/schemas/OrderActionObjectCustomFields"
        id:
          description: The Id of the order action processed in the order.
          type: string
        orderItems:
          description: |
            The `orderItems` nested field is only available to existing Orders customers who already have access to the field.

            **Note:** The following Order Metrics have been deprecated. Any new customers who onboard on [Orders](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/AA_Overview_of_Orders) or [Orders Harmonization](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Orders_Harmonization/Orders_Harmonization) will not get these metrics.
            * The Order ELP and Order Item objects 
            * The "Generated Reason" and "Order Item ID" fields in the Order MRR, Order TCB, Order TCV, and Order Quantity objects

            Existing Orders customers who have these metrics will continue to be supported.
          items:
            $ref: "#/components/schemas/OrderItem"
          type: array
        orderMetrics:
          description: |
            The container for order metrics.

            **Note:** The following Order Metrics have been deprecated. Any new customers who onboard on [Orders](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/AA_Overview_of_Orders) or [Orders Harmonization](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Orders_Harmonization/Orders_Harmonization) will not get these metrics.
            * The Order ELP and Order Item objects 
            * The "Generated Reason" and "Order Item ID" fields in the Order MRR, Order TCB, Order TCV, and Order Quantity objects

            Existing Orders customers who have these metrics will continue to be supported.

            **Note:** As of Zuora Billing Release 306, Zuora has upgraded the methodologies for calculating metrics in [Orders](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders). The new methodologies are reflected in the following Order Delta Metrics objects. 
            * [Order Delta Mrr](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Delta_Metrics/Order_Delta_Mrr)
            * [Order Delta Tcv](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Delta_Metrics/Order_Delta_Tcv)
            * [Order Delta Tcb](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Delta_Metrics/Order_Delta_Tcb)

            It is recommended that all customers use the new [Order Delta Metrics](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Delta_Metrics/AA_Overview_of_Order_Delta_Metrics). If you are an existing [Order Metrics](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/AA_Overview_of_Orders/Key_Metrics_for_Orders) customer and want to migrate to Order Delta Metrics, submit a request at [Zuora Global Support](https://support.zuora.com/).

            Whereas new customers, and existing customers not currently on [Order Metrics](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/AA_Overview_of_Orders/Key_Metrics_for_Orders), will no longer have access to Order Metrics, existing customers currently using Order Metrics will continue to be supported.
          items:
            $ref: "#/components/schemas/orderMetric"
          type: array
        ownerTransfer:
          $ref: "#/components/schemas/OwnerTransfer"
        removeProduct:
          $ref: "#/components/schemas/RemoveProduct"
        resume:
          $ref: "#/components/schemas/GetOrderResume"
        sequence:
          description: The sequence of the order actions processed in the order.
          type: integer
        suspend:
          $ref: "#/components/schemas/GetOrderSuspend"
        termsAndConditions:
          $ref: "#/components/schemas/TermsAndConditions"
        triggerDates:
          description: |
            Container for the contract effective, service activation, and customer acceptance dates of the order action. 

            If [Zuora is configured to require service activation](https://knowledgecenter.zuora.com/CB_Billing/Billing_Settings/Define_Default_Subscription_Settings#Require_Service_Activation_of_Orders.3F) and the `ServiceActivation` field is not set for a `CreateSubscription` order action, a `Pending` order and a `Pending Activation` subscription are created.

            If [Zuora is configured to require customer acceptance](https://knowledgecenter.zuora.com/CB_Billing/Billing_Settings/Define_Default_Subscription_Settings#Require_Customer_Acceptance_of_Orders.3F) and the `CustomerAcceptance` field is not set for a `CreateSubscription` order action, a `Pending` order and a `Pending Acceptance` subscription are created. At the same time, if the service activation date field is also required and not set, a `Pending` order and a `Pending Activation` subscription are created instead.

            If [Zuora is configured to require service activation](https://knowledgecenter.zuora.com/CB_Billing/Billing_Settings/Define_Default_Subscription_Settings#Require_Service_Activation_of_Orders.3F) and the `ServiceActivation` field is not set for either of the following order actions, a `Pending` order is created. The subscription status is not impacted. **Note:** This feature is in **Limited Availability**. If you want to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).
             * AddProduct
             * UpdateProduct
             * RemoveProduct
             * RenewSubscription
             * TermsAndConditions

            If [Zuora is configured to require customer acceptance](https://knowledgecenter.zuora.com/CB_Billing/Billing_Settings/Define_Default_Subscription_Settings#Require_Customer_Acceptance_of_Orders.3F) and the `CustomerAcceptance` field is not set for either of the following order actions, a `Pending` order is created. The subscription status is not impacted. **Note:** This feature is in **Limited Availability**. If you want to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).
             * AddProduct
             * UpdateProduct
             * RemoveProduct
             * RenewSubscription
             * TermsAndConditions
          items:
            $ref: "#/components/schemas/TriggerDate"
          type: array
        type:
          description: Type of the order action.
          enum:
            - CreateSubscription
            - TermsAndConditions
            - AddProduct
            - UpdateProduct
            - RemoveProduct
            - RenewSubscription
            - CancelSubscription
            - OwnerTransfer
            - Suspend
            - Resume
          type: string
        updateProduct:
          $ref: "#/components/schemas/RatePlanUpdate"
      type: object
    OrderActionForEvergreen:
      description: Represents the processed order action.
      properties:
        addProduct:
          $ref: "#/components/schemas/RatePlanOverrideForEvergreen"
        cancelSubscription:
          $ref: "#/components/schemas/CancelSubscription"
        createSubscription:
          $ref: "#/components/schemas/CreateSubscriptionForEvergreen"
        customFields:
          $ref: "#/components/schemas/OrderActionObjectCustomFields"
        id:
          description: The Id of the order action processed in the order.
          type: string
        orderMetrics:
          description: |
            Shows the delta metrics caused by a specific order action on a specific charge.
          items:
            $ref: "#/components/schemas/OrderMetricsForEvergreen"
          type: array
        ownerTransfer:
          $ref: "#/components/schemas/OwnerTransfer"
        removeProduct:
          $ref: "#/components/schemas/RemoveProduct"
        resume:
          $ref: "#/components/schemas/GetOrderResume"
        sequence:
          description: The sequence of the order actions processed in the order.
          type: integer
        suspend:
          $ref: "#/components/schemas/GetOrderSuspend"
        termsAndConditions:
          $ref: "#/components/schemas/TermsAndConditions"
        triggerDates:
          description: |
            Container for the contract effective, service activation, and customer acceptance dates of the order action. 

            If [Zuora is configured to require service activation](https://knowledgecenter.zuora.com/CB_Billing/Billing_Settings/Define_Default_Subscription_Settings#Require_Service_Activation_of_Orders.3F) and the `ServiceActivation` field is not set for a `CreateSubscription` order action, a `Pending` order and a `Pending Activation` subscription are created.

            If [Zuora is configured to require customer acceptance](https://knowledgecenter.zuora.com/CB_Billing/Billing_Settings/Define_Default_Subscription_Settings#Require_Customer_Acceptance_of_Orders.3F) and the `CustomerAcceptance` field is not set for a `CreateSubscription` order action, a `Pending` order and a `Pending Acceptance` subscription are created. At the same time, if the service activation date field is also required and not set, a `Pending` order and a `Pending Activation` subscription are created instead.

            If [Zuora is configured to require service activation](https://knowledgecenter.zuora.com/CB_Billing/Billing_Settings/Define_Default_Subscription_Settings#Require_Service_Activation_of_Orders.3F) and the `ServiceActivation` field is not set for either of the following order actions, a `Pending` order is created. The subscription status is not impacted. **Note:** This feature is in **Limited Availability**. If you want to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).
             * AddProduct
             * UpdateProduct
             * RemoveProduct
             * RenewSubscription
             * TermsAndConditions

            If [Zuora is configured to require customer acceptance](https://knowledgecenter.zuora.com/CB_Billing/Billing_Settings/Define_Default_Subscription_Settings#Require_Customer_Acceptance_of_Orders.3F) and the `CustomerAcceptance` field is not set for either of the following order actions, a `Pending` order is created. The subscription status is not impacted. **Note:** This feature is in **Limited Availability**. If you want to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).
             * AddProduct
             * UpdateProduct
             * RemoveProduct
             * RenewSubscription
             * TermsAndConditions
          items:
            $ref: "#/components/schemas/TriggerDate"
          type: array
        type:
          description: Type of the order action.
          enum:
            - CreateSubscription
            - TermsAndConditions
            - AddProduct
            - UpdateProduct
            - RemoveProduct
            - RenewSubscription
            - CancelSubscription
            - OwnerTransfer
            - Suspend
            - Resume
          type: string
        updateProduct:
          $ref: "#/components/schemas/RatePlanUpdateForEvergreen"
      type: object
    OrderActionObjectCustomFields:
      additionalProperties:
        description: |
          Custom fields of the Order Action object. The name of each custom field has the form <code>*customField*__c</code>. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
      description: |
        Container for custom fields of an Order Action object.
      title: orderActionFieldsCustom
      type: object
    OrderContact:
      description: |
        Use this field to create a new account as the sold-to contact of the Order Line Item (OLI). 

        You can either use this field to create a new account or use the `soldTo` field to assign an existing account as the sold-to contact of the OLI. 

        If neither this field nor the `soldTo` field is set, the system will automatically set the default sold-to contact under the OLI's invoice owner account as the sold-to contact of the OLI.
      properties:
        address1:
          description: |
            First line of the contact's address. This is often a street address or a business name.
          maxLength: 255
          type: string
        address2:
          description: |
            Second line of the contact's address.
          maxLength: 255
          type: string
        city:
          description: |
            City of the contact's address.
          maxLength: 40
          type: string
        country:
          description: |
            Country; must be a valid country name or abbreviation. If using Zuora Tax, you must specify a country in the bill-to contact to calculate tax.
          maxLength: 64
          type: string
        county:
          description: |
            County of the contact's address.
          maxLength: 32
          type: string
        firstName:
          description: |
            First name of the contact.
          maxLength: 100
          type: string
        lastName:
          description: |
            Last name of the contact.
          maxLength: 100
          type: string
        postalCode:
          description: |
            ZIP code or other postal code of the contact's address.
          maxLength: 20
          type: string
        state:
          description: |
            State or province of the contact's address.
          maxLength: 40
          type: string
      type: object
    OrderContactRetrieveOrder:
      description: |
        A new account created as the sold-to contact of the Order Line Item (OLI).
      properties:
        address1:
          description: |
            First line of the contact's address. This is often a street address or a business name.
          maxLength: 255
          type: string
        address2:
          description: |
            Second line of the contact's address.
          maxLength: 255
          type: string
        city:
          description: |
            City of the contact's address.
          maxLength: 40
          type: string
        country:
          description: |
            Country; must be a valid country name or abbreviation. If using Zuora Tax, you must specify a country in the bill-to contact to calculate tax.
          maxLength: 64
          type: string
        county:
          description: |
            County of the contact's address.
          maxLength: 32
          type: string
        firstName:
          description: |
            First name of the contact.
          maxLength: 100
          type: string
        lastName:
          description: |
            Last name of the contact.
          maxLength: 100
          type: string
        postalCode:
          description: |
            ZIP code or other postal code of the contact's address.
          maxLength: 20
          type: string
        state:
          description: |
            State or province of the contact's address.
          maxLength: 40
          type: string
      type: object
    OrderContactRetrieveOrderLineItem:
      description: |
        A new account created as the sold-to contact of the Order Line Item (OLI). 
      properties:
        address1:
          description: |
            First line of the contact's address. This is often a street address or a business name.
          maxLength: 255
          type: string
        address2:
          description: |
            Second line of the contact's address.
          maxLength: 255
          type: string
        city:
          description: |
            City of the contact's address.
          maxLength: 40
          type: string
        country:
          description: |
            Country; must be a valid country name or abbreviation. If using [Zuora Tax](https://knowledgecenter.zuora.com/Billing/Taxes/A_Zuora_Tax), you must specify a country in the bill-to contact to calculate tax.
          maxLength: 64
          type: string
        county:
          description: |
            County of the contact's address.
          maxLength: 32
          type: string
        firstName:
          description: |
            First name of the contact.
          maxLength: 100
          type: string
        lastName:
          description: |
            Last name of the contact.
          maxLength: 100
          type: string
        postalCode:
          description: |
            ZIP code or other postal code of the contact's address.
          maxLength: 20
          type: string
        state:
          description: |
            State or province of the contact's address.
          maxLength: 40
          type: string
      type: object
    OrderDeltaMetric:
      properties:
        chargeNumber:
          description: |
            The charge number for the associated Rate Plan Charge. This field can be null if the metric is generated for an Order Line Item.
          type: string
        currency:
          description: |
            ISO 3-letter currency code (uppercase). For example, USD.
          type: string
        endDate:
          description: |
            The end date for the order delta metric.
          format: date
          type: string
        grossAmount:
          description: |
            The gross amount for the metric. The is the amount excluding applied discount.
          type: number
        netAmount:
          description: |
            The net amount for the metric. The is the amount with discounts applied
          type: number
        orderActionId:
          description: |
            The Id for the related Order Action. This field can be null if the metric is generated for an Order Line Item.
          type: string
        orderActionSequence:
          description: |
            The sequence for the related Order Action. This field can be null if the metric is generated for an Order Line Item.
          type: string
        orderActionType:
          description: |
            The type for the related Order Action. This field can be null if the metric is generated for an Order Line Item.
          type: string
        productRatePlanChargeId:
          description: |
            The Id for the associated Product Rate Plan Charge. This field can be null if the Order Line Item is not associated with a Product Rate Plan Charge.
          type: string
        ratePlanChargeId:
          description: |
            The id for the associated Rate Plan Charge. This field can be null if the metric is generated for an Order Line Item.
          type: string
        startDate:
          description: |
            The start date for the order delta metric.
          format: date
          type: string
        subscriptionNumber:
          description: |
            The number of the subscription. This field can be null if the metric is generated for an Order Line Item.
          type: string
      type: object
    OrderDeltaMrr:
      allOf:
        - $ref: "#/components/schemas/OrderDeltaMetric"
      description: |
        Order Delta Mrr. This is a metric that reflects the change to the TCV on rate plan charge object as the result of the order.
      type: object
    OrderDeltaTcb:
      allOf:
        - $ref: "#/components/schemas/OrderDeltaMetric"
        - properties:
            orderLineItemId:
              description: |
                The sytem generated Id for the Order Line Item. This field can be null if the metric is generated for a Rate Plan Charge.
              format: UUID
              type: string
          type: object
      description: |
        Order Delta Tcb. This is a metric that reflects the change to the estimated billing on Rate Plan Charge object, or the estimated billing for an Order Line Item as the result of the order
      type: object
    OrderDeltaTcv:
      allOf:
        - $ref: "#/components/schemas/OrderDeltaMetric"
        - properties:
            orderLineItemId:
              description: |
                The sytem generated Id for the Order Line Item. This field can be null if the metric is generated for subscriptions.
              format: UUID
              type: string
          type: object
      description: |
        Order Delta Tcv. This is a metric that reflects the change to the TCV on Rate Plan Charge object, or the Total Contracted Value for an Order Line Item as the result of the order
      type: object
    OrderForEvergreen:
      description: Represents the order information that will be returned in the GET call.
      properties:
        createdBy:
          description: The ID of the user who created this order.
          type: string
        createdDate:
          description: The time that the order gets created in the system, in the `YYYY-MM-DD HH:MM:SS` format.
          format: datetime
          type: string
        currency:
          description: Currency code.
          type: string
        customFields:
          $ref: "#/components/schemas/OrderObjectCustomFields"
        description:
          description: A description of the order.
          maxLength: 500
          type: string
        existingAccountNumber:
          description: The account number that this order has been created under. This is also the invoice owner of the subscriptions included in this order.
          type: string
        orderDate:
          description: The date when the order is signed. All the order actions under this order will use this order date as the contract effective date if no additinal contractEffectiveDate is provided.
          format: datetime
          type: string
        orderNumber:
          description: The order number of the order.
          type: string
        status:
          description: The status of the order.
          type: string
        subscriptions:
          description: Represents a processed subscription, including the origin request (order actions) that create this version of subscription and the processing result (order metrics). The reference part in the request will be overridden with the info in the new subscription version.
          items:
            properties:
              baseVersion:
                description: The base version of the subscription.
                type: integer
              customFields:
                $ref: "#/components/schemas/SubscriptionObjectCustomFields"
              newVersion:
                description: The latest version of the subscription.
                type: integer
              orderActions:
                items:
                  $ref: "#/components/schemas/OrderActionForEvergreen"
                type: array
              quote:
                $ref: "#/components/schemas/QuoteObjectFields"
              sequence:
                description: The sequence number of a certain subscription processed by the order.
                type: integer
              subscriptionNumber:
                description: The new subscription number for a new subscription created, or the existing subscription number. Unlike the order request, the subscription number here always has a value.
                type: string
            type: object
          type: array
        updatedBy:
          description: The ID of the user who updated this order.
          type: string
        updatedDate:
          description: The time that the order gets updated in the system (for example, an order description update), in the `YYYY-MM-DD HH:MM:SS` format.
          format: datetime
          type: string
      type: object
    OrderItem:
      description: |
        Represents an order item. An order item is a sales item within an order in the context of the recurring subscription business model. It can be a unit of products or a service, but defined by both quantity and term (the start and end dates). 

        For the one time and the recurring charge types, if an order action causes a quantity metric creation (when the delta quantity equals to or is greater than zero), an order item is created.

        The following order actions will create an order item for the one time and recurring charges. The other order actions will refer to an existing order item. Also, the Owner Transfer order action always creates an order item whose quantity field is zero.

          * Create Subscription
          * Terms and Conditions - Extend Term
          * Renewal
          * Update Product - Increase Quantity
          * Add product
          * Owner Transfer

        For the usage charge type, if the order action causes a usage increase, an order item is created, and the quantity field of the order item is always zero.

        The following order actions will create an order item for for the usage charges.

          * Create Subscription
          * Terms and Conditions - Extend Term
          * Renewal
          * Add product
          * Owner Transfer
      properties:
        endDate:
          description: The order item's effective end date, aligned with the end date of an increased quantity order metrics.
          format: date
          type: string
        id:
          description: The ID of the order item.
          type: string
        orderActionId:
          description: Specify the order action that creates this order item.
          type: string
        quantity:
          description: The order item quantity. For the usage charge type, the value of this field is always zero. Also, the Owner Transfer order action always creates an order item whose Quantity field is zero.
          type: number
        scId:
          description: The ID of the charge segment that gets newly generated when the order item is created.
          type: string
        startDate:
          description: The order item's effective start date, aligned with the start date of an increased quantity order metrics.
          format: date
          type: string
      type: object
    OrderLineItem:
      allOf:
        - properties:
            amount:
              description: |
                The calculated gross amount for the Order Line Item.
              type: number
            id:
              description: |
                The sytem generated Id for the Order Line Item.
              format: UUID
              type: string
          type: object
        - $ref: "#/components/schemas/OrderLineItemCommonRetrieveOrderLineItem"
    OrderLineItemCommon:
      properties:
        UOM:
          description: |
            Specifies the units to measure usage.

            You can update this field for an OLI only when the OLI is in the `Executing` state (when the `itemState` field is set as `Executing`).
          type: string
        accountingCode:
          description: |
            The accountingCode for the Order Line Item (OLI).

            You can update this field for an OLI only when the OLI is in the `Executing` state (when the `itemState` field is set as `Executing`).
          type: string
        amountPerUnit:
          description: |
            The actual charged amount per unit for the Order Line Item (OLI).

            You can update this field for an OLI only when the OLI is in the `Executing` state (when the `itemState` field is set as `Executing`).
          type: number
        billTargetDate:
          description: |
            The target date for the Order Line Item (OLI) to be picked up by bill run for generating invoice.

            To generate invoice for an OLI, you must set this field and set the `itemState` field to `SentToBilling`.

            You can update this field for an OLI only when the OLI is in the `Executing` state (when the `itemState` field is set as `Executing`).
          format: date
          type: string
        customFields:
          $ref: "#/components/schemas/OrderLineItemCustomFields"
        deferredRevenueAccountingCode:
          description: |
            The deferred revenue accounting code for the Order Line Item (OLI).

            You can update this field for an OLI only when the OLI is in the `Executing` state (when the `itemState` field is set as `Executing`).
          type: string
        description:
          description: |
            The description of the Order Line Item (OLI).

            You can update this field for an OLI only when the OLI is in the `Executing` state (when the `itemState` field is set as `Executing`).
          type: string
        itemName:
          description: |
            The name of the Order Line Item (OLI).

            You can update this field for an OLI only when the OLI is in the `Executing` state (when the `itemState` field is set as `Executing`).
          type: string
        itemNumber:
          description: |
            The number for the Order Line Item (OLI).

            You can update this field for an OLI only when the OLI is in the `Executing` state (when the `itemState` field is set as `Executing`).
          type: string
        itemState:
          description: |
            The state of the Order Line Item (OLI). See [Order Line Item states, Order states, and state transitions](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Line_Items/AB_Order_Line_Item_States_and_Order_States) for more information.

            To generate invoice for an OLI, you must set this field to `SentToBilling` and set the `billTargetDate` field .

            You can update this field for an OLI only when the OLI is in the `Executing` or `SentToBilling`state (when the `itemState` field is set as `Executing` or `SentToBilling`).
          enum:
            - Executing
            - SentToBilling
            - Complete
            - Cancelled
          type: string
        itemType:
          description: |
            The type of the Order Line Item (OLI). 

            You can update this field for an OLI only when the OLI is in the `Executing` state (when the `itemState` field is set as `Executing`).
          enum:
            - Product
            - Fee
            - Services
          type: string
        listPricePerUnit:
          description: |
            The list price per unit for the Order Line Item (OLI).

            You can update this field for an OLI only when the OLI is in the `Executing` state (when the `itemState` field is set as `Executing`).
          type: number
        productCode:
          description: |
            The product code for the Order Line Item (OLI).

            You can update this field for an OLI only when the OLI is in the `Executing` state (when the `itemState` field is set as `Executing`).
          type: string
        purchaseOrderNumber:
          description: |
            Used by customers to specify the Purchase Order Number provided by the buyer.

            You can update this field for an Order Line Item (OLI) only when the OLI is in the `Executing` state (when the `itemState` field is set as `Executing`).
          type: string
        quantity:
          description: |
            The quantity of units, such as the number of authors in a hosted wiki service.

            You can update this field for an Order Line Item (OLI) only when the OLI is in the `Executing` state (when the `itemState` field is set as `Executing`).
          type: number
        recognizedRevenueAccountingCode:
          description: |
            The recognized revenue accounting code for the Order Line Item (OLI).

            You can update this field for an OLI only when the OLI is in the `Executing` state (when the `itemState` field is set as `Executing`).
          type: string
        revenueRecognitionRule:
          description: |
            The Revenue Recognition rule for the Order Line Item (OLI).

            You can update this field for an OLI only when the OLI is in the `Executing` state (when the `itemState` field is set as `Executing`).
          type: string
        taxCode:
          description: |
            The tax code for the Order Line Item (OLI).

            You can update this field for an OLI only when the OLI is in the `Executing` state (when the `itemState` field is set as `Executing`).
          type: string
        taxMode:
          description: |
            The tax mode for the Order Line Item (OLI).

            You can update this field for an OLI only when the OLI is in the `Executing` state (when the `itemState` field is set as `Executing`).
          enum:
            - TaxInclusive
            - TaxExclusive
          type: string
        transactionDate:
          description: |
            The transaction date of the Order Line Item (OLI).

            You can update this field for an OLI only when the OLI is in the `Executing` state (when the `itemState` field is set as `Executing`).
          format: date
          type: string
      title: OrderLineItem
      type: object
    OrderLineItemCommonPostOrder:
      properties:
        UOM:
          description: |
            Specifies the units to measure usage.
          type: string
        amountPerUnit:
          description: |
            The actual charged amount per unit for the Order Line Item.
          type: number
        billTargetDate:
          description: |
            The target date for the Order Line Item to be picked up by bill run for billing.
          format: date
          type: string
        customFields:
          $ref: "#/components/schemas/OrderLineItemCustomFields"
        deferredRevenueAccountingCode:
          description: |
            The deferred revenue accounting code for the Order Line Item.
          type: string
        description:
          description: |
            The description of the Order Line Item.
          type: string
        itemName:
          description: |
            The name of the Order Line Item.
          type: string
        itemState:
          description: |
            The state of an Order Line Item. If you want to generate invoice or preview invoice for order line items, you must set this field to `SentToBilling`.

            See [Order Line Item states, Order states, and state transitions](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Line_Items/AB_Order_Line_Item_States_and_Order_States) for more information.
          enum:
            - Executing
            - SentToBilling
            - Complete
            - Cancelled
          type: string
        itemType:
          description: |
            The type of the Order Line Item. 
          enum:
            - Product
            - Fee
            - Services
          type: string
        listPricePerUnit:
          description: |
            The list price per unit for the Order Line Item.
          type: number
        productCode:
          description: |
            The product code for the Order Line Item.
          type: string
        productRatePlanChargeId:
          description: |
            Id of a Product Rate Plan Charge. Only one-time charges are supported.
          format: date
          type: string
        purchaseOrderNumber:
          description: |
            Used by customers to specify the Purchase Order Number provided by the buyer.
          type: string
        quantity:
          description: |
            The quantity of units, such as the number of authors in a hosted wiki service.
          type: number
        recognizedRevenueAccountingCode:
          description: |
            The recognized revenue accounting code for the Order Line Item.
          type: string
        revenueRecognitionRule:
          description: |
            The Revenue Recognition rule for the Order Line Item.
          type: string
        soldTo:
          description: |
            The Id of an existing account. Use this field to assign an existing account as the sold-to contact of the Order Line Item (OLI).

            You can either use this field to assign an existing account or use the `soldToData` field to create a new account as the sold-to contact of the OLI. 

            If neither this field nor the `soldToData` field is set, the system will automatically set the default sold-to contact under the OLI's invoice owner account as the sold-to contact of the OLI.
          type: string
        soldToData:
          $ref: "#/components/schemas/OrderContact"
        taxCode:
          description: |
            The tax code for the Order Line Item.
          type: string
        taxMode:
          description: |
            The tax mode for the Order Line Item.
          enum:
            - TaxInclusive
            - TaxExclusive
          type: string
        transactionDate:
          description: |
            The transaction date of the Order Line Item.
          format: date
          type: string
      title: OrderLineItem
      type: object
    OrderLineItemCommonRetrieveOrder:
      properties:
        UOM:
          description: |
            Specifies the units to measure usage.
          type: string
        amountPerUnit:
          description: |
            The actual charged amount per unit for the Order Line Item.
          type: number
        billTargetDate:
          description: |
            The target date for the Order Line Item to be picked up by bill run for billing.
          format: date
          type: string
        customFields:
          $ref: "#/components/schemas/OrderLineItemCustomFields"
        deferredRevenueAccountingCode:
          description: |
            The deferred revenue accounting code for the Order Line Item.
          type: string
        description:
          description: |
            The description of the Order Line Item.
          type: string
        itemName:
          description: |
            The name of the Order Line Item.
          type: string
        itemState:
          description: |
            The state of an Order Line Item. See [Order Line Item states, Order states, and state transitions](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Line_Items/AB_Order_Line_Item_States_and_Order_States) for more information.
          enum:
            - Executing
            - SentToBilling
            - Complete
            - Cancelled
          type: string
        itemType:
          description: |
            The type of the Order Line Item. 
          enum:
            - Product
            - Fee
            - Services
          type: string
        listPricePerUnit:
          description: |
            The list price per unit for the Order Line Item.
          type: number
        productCode:
          description: |
            The product code for the Order Line Item.
          type: string
        productRatePlanChargeId:
          description: |
            Id of a Product Rate Plan Charge. Only one-time charges are supported.
          format: date
          type: string
        purchaseOrderNumber:
          description: |
            Used by customers to specify the Purchase Order Number provided by the buyer.
          type: string
        quantity:
          description: |
            The quantity of units, such as the number of authors in a hosted wiki service.
          type: number
        recognizedRevenueAccountingCode:
          description: |
            The recognized revenue accounting code for the Order Line Item.
          type: string
        revenueRecognitionRule:
          description: |
            The Revenue Recognition rule for the Order Line Item.
          type: string
        soldTo:
          description: |
            The Id of an existing account, which is set as the sold-to contact of the order line item.
          type: string
        soldToData:
          $ref: "#/components/schemas/OrderContactRetrieveOrder"
        taxCode:
          description: |
            The tax code for the Order Line Item.
          type: string
        taxMode:
          description: |
            The tax mode for the Order Line Item.
          enum:
            - TaxInclusive
            - TaxExclusive
          type: string
        transactionDate:
          description: |
            The transaction date of the Order Line Item.
          format: date
          type: string
      title: OrderLineItem
      type: object
    OrderLineItemCommonRetrieveOrderLineItem:
      properties:
        UOM:
          description: |
            Specifies the units to measure usage.
          type: string
        accountingCode:
          description: |
            The accountingCode for the Order Line Item.
          type: string
        amountPerUnit:
          description: |
            The actual charged amount per unit for the Order Line Item.
          type: number
        billTargetDate:
          description: |
            The target date for the Order Line Item to be picked up by bill run for billing.
          format: date
          type: string
        customFields:
          $ref: "#/components/schemas/OrderLineItemCustomFieldsRetrieveOrderLineItem"
        deferredRevenueAccountingCode:
          description: |
            The deferred revenue accounting code for the Order Line Item.
          type: string
        description:
          description: |
            The description of the Order Line Item.
          type: string
        itemName:
          description: |
            The name of the Order Line Item.
          type: string
        itemNumber:
          description: |
            The number for the Order Line Item.
          type: string
        itemState:
          description: |
            The state of the Order Line Item. See [Order Line Item states, Order states, and state transitions](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Line_Items/AB_Order_Line_Item_States_and_Order_States) for more information.
          enum:
            - Executing
            - SentToBilling
            - Complete
            - Cancelled
          type: string
        itemType:
          description: |
            The type of the Order Line Item. 
          enum:
            - Product
            - Fee
            - Services
          type: string
        listPricePerUnit:
          description: |
            The list price per unit for the Order Line Item.
          type: number
        productCode:
          description: |
            The product code for the Order Line Item.
          type: string
        productRatePlanChargeId:
          description: |
            Id of a Product Rate Plan Charge. Only one-time charges are supported.
          format: date
          type: string
        purchaseOrderNumber:
          description: |
            Used by customers to specify the Purchase Order Number provided by the buyer.
          type: string
        quantity:
          description: |
            The quantity of units, such as the number of authors in a hosted wiki service.
          type: number
        recognizedRevenueAccountingCode:
          description: |
            The recognized revenue accounting code for the Order Line Item.
          type: string
        revenueRecognitionRule:
          description: |
            The Revenue Recognition rule for the Order Line Item.
          type: string
        soldTo:
          description: |
            The Id of an existing account which is set as the sold-to contact of the Order Line Item (OLI).
          type: string
        soldToData:
          $ref: "#/components/schemas/OrderContactRetrieveOrderLineItem"
        taxCode:
          description: |
            The tax code for the Order Line Item.
          type: string
        taxMode:
          description: |
            The tax mode for the Order Line Item.
          enum:
            - TaxInclusive
            - TaxExclusive
          type: string
        transactionDate:
          description: |
            The transaction date of the Order Line Item.
          format: date
          type: string
      title: OrderLineItem
      type: object
    OrderLineItemCustomFields:
      additionalProperties:
        description: |
          Custom fields of the Order Line Item object. The name of each custom field has the form <code>*customField*__c</code>. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
      description: |
        Container for custom fields of an Order Line Item object.
      title: OrderLineItemCustomFields
      type: object
    OrderLineItemCustomFieldsRetrieveOrderLineItem:
      additionalProperties:
        description: |
          Custom fields of the Order Line Item object. The name of each custom field has the form <code>*customField*__c</code>. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
      description: |
        Container for custom fields of an Order Line Item object.
      title: OrderLineItemCustomFields
      type: object
    OrderLineItemRetrieveOrder:
      allOf:
        - properties:
            amount:
              description: |
                The calculated gross amount for the Order Line Item.
              type: number
            id:
              description: |
                The sytem generated Id for the Order Line Item.
              format: UUID
              type: string
            itemNumber:
              description: |
                The number for the Order Line Item.
              type: string
          type: object
        - $ref: "#/components/schemas/OrderLineItemCommonRetrieveOrder"
    OrderMetricsForEvergreen:
      properties:
        chargeNumber:
          type: string
        mrr:
          items:
            $ref: "#/components/schemas/TimeSlicedNetMetricsForEvergreen"
          type: array
        originRatePlanId:
          type: string
        productRatePlanChargeId:
          type: string
        productRatePlanId:
          type: string
        quantity:
          items:
            $ref: "#/components/schemas/TimeSlicedMetricsForEvergreen"
          type: array
        tcb:
          description: Total contracted billing which is the forecast value for the total invoice amount.
          items:
            $ref: "#/components/schemas/TimeSlicedTcbNetMetricsForEvergreen"
          type: array
        tcv:
          description: Total contracted value.
          items:
            $ref: "#/components/schemas/TimeSlicedNetMetricsForEvergreen"
          type: array
      type: object
    OrderObjectCustomFields:
      additionalProperties:
        description: |
          Custom fields of the Order object. The name of each custom field has the form <code>*customField*__c</code>. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
      description: |
        Container for custom fields of an Order object.
      title: orderFieldsCustom
      type: object
    OrderRampIntervalMetrics:
      properties:
        description:
          description: The short description of the interval.
          type: string
        discountTcb:
          description: The discount amount for the TCB.
          type: number
        discountTcv:
          description: The discount amount for the TCV.
          type: number
        endDate:
          description: The end date of the interval.
          format: date
          type: string
        grossTcb:
          description: The gross TCB value before discount charges are applied.
          type: number
        grossTcv:
          description: The gross TCV value before discount charges are applied.
          type: number
        intervalDeltaMetrics:
          description: Container for the delta metrics for each rate plan charge in each ramp interval. The delta is the difference of the subscription metrics between before and after the order.
          items:
            $ref: "#/components/schemas/RampIntervalChargeDeltaMetrics"
          type: array
        intervalMetrics:
          description: Container for the detailed metrics for each rate plan charge in each ramp interval.
          items:
            $ref: "#/components/schemas/RampIntervalChargeMetrics"
          type: array
        name:
          description: The name of the interval.
          type: string
        netTcb:
          description: The net TCB value after discount charges are applied.
          type: number
        netTcv:
          description: The net TCV value after discount charges are applied.
          type: number
        startDate:
          description: The start date of the interval.
          format: date
          type: string
      title: RampIntervalMetrics
      type: object
    OrderRampMetrics:
      properties:
        description:
          description: The short description of the ramp.
          type: string
        discountTcb:
          description: The discount amount for the TCB.
          type: number
        discountTcv:
          description: The discount amount for the TCV.
          type: number
        grossTcb:
          description: The gross TCB value before discount charges are applied.
          type: number
        grossTcv:
          description: The gross TCV value before discount charges are applied.
          type: number
        intervals:
          description: The ramp metrics for each ramp intervals in its timeline.
          items:
            $ref: "#/components/schemas/OrderRampIntervalMetrics"
          type: array
        name:
          description: The name of the ramp.
          type: string
        netTcb:
          description: The net TCB value after discount charges are applied.
          type: number
        netTcv:
          description: The net TCV value after discount charges are applied.
          type: number
        number:
          description: The number of the ramp. It is automaticcally generated by the billing system.
          type: string
      title: RampMetrics
      type: object
    OwnerTransfer:
      description: |
        Information about an order action of type `OwnerTransfer`.

        **Note:** The Owner Transfer feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).
      properties:
        destinationAccountNumber:
          description: |
            The account number of the account that the subscription is being transferred to.
          type: string
        destinationInvoiceAccountNumber:
          description: |
            The account number of the invoice owner account that the subscription is being transferred to.
          type: string
      title: ownerTransfer
      type: object
    POSTAccountResponseType:
      properties:
        accountId:
          description: |
            Auto-generated account ID.
          type: string
        accountNumber:
          description: |
            Account number.
          type: string
        billToContactId:
          description: |
            The ID of the bill-to contact.
          type: string
        contractedMrr:
          description: |
            Contracted monthly recurring revenue of the subscription.
          format: decimal
          type: string
        creditMemoId:
          description: |
            The credit memo ID, if a credit memo is generated during the subscription process.

            **Note:** This field is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
          type: string
        invoiceId:
          description: |
            ID of the invoice generated at account creation, if applicable.
          type: string
        paidAmount:
          description: |
            Amount collected on the invoice generated at account creation, if applicable.
          format: decimal
          type: string
        paymentId:
          description: |
            ID of the payment collected on the invoice generated at account creation, if applicable.
          type: string
        paymentMethodId:
          description: |
            ID of the payment method that was set up at account creation, which automatically becomes the default payment method for this account.
          type: string
        soldToContactId:
          description: |
            The ID of the sold-to contact.
          type: string
        subscriptionId:
          description: |
            ID of the subscription that was set up at account creation, if applicable.
          type: string
        subscriptionNumber:
          description: |
            Number of the subscription that was set up at account creation, if applicable.
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
        totalContractedValue:
          description: |
            Total contracted value of the subscription.
          format: decimal
          type: string
      type: object
    POSTAccountType:
      allOf:
        - properties:
            accountNumber:
              description: |
                A unique account number, up to 50 characters that do not begin with the default account number prefix.  If no account number is specified, one is generated.
              type: string
            additionalEmailAddresses:
              description: |
                A list of additional email addresses to receive emailed invoices. Use a comma to separate each email address.

                **Note:** Invoices are emailed to the email addresses specified in this field only when the `invoiceDeliveryPrefsEmail` field is `true`.
              items:
                type: string
              type: array
            applicationOrder:
              description: |
                The priority order to apply credit memos and/or unapplied payments to an invoice. Possible item values are: `CreditMemo`, `UnappliedPayment`.

                **Note:**
                  - This field is valid only if the `applyCredit` field is set to `true`.
                  - If no value is specified for this field, the default priority order is used, ["CreditMemo", "UnappliedPayment"], to apply credit memos first and then apply unapplied payments.
                  - If only one item is specified, only the items of the spedified type are applied to invoices. For example, if the value is `["CreditMemo"]`, only credit memos are used to apply to invoices.
              items:
                type: string
              type: array
            applyCredit:
              description: |
                Whether to automatically apply credit memos or unapplied payments, or both to an invoice.

                If the value is `true`, the credit memo or unapplied payment, or both will be automatically applied to the invoice. If no value is specified or the value is `false`, no action is taken.

                **Note:** This field is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
              type: boolean
            applyCreditBalance:
              description: |
                Applies a credit balance to an invoice.

                If the value is `true`, the credit balance is applied to the invoice. If the value is `false`, no action is taken.

                Prerequisite: `invoice` must be `true`.

                To view the credit balance adjustment, retrieve the details of the invoice using the Get Invoices method.


                **Note:** 
                  - If you are using the field `invoiceCollect` rather than the field `invoice`, the `invoiceCollect` value must be `true`.
                  - This field is deprecated if you have the Invoice Settlement feature enabled. 
              type: boolean
            autoPay:
              description: |
                Whether future payments are to be automatically billed when they are due. 

                - If this field is set to `true`, you must specify either the `creditCard` field or the `hpmCreditCardPaymentMethodId` field, but not both.
                - If this field is set to `false`, you can specify neither the `creditCard` field nor the `hpmCreditCardPaymentMethodId` field.
              type: boolean
            batch:
              description: |
                The alias name given to a batch. A string of 50 characters or less.
              type: string
            billCycleDay:
              description: |
                The account's bill cycle day (BCD), when bill runs generate invoices for the account.  Specify any day of the month (1-31, where 31 = end-of-month), or 0 for auto-set.

                Required if no subscription will be created. 

                Optional if a subscription is created and defaults to the day-of-the-month of the subscription's `contractEffectiveDate`.
              format: int64
              type: integer
            billToContact:
              $ref: "#/components/schemas/POSTAccountTypeBillToContact"
            collect:
              default: true
              description: |
                Collects an automatic payment for a subscription. The collection generated in this operation is only for this subscription, not for the entire customer account.

                If the value is `true`, the automatic payment is collected. If the value is `false`, no action is taken.

                Prerequisite: The `invoice` or `runBilling` field must be `true`. 

                **Note**: This field is only available if you set the `zuora-version` request header to `196.0` or later.
              type: boolean
            communicationProfileId:
              description: "The ID of a communication profile.          "
              type: string
            creditCard:
              $ref: "#/components/schemas/POSTAccountTypeCreditCard"
            creditMemoTemplateId:
              description: |
                **Note:** This field is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

                The unique ID of the credit memo template, configured in **Billing Settings** > **Manage Billing Document Configuration** through the Zuora UI. For example, 2c92c08a6246fdf101626b1b3fe0144b.
              type: string
            crmId:
              description: |
                CRM account ID for the account, up to 100 characters.
              type: string
            currency:
              description: |
                A currency as defined in Billing Settings in the Zuora UI.

                For payment method authorization, if the `paymentMethod` > `currencyCode` field is specified, `currencyCode` is used. Otherwise, this `currency` field is used for payment method authorization. If no currency is specified for the account, the default currency of the account is then used.
              type: string
            debitMemoTemplateId:
              description: |
                **Note:** This field is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

                The unique ID of the debit memo template, configured in **Billing Settings** > **Manage Billing Document Configuration** through the Zuora UI. For example, 2c92c08d62470a8501626b19d24f19e2.
              type: string
            documentDate:
              description: |
                The date of the billing document, in `yyyy-mm-dd` format. It represents the invoice date for invoices, credit memo date for credit memos, and debit memo date for debit memos.

                - If this field is specified, the specified date is used as the billing document date. 
                - If this field is not specified, the date specified in the `targetDate` is used as the billing document date.
              format: date
              type: string
            hpmCreditCardPaymentMethodId:
              description: |
                The ID of the payment method associated with this account. The payment method specified for this field will be set as the default payment method of the account.

                If the `autoPay` field is set to `true`, you must provide the credit card payment method ID for either this field or the `creditCard` field, but not both.  
              type: string
            invoice:
              default: true
              description: |
                **Note:** This field has been replaced by the `runBilling` field. The
                `invoice` field is only available for backward compatibility. 

                Creates an invoice for a subscription. The invoice generated in this
                operation is only for this subscription, not for the entire customer
                account.

                If the value is `true`, an invoice is created. If the value is
                `false`, no action is taken.

                **Note**: This field is only available if you set the `zuora-version` request header to `196.0` or `207.0`.
              type: boolean
            invoiceCollect:
              default: true
              description: |
                
                **Note:** This field has been replaced by the `invoice` field
                and the `collect` field. `invoiceCollect` is available only for backward
                compatibility.


                If this field is set to `true`, and a subscription is created, an invoice is generated at account creation time and payment is immediately collected using the account's default payment method.


                **Note**: This field is only available if you set the `zuora-version` request header to `186.0`, `187.0`, `188.0`, or `189.0`.
              type: boolean
            invoiceDeliveryPrefsEmail:
              default: false
              description: |
                Whether the customer wants to receive invoices through email. 
              type: boolean
            invoiceDeliveryPrefsPrint:
              default: false
              description: |
                Whether the customer wants to receive printed invoices, such as through postal mail.
              type: boolean
            invoiceTargetDate:
              description: |
                **Note:** This field has been replaced by the `targetDate` field. The
                `invoiceTargetDate` field is only available for backward
                compatibility.  


                Date through which to calculate charges if an invoice is generated, as yyyy-mm-dd. Default is current date.


                This field is in REST API minor version control. To use this field in
                the method, you can set the `zuora-version` parameter to the minor
                version number in the request header. Supported minor versions are
                `207.0` and earlier. 
              format: date
              type: string
            invoiceTemplateId:
              description: |
                Invoice template ID, configured in Billing Settings in the Zuora UI.
              type: string
            name:
              description: |
                Account name, up to 255 characters.
              type: string
            notes:
              description: A string of up to 65,535 characters.
              type: string
            parentId:
              description: Identifier of the parent customer account for this Account object. The length is 32 characters. Use this field if you have customer hierarchy enabled.
              type: string
            paymentGateway:
              description: |
                The name of the payment gateway instance. If null or left unassigned, the Account will use the Default Gateway.
              type: string
            paymentMethod:
              $ref: "#/components/schemas/POSTAccountTypePaymentMethod"
            paymentTerm:
              description: |
                Payment terms for this account. Possible values are: `Due Upon Receipt`, `Net 30`, `Net 60`, `Net 90`.
              type: string
            runBilling:
              default: true
              description: |
                Creates an invoice for a subscription. If you have the Invoice Settlement feature enabled, a credit memo might also be created based on the [invoice and credit memo generation rule.](https://knowledgecenter.zuora.com/CB_Billing/Invoice_Settlement/Credit_and_Debit_Memos/Rules_for_Generating_Invoices_and_Credit_Memos). 


                The billing documents generated
                in this operation is only for this subscription, not for the entire
                customer account.


                Possible values:

                - `true`: An invoice is created. If you have the Invoice Settlement feature enabled, a credit memo might also be created.


                - `false`: No invoice is created.


                **Note:** This field is in Zuora REST API version control. Supported
                minor versions are `211.0` or later. To use this field in the method,
                you must set the `zuora-version` parameter to the minor version number
                in the request header.
              enum:
                - true
                - false
              type: boolean
            salesRep:
              description: The name of the sales representative associated with this account, if applicable. Maximum of 50 characters.
              type: string
            sequenceSetId:
              description: |
                The ID of the billing document sequence set to assign to the customer account. 

                The billing documents to generate for this account will adopt the prefix and starting document number configured in the sequence set.

                If a customer account has no assigned billing document sequence set, billing documents generated for this account adopt the prefix and starting document number from the default sequence set.
              type: string
            soldToContact:
              $ref: "#/components/schemas/POSTAccountTypeSoldToContact"
            soldToSameAsBillTo:
              description: |
                Whether the sold-to contact and bill-to contact are the same entity. 

                The created account has the same bill-to contact and sold-to contact entity only when all the following conditions are met in the request body:

                - This field is set to `true`. 
                - A bill-to contact is specified.
                - No sold-to contact is specified.
              type: boolean
            subscription:
              $ref: "#/components/schemas/POSTAccountTypeSubscription"
            tagging:
              description: ""
              type: string
            targetDate:
              description: |
                Date through which to calculate charges if an invoice or a credit memo is generated, as yyyy-mm-dd. Default is current date.

                **Note:** The credit memo is only available only if you have the Invoice Settlement feature enabled.

                This field is in Zuora REST API version control. Supported minor versions are `211.0` and later. To use this field in the method, you must set the  `zuora-version` parameter to the minor version number in the request header.
              format: date
              type: string
            taxInfo:
              description: |
                Container for tax exempt information, used to establish the tax exempt status of a customer account.
              properties:
                VATId:
                  description: |
                    EU Value Added Tax ID. 

                    **Note:** This feature is in Limited Availability. If you wish to have access to the feature, submit a request at [Zuora Global Support](https://support.zuora.com).
                  type: string
                companyCode:
                  description: |
                    Unique code that identifies a company account in Avalara. Use this field to calculate taxes based on origin and sold-to addresses in Avalara.

                    **Note:** This feature is in Limited Availability. If you wish to have access to the feature, submit a request at [Zuora Global Support](https://support.zuora.com). 
                  type: string
                exemptCertificateId:
                  description: |
                    ID of the customer tax exemption certificate. Requires Zuora Tax.
                  type: string
                exemptCertificateType:
                  description: |
                    Type of tax exemption certificate that the customer holds. Requires Zuora Tax.
                  type: string
                exemptDescription:
                  description: |
                    Description of the tax exemption certificate that the customer holds. Requires Zuora Tax.
                  type: string
                exemptEffectiveDate:
                  description: |
                    Date when the customer tax exemption starts. Requires Zuora Tax.

                    Format: `yyyy-mm-dd`. Defaults to the current date.
                  format: date
                  type: string
                exemptEntityUseCode:
                  description: |
                    A unique entity use code to apply exemptions in Avalara AvaTax.

                    This account-level field is required only when you choose Avalara as your tax engine. See [Exempt Transactions](https://developer.avalara.com/avatax/handling-tax-exempt-customers/)for more details.
                  maxLength: 64
                  type: string
                exemptExpirationDate:
                  description: |
                    Date when the customer tax exemption expires. Requires Zuora Tax.

                    Format: `yyyy-mm-dd`. Defaults to the current date.
                  format: date
                  type: string
                exemptIssuingJurisdiction:
                  description: |
                    Jurisdiction in which the customer tax exemption certificate was issued.
                  type: string
                exemptStatus:
                  description: |
                    Status of the account tax exemption. Requires Zuora Tax.

                    Required if you use Zuora Tax. This field is unavailable if Zuora Tax is not used.

                    Values: `Yes`, `No`, `pendingVerification`.
                  type: string
              type: object
          required:
            - name
            - currency
            - billToContact
          type: object
        - $ref: "#/components/schemas/AccountObjectNSFields"
        - $ref: "#/components/schemas/AccountObjectCustomFields"
      example:
        additionalEmailAddresses:
          - contact1@example.com
          - contact2@example.com
        autoPay: false
        billCycleDay: 0
        billToContact:
          address1: 1051 E Hillsdale Blvd
          city: Foster City
          country: United States
          firstName: John
          lastName: Smith
          state: CA
          workEmail: smith@example.com
          zipCode: "94404"
        currency: USD
        hpmCreditCardPaymentMethodId: 2c92c0f93cf64d94013cfe2d20db61a7
        invoiceDeliveryPrefsEmail: true
        invoiceDeliveryPrefsPrint: false
        name: Zuora Test Account
        notes: This account is for demo purposes.
        paymentTerm: Due Upon Receipt
        subscription:
          autoRenew: true
          contractEffectiveDate: 2016-01-01
          initialTerm: 12
          notes: This is a trial subscription for POST account demo.
          renewalTerm: 12
          subscribeToRatePlans:
            - chargeOverrides:
                - price: 1000
                  productRatePlanChargeId: 2c92c0f94ac8307f014ae5d4a5156b28
                - price: 1000
                  productRatePlanChargeId: 2c92c0f94ac8307f014ae5dbe2947851
              productRatePlanId: 2c92c0f94ac8307f014ae5d3d1d469e2
            - chargeOverrides:
                - price: 1000
                  productRatePlanChargeId: 2c92c0f83cf64298013d027725a67b7b
              productRatePlanId: 2c92c0f93cf64d94013d027681560341
          termType: TERMED
    POSTAccountTypeBillToContact:
      allOf:
        - properties:
            address1:
              description: |
                First address line, 255 characters or less.
              type: string
            address2:
              description: |
                Second address line, 255 characters or less.
              type: string
            city:
              description: |
                City, 40 characters or less.
              type: string
            country:
              description: |
                Country; must be a valid country name or abbreviation. If using Zuora Tax, you must specify a country in the sold-to contact to calculate tax. A bill-to contact may be used if no sold-to contact is provided.
              type: string
            county:
              description: |
                County; 32 characters or less. May optionally be used by Zuora Tax to calculate county tax.
              type: string
            fax:
              description: |
                Fax phone number, 40 characters or less.
              type: string
            firstName:
              description: |
                First name, 100 characters or less.
              type: string
            homePhone:
              description: |
                Home phone number, 40 characters or less.
              type: string
            lastName:
              description: |
                Last name, 100 characters or less.
              type: string
            mobilePhone:
              description: |
                Mobile phone number, 40 characters or less.
              type: string
            nickname:
              description: |
                Nickname for this contact
              type: string
            otherPhone:
              description: |
                Other phone number, 40 characters or less.
              type: string
            otherPhoneType:
              description: |
                Possible values are: `Work`, `Mobile`, `Home`, `Other`.
              type: string
            personalEmail:
              description: |
                Personal email address, 80 characters or less.
              type: string
            state:
              description: |
                State; must be a valid state or province name or 2-character abbreviation. If using Zuora Tax, be aware that Zuora tax requires a state (in the US) or province (in Canada) in this field for the sold-to contact to calculate tax, and that a bill-to contact may be used if no sold-to contact is provided.
              type: string
            taxRegion:
              description: |
                If using Zuora Tax, a region string as optionally defined in your tax rules. Not required.
              type: string
            workEmail:
              description: |
                Work email address, 80 characters or less.
              type: string
            workPhone:
              description: |
                Work phone number, 40 characters or less.
              type: string
            zipCode:
              description: |
                Zip code, 20 characters or less.
              type: string
          required:
            - firstName
            - lastName
          type: object
        - $ref: "#/components/schemas/ContactObjectCustomFields"
      description: |
        Container for bill-to contact information for this account. If you do not provide a sold-to contact, the bill-to contact is copied to sold-to contact. Once the sold-to contact is created, changes to billToContact will not affect soldToContact and vice versa.
      title: Contact
    POSTAccountTypeCreditCard:
      allOf:
        - properties:
            cardHolderInfo:
              description: |
                Container for cardholder information. If provided, Zuora
                      will only use this information for this card.  If not provided, Zuora
                      will use the account''s existing bill-to contact information for this
                      card.
              properties:
                addressLine1:
                  description: |
                    First address line, 255 characters or less.
                  type: string
                addressLine2:
                  description: |
                    Second address line, 255 characters or less.
                  type: string
                cardHolderName:
                  description: |
                    The card holder's full name as it appears on the card, e.g., "John J Smith", 50 characters or less.
                  type: string
                city:
                  description: |
                    City, 40 characters or less.
                  type: string
                country:
                  description: |
                    Country; must be a valid country name or abbreviation.
                  type: string
                email:
                  description: |
                    Card holder's email address, 80 characters or less.
                  type: string
                phone:
                  description: |
                    Phone number, 40 characters or less.
                  type: string
                state:
                  description: |
                    State; must be a valid state name or 2-character abbreviation.
                  type: string
                zipCode:
                  description: |
                    Zip code, 20 characters or less.
                  type: string
              required:
                - addressLine1
                - cardHolderName
                - city
                - country
                - state
                - zipCode
            cardNumber:
              description: |
                Card number, up to 16 characters. Once created, this field can't be updated or queried, and is only available in masked format (e.g., XXXX-XXXX-XXXX-1234).
              type: string
            cardType:
              description: |
                The type of the credit card.

                Possible values  include `Visa`, `MasterCard`, `AmericanExpress`, `Discover`, `JCB`, and `Diners`. For more information about credit card types supported by different payment gateways, see [Supported Payment Gateways](https://knowledgecenter.zuora.com/CB_Billing/M_Payment_Gateways/Supported_Payment_Gateways).
              type: string
            expirationMonth:
              description: |
                Two-digit expiration month (01-12).
              type: string
            expirationYear:
              description: |
                Four-digit expiration year.
              type: string
            securityCode:
              description: |
                The CVV or CVV2 security code of the card. To ensure PCI compliance, this value is not stored and cannot be queried.
              type: string
          required:
            - cardHolderInfo
            - cardNumber
            - cardType
            - expirationMonth
            - expirationYear
          type: object
        - $ref: "#/components/schemas/PaymentMethodObjectCustomFields"
      description: |
        **Note:** This field has been deprecated, and is currently available only for backward compatibility. Use the `paymentMethod` field instead to create a payment method associated with this account.

        Container for information on a credit card to associate with this account. 
          If the `autoPay` field is set to `true`, you must provide either this field or the `hpmCreditCardPaymentMethodId` field, but not both.
      title: creditCard
    POSTAccountTypePaymentMethod:
      allOf:
        - properties:
            type:
              description: |
                Type of payment method. Possible values include:

                * `PayPalEC` - PayPal Express Checkout payment method. Use this type if you are using a [PayPal Payflow Pro Gateway](https://knowledgecenter.zuora.com/CB_Billing/M_Payment_Gateways/Supported_Payment_Gateways/PayPal_Payflow_Pro%2C_Website_Payments_Payflow_Edition%2C_Website_Pro_Payment_Gateway) instance.
                * `PayPalNativeEC` - PayPal Native Express Checkout payment method. Use this type if you are using a [PayPal Express Checkout Gateway](https://knowledgecenter.zuora.com/CB_Billing/M_Payment_Gateways/Supported_Payment_Gateways/PayPal_Express_Checkout_Gateway) instance.
                * `PayPalAdaptive` - PayPal Adaptive payment method. Use this type if you are using a [PayPal Adaptive Payment Gateway](https://knowledgecenter.zuora.com/CB_Billing/M_Payment_Gateways/Supported_Payment_Gateways/PayPal_Adaptive_Payments_Gateway) instance.
                * `CreditCard` - Credit card payment method.
                * `ACH` - ACH payment method.
                * `SEPA` - Single Euro Payments Area.
                * `Betalingsservice` - Direct Debit DK.
                * `Autogiro` - Direct Debit SE.
                * `Bacs` - Direct Debit UK.
                * You can also specify a custom payment method type. This type is only available if the Universal Payment Connector and Open Payment Method services are enabled. See [Set up custom payment gateways and payment methods](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/MB_Set_up_custom_payment_gateways_and_payment_methods) for details.
              type: string
          required:
            - type
          type: object
        - $ref: "#/components/schemas/CreatePMPayPalECPayPalNativeEC"
        - $ref: "#/components/schemas/CreatePaymentMethodPayPalAdaptive"
        - $ref: "#/components/schemas/CreatePaymentMethodCreditCard"
        - $ref: "#/components/schemas/CreatePaymentMethodACH"
        - $ref: "#/components/schemas/CreatePaymentMethodCommon"
        - $ref: "#/components/schemas/PaymentMethodObjectCustomFields"
        - $ref: "#/components/schemas/CreatePaymentMethodBankTransfer"
      description: |
        Container for information on payment methods to associate with this account. To create a credit card payment method when creating an account, Zuora recommends that you use this field instead of the `creditCard` field.

        Note that you can not use this field together with `creditCard` or `hpmCreditCardPaymentMethodId` to create a payment method.
      title: paymentMethod
    POSTAccountTypeSoldToContact:
      allOf:
        - properties:
            address1:
              description: |
                First address line, 255 characters or less.
              type: string
            address2:
              description: |
                Second address line, 255 characters or less.
              type: string
            city:
              description: |
                City, 40 characters or less.
              type: string
            country:
              description: |
                Country; must be a valid country name or abbreviation. If using Zuora Tax, you must specify a country in the sold-to contact to calculate tax. A bill-to contact may be used if no sold-to contact is provided.
              type: string
            county:
              description: |
                County; 32 characters or less. May optionally be used by Zuora Tax to calculate county tax.
              type: string
            fax:
              description: |
                Fax phone number, 40 characters or less.
              type: string
            firstName:
              description: |
                First name, 100 characters or less.
              type: string
            homePhone:
              description: |
                Home phone number, 40 characters or less.
              type: string
            lastName:
              description: |
                Last name, 100 characters or less.
              type: string
            mobilePhone:
              description: |
                Mobile phone number, 40 characters or less.
              type: string
            nickname:
              description: |
                Nickname for this contact
              type: string
            otherPhone:
              description: |
                Other phone number, 40 characters or less.
              type: string
            otherPhoneType:
              description: |
                Possible values are: `Work`, `Mobile`, `Home`, `Other`.
              type: string
            personalEmail:
              description: |
                Personal email address, 80 characters or less.
              type: string
            state:
              description: |
                State; must be a valid state or province name or 2-character abbreviation. If using Zuora Tax, be aware that Zuora Tax requires a state (in the US) or province (in Canada) in this field for the sold-to contact to calculate tax, and that a bill-to contact may be used if no sold-to contact is provided.
              type: string
            taxRegion:
              description: |
                If using Zuora Tax, a region string as optionally defined in your tax rules. Not required.
              type: string
            workEmail:
              description: |
                Work email address, 80 characters or less.
              type: string
            workPhone:
              description: |
                Work phone number, 40 characters or less.
              type: string
            zipCode:
              description: |
                Zip code, 20 characters or less.
              type: string
          required:
            - firstName
            - lastName
          type: object
        - $ref: "#/components/schemas/ContactObjectCustomFields"
      description: |
        Container for optional sold-to contact; uses the same field structure as the bill-to contact (above). If a sold-to contact is not specified, one is created from the bill-to contact. Once created, these are two separate data entities, and future changes to one do not affect the other.
      title: Contact
    POSTAccountTypeSubscription:
      allOf:
        - properties:
            autoRenew:
              description: |
                If `true`, auto-renew is enabled. Default is `false`.
              type: boolean
            contractEffectiveDate:
              description: |
                Effective contract date for this subscription, as `yyyy-mm-dd`.
              format: date
              type: string
            customerAcceptanceDate:
              description: |
                The date on which the services or products within a subscription have been accepted by the customer, as `yyyy-mm-dd`.

                Default value is dependent on the value of other fields. See Notes section for more details.
              format: date
              type: string
            initialTerm:
              description: |
                Duration of the initial subscription term in whole months.  Default is 0. 
              format: int64
              type: integer
            invoiceOwnerAccountKey:
              description: |
                Invoice owner account number or ID.

                **Note:** This feature is in Limited Availability. If you wish to have access to the feature, submit a request at [Zuora Global Support](https://support.zuora.com). 
              type: string
            invoiceSeparately:
              description: |
                Separates a single subscription from other subscriptions and invoices the charge independently. 

                If the value is `true`, the subscription is billed separately from other subscriptions. If the value is `false`, the subscription is included with other subscriptions in the account invoice.
                The default value is `false`.

                Prerequisite: The default subscription setting `Enable Subscriptions to be Invoiced Separately` must be set to `Yes`.
              type: boolean
            notes:
              description: ""
              type: string
            renewalTerm:
              description: |
                Duration of the renewal term in whole months. Default is 0.
              format: int64
              type: integer
            serviceActivationDate:
              description: |
                The date on which the services or products within a subscription have been activated and access has been provided to the customer, as `yyyy-mm-dd`.

                Default value is dependent on the value of other fields. See Notes section for more details.
              format: date
              type: string
            subscribeToRatePlans:
              description: |
                Container for one or more rate plans for this subscription.
              items:
                $ref: "#/components/schemas/POSTSrpCreateType"
              type: array
            subscriptionNumber:
              description: |
                Subscription Number. The value can be up to 1000 characters.

                If you do not specify a subscription number when creating a subscription for the new account, Zuora will generate a subscription number automatically.

                If the account is created successfully, the subscription number is returned in the `subscriptionNumber` response field.
              type: string
            termStartDate:
              description: |
                The date on which the subscription term begins, as `yyyy-mm-dd`. If this is a renewal subscription, this date is different from the subscription start date.
              format: date
              type: string
            termType:
              description: |
                Possible values are: `TERMED`, `EVERGREEN`.
              type: string
          required:
            - contractEffectiveDate
            - termType
          type: object
        - $ref: "#/components/schemas/SubscriptionObjectQTFields"
        - $ref: "#/components/schemas/SubscriptionObjectNSFields"
        - $ref: "#/components/schemas/SubscriptionObjectCustomFields"
      description: |
        Container for subscription information, used if creating a subscription for the new account at the time of account creation.
      title: subscription
    POSTAccountingCodeResponseType:
      properties:
        id:
          description: |
            ID of the newly created accounting code.
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    POSTAccountingCodeType:
      allOf:
        - properties:
            glAccountName:
              description: |
                Name of the account in your general ledger.

                Field only available if you have Zuora Finance enabled. Maximum of 255 characters.
              type: string
            glAccountNumber:
              description: |
                Account number in your general ledger.

                Field only available if you have Zuora Finance enabled. Maximum of 255 characters.
              type: string
            name:
              description: |
                Name of the accounting code.

                Accounting code name must be unique. Maximum of 100 characters.
              type: string
            notes:
              description: |
                Maximum of 2,000 characters.
              type: string
            type:
              description: |
                Accounting code type. You cannot create new accounting codes of type `AccountsReceivable`. 

                Note that `On-Account Receivable` is only available if you enable the Invoice Settlement feature. 
              enum:
                - AccountsReceivable
                - On-Account Receivable
                - Cash
                - OtherAssets
                - CustomerCashOnAccount
                - DeferredRevenue
                - SalesTaxPayable
                - OtherLiabilities
                - SalesRevenue
                - SalesDiscounts
                - OtherRevenue
                - OtherEquity
                - BadDebt
                - OtherExpenses
              type: string
          required:
            - name
            - type
          type: object
        - $ref: "#/components/schemas/AccountingCodeObjectCustomFields"
      example:
        name: CASH
        type: Cash
    POSTAccountingPeriodResponseType:
      properties:
        id:
          description: |
            ID of the newly-created accounting period.
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    POSTAccountingPeriodType:
      allOf:
        - properties:
            endDate:
              description: |
                The end date of the accounting period in yyyy-mm-dd format, for example, "2016-02-19".
              format: date
              type: string
            fiscalYear:
              description: |
                Fiscal year of the accounting period in yyyy format, for example, "2016".
              type: string
            fiscal_quarter:
              description: ""
              format: int64
              type: integer
            name:
              description: |
                Name of the accounting period.

                Accounting period name must be unique. Maximum of 100 characters.
              type: string
            notes:
              description: |
                Notes about the accounting period.

                Maximum of 255 characters.
              type: string
            startDate:
              description: |
                The start date of the accounting period in yyyy-mm-dd format, for example, "2016-02-19".
              format: date
              type: string
          required:
            - name
            - startDate
            - endDate
            - fiscalYear
          type: object
        - $ref: "#/components/schemas/AccountingPeriodObjectCustomFields"
      example:
        endDate: 2016-06-30
        fiscalYear: 2016
        name: Jun 2016
        notes: optional notes here
        startDate: 2016-06-01
    POSTAttachmentResponseType:
      properties:
        fileId:
          description: |
            ID to identify the attached file. Use this file ID with [Get files](https://www.zuora.com/developer/api-reference/#operation/GET_Files) to download the file.
          type: string
        id:
          description: |
            Attachment id.
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    POSTAuthorizeResponse:
      example:
        gatewayOrderId: A001
        resultCode: 0
        resultMessage: "Request ID: 5231719060426316203012"
        success: true
        transactionId: "5231719060426316203012"
      properties:
        gatewayOrderId:
          description: The order ID for the gateway.
          type: string
        resultCode:
          description: The result code of the request. 0 indicates the call succeeded, and other values indicate the call failed.
          type: string
        resultMessage:
          description: The corresponding request ID.
          type: string
        success:
          description: Indicates whether the call succeeded.
          type: boolean
        transactionId:
          description: The ID of the transaction.
          type: string
      type: object
    POSTBillingDocumentFilesDeletionJobRequest:
      example:
        accountIds:
          - 4028905558b483220158b48983dd0015
          - 6028905558b483220158b68983dd0016
      properties:
        accountIds:
          description: |
            Container for the IDs of the accounts that you want to create the billing document files deletion job for. 
          items:
            type: string
          type: array
      type: object
    POSTBillingDocumentFilesDeletionJobResponse:
      properties:
        id:
          description: |
            The unique ID of the billing document file deletion job.
          type: string
        status:
          description: |
            The status of the billing document file deletion job.
          enum:
            - Pending
          type: string
        success:
          description: Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    POSTBillingPreviewCreditMemoItem:
      properties:
        amount:
          description: |
            The amount of the credit memo item. For tax-inclusive credit memo items, the amount indicates the credit memo item amount including tax. For tax-exclusive credit memo items, the amount indicates the credit memo item amount excluding tax
          format: double
          type: number
        amountWithoutTax:
          description: |
            The credit memo item amount excluding tax.
          format: double
          type: number
        appliedToItemId:
          description: |
            The unique ID of the credit memo item that the discount charge is applied to.
          type: string
        chargeDate:
          description: |
            The date when the credit memo item is created.
          format: date-time
          type: string
        chargeNumber:
          description: |
            Number of the charge.
          type: string
        chargeType:
          description: |
            The type of charge. 

            Possible values are `OneTime`, `Recurring`, and `Usage`.
          type: string
        comment:
          description: |
            Comment of the credit memo item.
          type: string
        id:
          description: |
            Credit memo item id.
          type: string
        processingType:
          description: |
            Identifies the kind of charge. 

            Possible values:
            * charge
            * discount
            * prepayment
            * tax
          type: string
        quantity:
          description: |
            Quantity of this item, in the configured unit of measure for the charge.
          format: decimal
          type: string
        ratePlanChargeId:
          description: |
            Id of the rate plan charge associated with this item.
          type: string
        serviceEndDate:
          description: |
            End date of the service period for this item, i.e., the last day of the service period, in yyyy-mm-dd format.
          format: date
          type: string
        serviceStartDate:
          description: |
            Start date of the service period for this item, in yyyy-mm-dd format. If the charge is a one-time fee, this is the date of that charge.
          format: date
          type: string
        sku:
          description: |
            Unique SKU for the product associated with this item.
          type: string
        skuName:
          description: |
            Name of the unique SKU for the product associated with this item.
          type: string
        subscriptionId:
          description: |
            ID of the subscription associated with this item.
          type: string
        subscriptionNumber:
          description: |
            Name of the subscription associated with this item.
          type: string
        unitOfMeasure:
          description: |
            Unit used to measure consumption.
          type: string
      title: creditMemoItems
      type: object
    POSTBillingPreviewInvoiceItem:
      properties:
        appliedToItemId:
          description: |
            The unique ID of the invoice item that the discount charge is applied to.
          type: string
        chargeAmount:
          description: |
            The amount of the charge. This amount doesn't include taxes regardless if the charge's tax mode is inclusive or exclusive.
          format: decimal
          type: string
        chargeDate:
          description: |
            The date when the invoice item was created.
          format: date-time
          type: string
        chargeDescription:
          description: |
            Description of the charge.
          type: string
        chargeId:
          description: |
            Id of the charge.
          type: string
        chargeName:
          description: |
            Name of the charge.
          type: string
        chargeNumber:
          description: |
            Number of the charge.
          type: string
        chargeType:
          description: |
            The type of charge. 

            Possible values are `OneTime`, `Recurring`, and `Usage`.
          type: string
        id:
          description: |
            Invoice item ID.
          type: string
        processingType:
          description: |-
            Identifies the kind of charge. 

            Possible values:
            * charge
            * discount
            * prepayment
            * tax
          type: string
        productName:
          description: |
            Name of the product associated with this item.
          type: string
        quantity:
          description: |
            Quantity of this item, in the configured unit of measure for the charge.
          format: decimal
          type: string
        serviceEndDate:
          description: |
            End date of the service period for this item, i.e., the last day of the service period, in `yyyy-mm-dd` format.
          format: date
          type: string
        serviceStartDate:
          description: |
            Start date of the service period for this item, in `yyyy-mm-dd` format. If the charge is a one-time fee, this is the date of that charge.
          format: date
          type: string
        subscriptionId:
          description: |
            ID of the subscription associated with this item.
          type: string
        subscriptionName:
          description: |
            Name of the subscription associated with this item.
          type: string
        subscriptionNumber:
          description: |
            Number of the subscription associated with this item.
          type: string
        taxAmount:
          description: |
            Tax applied to the charge. This field returns `0` becasue the BillingPreview operation does not calculate taxes for charges in the subscription.
          format: decimal
          type: string
        unitOfMeasure:
          description: |
            Unit used to measure consumption.
          type: string
      title: invoiceItems
      type: object
    POSTCatalogType:
      example:
        targetEntityIds:
          - 8a80825555a3c7a10155b460f53858e6
      properties:
        toEntityIds:
          description: |
            The entity that you want to share the product with.
          items:
            title: Entity IDs
            type: string
          type: array
      required:
        - toEntityIds
      type: object
    POSTDecryptResponseType:
      properties:
        decryptedSignature:
          description: |
            The string of a list of the following items: Payment Pages 2.0 URL, tenant ID, timestamp,the Payment Page ID

            The items are separated by '#', e.g., "/apps/publichostedpagelite.do#12271#rvBp1AxBJwk6FrT7aqFuABIINiRbwJCc
            #1418848373103#2c92c0f948f899"
          type: string
        publicKey:
          description: |
            The public key passed in as a request parameter.
          type: string
        signature:
          description: |
            The signature passed in as a request parameter.
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    POSTDecryptionType:
      example:
        method: POST
        publicKey: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmWRFTwxQOqaG4JDZSQF/NJWvCDoSXm3TYilNzoN8nBbuvhKa7SZBBS+VP6rFqcbIU38Fu+Rf09vqyYOxuasPJe7yhqeOiStWB/aCPLhwXBeKt37L/qkwpNOKb1FETtUgrc+UjbtT0pnl55wCfi+Ik//X5SQi0B+c0ei1DQv99qmPJJErrhnBtdxeaWAT0EYAo42AOQ5cp0UWDY6OdOYL6+RyFOUFIs1yEgtfg4VMMSpSOKBOhYclQYuSC7nBF5Cc18ydtzsBpf7l49gCLTFzG45NCDAocada8KihFNpGXbauV9V4EPRD4lofaXdsXJ5Tw8/+KCsrUlvIQI3vcEv9LQIDAQAB
        signature: BeNYuHFkp/sbfm3clYyCkKEqd7XVTRDOJ1/5rL0tpkqxiSq+maqYkDz5kA+lN64ipoefQuJ7Rdm5TpICErufeJfa2sfTmGARDJ0hr+StXfLsIxHmDoNH5dqcXv3W6MR4kaljEqPVuhzGQ0We98DG52JcHWqqN53oHwTyuZuXocQqnmiE23IPm8UrU3g4hX/OLat0R81wDQ1SslZ+4pnqlncpTpopCK4FxeG3B0gYMhZcYd17Cmf0N3tEHVXHDlJIm4rOx0OVT+YBnjbKYLM0jxYu7PRKRis+yzN1BoappOEB0gmPjznIeiYF0u/fJdZWoEwK7d9mrfJeOBbpFyRoHA==
      properties:
        method:
          description: |
            The type of the request. Set it to POST.
          type: string
        publicKey:
          description: |
            The public key generated by Zuora.
          type: string
        signature:
          description: |
            The signature generated by Zuora.
          type: string
      required:
        - method
        - publicKey
        - signature
      type: object
    POSTDelayAuthorizeCapture:
      example:
        accountId: 402881e861bd8a7e0161c6a453750026
        accountNumber: A00000004
        amount: 1.99
        gatewayOrderId: A001
        softDescriptor: Service fee
        softDescriptorPhone: 400-000-1234
      properties:
        accountId:
          description: The ID of the customer account.
          type: string
        accountNumber:
          description: The number of the customer account.
          type: string
        amount:
          description: The amount of the trasaction.
          type: number
        gatewayOrderId:
          description: The order ID for the specific gateway.
          type: string
        mitTransactionSource:
          description: |
            Payment transaction source used to differentiate the transaction source in Stored Credential Transaction framework.
              - `C_Unscheduled`: Cardholder-initiated transaction (CIT) that does not occur on scheduled or regularly occurring dates.
              - `M_Recurring`: Merchant-initiated transaction (MIT) that occurs at regular intervals.
              - `M_Unscheduled`: Merchant-initiated transaction (MIT) that does not occur on scheduled or regularly occurring dates.
          enum:
            - C_Unscheduled
            - M_Recurring
            - M_Unscheduled
          type: string
        softDescriptor:
          description: A text, rendered on a cardholder’s statement, describing a particular product or service purchased by the cardholder.
          type: string
        softDescriptorPhone:
          description: The phone number that relates to the soft descriptor, usually the phone number of customer service.
          type: string
      required:
        - accountId
        - accountNumber
        - amount
        - gatewayOrderId
      type: object
    POSTDistributionItemType:
      properties:
        accountingPeriodName:
          description: |
            Name of the accounting period. The open-ended accounting period is named `Open-Ended`. 

            The accounting period must be open.
          type: string
        newAmount:
          description: |
            Amount of revenue you want to distribute into the accounting period.

            The value must be formatted based on the currency, for example, `JPY 30` or `USD 30.15`. If the value is formatted incorrectly, the following error message is returned: `Allocation amount with wrong decimal places.`
          format: decimal
          type: string
      required:
        - accountingPeriodName
        - newAmount
      title: revenueDistributions
      type: object
    POSTDocumentPropertiesType:
      example:
        customFileName: testCreditMemo
        documentId: 40288af1614cee0b01614cf2ec25000a
        documentType: CreditMemo
      properties:
        customFileName:
          description: |
            The custom file name to use to generate new Word or PDF files for the billing document.
          type: string
        documentId:
          description: |
            The unique ID of a billing document that you want to create document properties for.
          type: string
        documentType:
          description: |
            The type of the billing document. 
          enum:
            - Invoice
            - CreditMemo
            - DebitMemo
          type: string
      type: object
    POSTEmailBillingDocfromBillRunType:
      example:
        resend: "true"
      properties:
        resend:
          default: false
          description: |
            Whether to send out emails for all the billing documents that are associated with the bill run. If the value is `false`, emails are sent out only for the billing documents that never have emails sent out.
          type: boolean
      type: object
    POSTEntityConnectionsResponseType:
      properties:
        id:
          description: |
            The ID of the connection that you just initiated.
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    POSTEntityConnectionsType:
      example:
        targetEntityId: 8a80825556ff28a4015708ba29312ecc
      properties:
        targetEntityId:
          description: |
            The ID of the target entity that you want to connect with. You can get the entity Id using the Multi-entity: Get entities call.
          maxLength: 32
          type: string
      required:
        - targetEntityId
      type: object
    POSTHMACSignatureResponseType:
      properties:
        signature:
          description: |
            Contains a keyed-hash message authentication code (HMAC)
            e.g. `ZmI0ZjE2ZTMxMWY1YjA0ZTc4MTg1ZDhlYWRkMTEwNDE3M2RiMzNiNQ==<`
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
        token:
          description: |
            Contains a token code. e.g. `gCH6gYqQffQCsFKSLuxyagXsuXcIK0uf`
          type: string
      type: object
    POSTHMACSignatureType:
      example:
        accountKey: A00000001
        method: POST
        uri: https://rest.zuora.com/v1/payment-methods/credit-cards
      properties:
        accountKey:
          description: |
            Customer account number or ID.

            Specifies this field only when creating signatures for Create payment method.
          type: string
        method:
          description: |
            Possible values are: 'GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'.
          type: string
        name:
          description: |
            Account name.

            Specifies this field only when creating signatures for Create account.
          type: string
        pageId:
          description: |
            The page id of your Payment Pages 2.0 form. Click **Show Page Id** next to the Payment Page name in the Hosted Page List to retrieve the page id.

            Specifies this field only when creating signatures for RSA Signatures.
          type: string
        uri:
          description: |
            The URI of the API object the customer will make a CORS enabled call to.
            e.g. "https://rest.zuora.com/v1/payment-methods/credit-cards"
          type: string
      required:
        - uri
        - method
      type: object
    POSTInvoiceCollectCreditMemosType:
      properties:
        id:
          description: |
            The ID of the credit memo.
          type: string
        memoAmount:
          description: |
            The amount of the credit memo.
          format: decimal
          type: string
        memoNumber:
          description: |
            The unique identification number of the credit memo.
          type: string
      title: creditMemos
      type: object
    POSTInvoiceCollectInvoicesType:
      properties:
        invoiceAmount:
          description: |
            The amount of the invoice.
          format: decimal
          type: string
        invoiceId:
          description: |
            The ID of the invoice.
          type: string
        invoiceNumber:
          description: |
            The unique identification number of the invoice.
          type: string
      title: invoices
      type: object
    POSTInvoiceCollectResponseType:
      properties:
        amountCollected:
          description: |
            Payment amount applied.
          format: decimal
          type: string
        creditMemos:
          description: |
            Information on one or more credit memos associated with this operation.
          items:
            $ref: "#/components/schemas/POSTInvoiceCollectCreditMemosType"
          type: array
        invoices:
          description: |
            Information on one or more invoices associated with this operation.
          items:
            $ref: "#/components/schemas/POSTInvoiceCollectInvoicesType"
          type: array
        paymentId:
          description: |
            Payment ID.
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    POSTInvoiceCollectType:
      example:
        accountKey: 4028925a4cb74ec9014cb7520fc00005
        invoiceId: 4028925a4cb74ec9014cb7540988002e
        paymentGateway: TestGateway
      properties:
        accountKey:
          description: |
            Customer account ID or account number.
          type: string
        documentDate:
          description: |
            The date that should appear on the invoice and credit memo being generated,
            in `yyyy-mm-dd` format. If this field is omitted
            and `invoiceId` is not specified, the current date is used by default. 


            **Note:** The credit memo is only available if you have the Invoice Settlement feature enabled.


            This field is in Zuora REST API version control. Supported minor
            versions are `215.0` and later. To use this field in the method, you
            must set the  `zuora-version` parameter to the minor version number in
            the request header.
          format: date
          type: string
        invoiceDate:
          description: |
            **Note:** This field has been replaced by the `documentDate` field in Zuora REST API version `215.0` and later. The
            `invoiceDate` field is only available for backward
            compatibility.

            The date that should appear on the invoice being generated,
            in `yyyy-mm-dd` format. If this field is omitted
            and `invoiceId` is not specified, the current date is used by default. 

            This field is in Zuora REST API version control. Supported minor
            versions are `214.0` and earlier.
          format: date
          type: string
        invoiceId:
          description: |
            The ID of an existing invoice for which to collect payment using
            the account's default payment method. If this value is specified, no new
            invoice is generated, and the following fields are ignored:
              - `invoiceDate` and `invoiceTargetDate` (if the Zuora REST API version is 214.0 or earlier)
              - `documentDate` and `targetDate` (if the Zuora REST API version is 215.0 or later)
          type: string
        invoiceTargetDate:
          description: |
            **Note:** This field has been replaced by the `targetDate` field in Zuora REST API version `215.0` and later. The
            `invoiceTargetDate` field is only available for backward
            compatibility.


            The date through which to calculate charges on this account if an invoice is generated, in `yyyy-mm-dd` format. If this field is omitted
            and `invoiceId` is not specified, the current date is used by default. 


            This field is in Zuora REST API version control. Supported minor
            versions are `214.0` and earlier.  
          format: date
          type: string
        paymentGateway:
          description: |
            The name of the gateway that will be used for the payment. Must be a valid gateway name and the gateway must support the specific payment method. If a value is not specified, the default gateway on the Account will be used.
          type: string
        targetDate:
          description: |
            The date through which to calculate charges on this account if an invoice or a credit memo is generated, 
            in `yyyy-mm-dd` format. If this field is omitted
            and `invoiceId` is not specified, the current date is used by default. 


            **Note:** The credit memo is only available if you have the Invoice Settlement feature enabled.


            This field is in Zuora REST API version control. Supported minor
            versions are `215.0` and later. To use this field in the method, you
            must set the  `zuora-version` parameter to the minor version number in
            the request header.
          format: date
          type: string
      required:
        - accountKey
      type: object
    POSTJournalEntryItemType:
      allOf:
        - properties:
            accountingCodeName:
              description: |
                Name of the accounting code.
              type: string
            accountingCodeType:
              description: |
                Accounting code type. This field is required if `accountingCodeName` is not unique.

                Note that `On-Account Receivable` is only available if you enable the Invoice Settlement feature. 
              enum:
                - AccountsReceivable
                - On-Account Receivable
                - Cash
                - OtherAssets
                - CustomerCashOnAccount
                - DeferredRevenue
                - SalesTaxPayable
                - OtherLiabilities
                - SalesRevenue
                - SalesDiscounts
                - OtherRevenue
                - OtherEquity
                - BadDebt
                - OtherExpenses
              type: string
            amount:
              description: |
                Journal entry item amount in transaction currency.
              format: decimal
              type: string
            homeCurrencyAmount:
              description: |
                Journal entry item amount in home currency.

                This field is required if you have set your home currency for foreign currency conversion. Otherwise, do not pass this field.
              format: decimal
              type: string
            type:
              description: "Type of journal entry item. "
              enum:
                - Credit
                - Debit
              type: string
          required:
            - accountingCodeName
            - type
            - amount
          type: object
        - $ref: "#/components/schemas/JournalEntryItemObjectCustomFields"
      title: journalEntryItems
    POSTJournalEntryResponseType:
      properties:
        journalEntryNumber:
          description: |
            Journal entry number in the format JE-00000001.
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    POSTJournalEntrySegmentType:
      properties:
        segmentName:
          description: "Name of segment. You must use the segment name that has already been specified in the default segment rule. In addition, segments need to be passed in the order where they were defined in the segmentation rule. If multiple segments are configured in the default rule, you need to specify all of them in order. "
          type: string
        segmentValue:
          description: |
            Value of segment in this summary journal entry.
          type: string
      required:
        - segmentName
        - segmentValue
      title: segments
      type: object
    POSTJournalEntryType:
      allOf:
        - properties:
            accountingPeriodName:
              description: |
                Name of the accounting period. The open-ended accounting period is named `Open-Ended`.
              type: string
            currency:
              description: |
                The type of currency used. Currency must be active.
              type: string
            journalEntryDate:
              description: |
                Date of the journal entry.
              format: date
              type: string
            journalEntryItems:
              description: |
                Key name that represents the list of journal entry items.
              items:
                $ref: "#/components/schemas/POSTJournalEntryItemType"
              type: array
            notes:
              description: |
                The number associated with the revenue event.

                Character limit: 2,000
              type: string
            segments:
              description: |
                List of segments that apply to the summary journal entry.
              items:
                $ref: "#/components/schemas/POSTJournalEntrySegmentType"
              type: array
            transferredToAccounting:
              description: |
                Status shows whether the journal entry has been transferred to an accounting system.
              enum:
                - No
                - Processing
                - Yes
                - Error
                - Ignore
              type: string
          required:
            - journalEntryDate
            - accountingPeriodName
            - currency
            - journalEntryItems
          type: object
        - $ref: "#/components/schemas/JournalEntryObjectCustomFields"
      example:
        accountingPeriodName: Nov-2014
        currency: USD
        journalEntryDate: 2014-09-09
        journalEntryItems:
          - accountingCodeName: Accounts Receivable
            accountingCodeType: Deferred Revenue
            amount: "400.9"
            homeCurrencyAmount: "801.8"
            type: Credit
          - accountingCodeName: Subscription Revenue
            accountingCodeType: Sales Revenue
            amount: "400.9"
            homeCurrencyAmount: "801.8"
            type: Debit
        notes: my account
        segments:
          - segmentName: billToCountry
            segmentValue: United States
          - segmentName: billToState
            segmentValue: California
        transferredToAccounting: No
    POSTJournalRunResponseType:
      properties:
        journalRunNumber:
          description: |
            Journal run number.
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    POSTJournalRunTransactionType:
      properties:
        type:
          description: |
            Transaction type. Invoice Adjustment is deprecated on Production. Zuora recommends that you use the Invoice Item Adjustment instead.

            If you enable the Invoice Settlement feature, Debit Memo Item, Credit Memo Item, and Credit Memo Application Item are available, Payment and Refund will be replaced by Payment Application and Refund Application. 

            If you enable both the Invoice Settlement feature and the Invoice Item Settlement feature, Payment and Refund will be replaced by Payment Application Item and Refund Application Item. 
          enum:
            - Invoice Item
            - Taxation Item
            - Invoice Item Adjustment (Invoice)
            - Invoice Item Adjustment (Tax)
            - Invoice Adjustment
            - Electronic Payment
            - External Payment
            - Electronic Refund
            - External Refund
            - Electronic Credit Balance Payment
            - External Credit Balance Payment
            - Electronic Credit Balance Refund
            - External Credit Balance Refund
            - Credit Balance Adjustment (Applied from Credit Balance)
            - Credit Balance Adjustment (Transferred to Credit Balance)
            - Revenue Event Item
            - Debit Memo Item (Charge)
            - Debit Memo Item (Tax)
            - Credit Memo Item (Charge)
            - Credit Memo Item (Tax)
            - Credit Memo Application Item
            - Electronic Payment Application
            - External Payment Application
            - Electronic Refund Application
            - External Refund Application
            - Electronic Payment Application Item
            - External Payment Application Item
            - Electronic Refund Application Item
            - External Refund Application Item
          type: string
      required:
        - type
      title: transactionTypes
      type: object
    POSTJournalRunType:
      example:
        accountingPeriodName: Nov-2014
        journalEntryDate: 2014-11-04
        transactionTypes:
          - type: Invoice Item
          - type: Revenue Event Item
      properties:
        accountingPeriodName:
          description: |
            Name of the accounting period.

            This field determines the target start and end dates of the journal run.

            Required if you do not include `targetStartDate` and `targetEndDate`.
          type: string
        journalEntryDate:
          description: |
            Date of the journal entry.
          format: date
          type: string
        targetEndDate:
          description: |
            The target end date of the journal run.

            If you include `accountingPeriodName`, the `targetEndDate` must be empty or the same as the end date of the accounting period specified in `accountingPeriodName`.
          format: date
          type: string
        targetStartDate:
          description: |
            The target start date of the journal run.

            Required if you include targetEndDate.

            If you include `accountingPeriodName`, the `targetStartDate` must be empty or the same as the start date of the accounting period specified in `accountingPeriodName`.
          format: date
          type: string
        transactionTypes:
          description: |
            Transaction types included in the journal run.

            You can include one or more transaction types.
          items:
            $ref: "#/components/schemas/POSTJournalRunTransactionType"
          type: array
      required:
        - transactionTypes
        - journalEntryDate
      type: object
    POSTMassUpdateResponseType:
      properties:
        bulkKey:
          description: |
            String of 32 characters that identifies the mass action. The bulkKey is generated before the mass action is processed. You can use the bulkKey to Get the Mass Action Result.
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    POSTMemoPdfResponse:
      properties:
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    POSTOrderPreviewRequestType:
      example:
        customFields: {}
        description: This is a description for the Order.
        existingAccountNumber: A00000101
        orderDate: 2018-10-01
        orderLineItems:
          - amountPerUnit: 50
            billingTrigger: BillImmediately
            customFields:
              someField__c: some string
            deferredRevenueAccountingCode: Unearned Revenues
            description: With Dual Stereo Microphones, HD 1080p, Black
            itemName: webcam
            itemType: Product
            listPricePerUnit: 59
            productCode: C9201
            purchaseOrderNumber: 960-000764
            quantity: 2
            recognizedRevenueAccountingCode: Earned Revenues
            revenueRecognitionRule: recognized upon invoice
            taxCode: "8018"
            taxMode: TaxInclusive
            transactionDate: 2021-02-01
        previewOptions:
          previewThruType: SpecificDate
          previewTypes:
            - OrderMetrics
            - BillingDocs
            - ChargeMetrics
          specificPreviewThruDate: 2019-01-01
        subscriptions:
          - orderActions:
              - triggerDates:
                  - name: ContractEffective
                    triggerDate: 2018-12-01
                  - name: ServiceActivation
                    triggerDate: 2018-12-01
                  - name: CustomerAcceptance
                    triggerDate: 2018-12-01
                type: UpdateProduct
                updateProduct:
                  chargeUpdates:
                    - chargeNumber: C-00000210
                      pricing:
                        recurringPerUnit:
                          listPrice: 20
                  ratePlanId: 2c98919c67a5ae9d0167a68f8eb20262
            subscriptionNumber: A-S00000100
          - orderActions:
              - suspend:
                  suspendPolicy: Today
                triggerDates:
                  - name: ContractEffective
                    triggerDate: 2018-12-01
                  - name: ServiceActivation
                    triggerDate: 2018-12-01
                  - name: CustomerAcceptance
                    triggerDate: 2018-12-01
                type: Suspend
            subscriptionNumber: A-S00000101
          - orderActions:
              - resume:
                  extendsTerm: true
                  resumePeriods: 10
                  resumePeriodsType: Day
                  resumePolicy: FixedPeriodsFromSuspendDate
                triggerDates:
                  - name: ContractEffective
                    triggerDate: 2018-12-12
                  - name: ServiceActivation
                    triggerDate: 2018-12-12
                  - name: CustomerAcceptance
                    triggerDate: 2018-12-12
                type: Resume
            subscriptionNumber: A-S00000102
      properties:
        customFields:
          $ref: "#/components/schemas/OrderObjectCustomFields"
        description:
          description: A description of the order.
          maxLength: 500
          type: string
        existingAccountNumber:
          description: |
            The account number that this order will be created under. It can be either the accountNumber or the account info. It will return an error if both are specified.
            Note that invoice owner account of the subscriptions included in this order should be the same with the account of the order.
          maxLength: 70
          type: string
        orderDate:
          description: The date when the order is signed. All of the order actions under this order will use this order date as the contract effective date.
          format: date
          type: string
        orderLineItems:
          description: |
            [Order Line Items](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Line_Items/AA_Overview_of_Order_Line_Items) are non subscription based items created by an Order, representing transactional charges such as one-time fees, physical goods, or professional service charges that are not sold as subscription services. 

            With the Order Line Items feature enabled, you can now launch non-subscription and hybrid monetization business models in Zuora, in addition to subscription business models. 

            **Note:** The [Order Line Items](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Line_Items/AA_Overview_of_Order_Line_Items) feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. If you want to join this early adopter program, submit a request at [Zuora Global Support](https://support.zuora.com/). 
          items:
            $ref: "#/components/schemas/CreateOrderOrderLineItem"
          type: array
        orderNumber:
          description: The order number of this order.
          maxLength: 100
          type: string
        previewAccountInfo:
          $ref: "#/components/schemas/PreviewAccountInfo"
        previewOptions:
          $ref: "#/components/schemas/PreviewOptions"
        subscriptions:
          description: Each item includes a set of order actions, which will be applied to the same base subscription.
          items:
            properties:
              customFields:
                $ref: "#/components/schemas/SubscriptionObjectCustomFields"
              orderActions:
                description: The actions to be applied to the subscription. Order actions will be stored with the sequence when it was provided in the request.
                items:
                  $ref: "#/components/schemas/PreviewOrderOrderAction"
                type: array
              quote:
                $ref: "#/components/schemas/QuoteObjectFields"
              ramp:
                $ref: "#/components/schemas/RampRequest"
              subscriptionNumber:
                description: |
                  Leave this field empty to represent new subscription creation, or specify a subscription number to update an existing subscription.
                type: string
            type: object
          type: array
      required:
        - orderDate
        - subscriptions
        - previewOptions
      type: object
    POSTOrderRequestType:
      example:
        description: This is a description for the Order.
        existingAccountNumber: A00000001
        orderDate: 2017-01-01
        orderLineItems:
          - billingTrigger: BillImmediately
            chargeAmountPerUnit: 50
            customFields:
              someField__c: some string
            deferredRevenueAccountingCode: Unearned Revenues
            description: With Dual Stereo Microphones, HD 1080p, Black
            itemName: webcam
            itemType: Product
            listPricePerUnit: 59
            productCode: C9201
            purchaseOrderNumber: 960-000764
            quantity: 2
            recognizedRevenueAccountingCode: Earned Revenues
            revenueRecognitionRule: recognized upon invoice
            taxCode: "8018"
            taxMode: TaxInclusive
            transactionDate: 2021-02-01
        orderNumber: OM-00001
        processingOptions:
          applyCreditBalance: true
          billingOptions:
            targetDate: 2017-08-01
          collectPayment: true
          runBilling: true
        subscriptions:
          - orderActions:
              - createSubscription:
                  subscribeToRatePlans:
                    - productRatePlanId: efbff07e6290dfb8016291003bd00dda
                  subscriptionNumber: SM-00001
                  terms:
                    autoRenew: true
                    initialTerm:
                      period: 12
                      periodType: Month
                      startDate: 2017-01-01
                      termType: TERMED
                    renewalSetting: RENEW_WITH_SPECIFIC_TERM
                    renewalTerms:
                      - period: 12
                        periodType: Month
                triggerDates:
                  - name: ContractEffective
                    triggerDate: 2017-01-01
                type: CreateSubscription
          - orderActions:
              - createSubscription:
                  subscribeToRatePlans:
                    - productRatePlanId: efbff07e6290dfb8016291003bd00dda
                  subscriptionNumber: SM-00002
                  terms:
                    autoRenew: true
                    initialTerm:
                      period: 12
                      periodType: Month
                      startDate: 2017-02-01
                      termType: TERMED
                    renewalSetting: RENEW_WITH_SPECIFIC_TERM
                    renewalTerms:
                      - period: 12
                        periodType: Month
                triggerDates:
                  - name: ServiceActivation
                    triggerDate: 2017-02-01
                type: CreateSubscription
          - orderActions:
              - createSubscription:
                  subscribeToRatePlans:
                    - productRatePlanId: efbff07e6290dfb80162910024c80dd5
                  subscriptionNumber: SM-00003
                  terms:
                    autoRenew: true
                    initialTerm:
                      period: 12
                      periodType: Month
                      startDate: 2017-01-01
                      termType: TERMED
                    renewalSetting: RENEW_WITH_SPECIFIC_TERM
                    renewalTerms:
                      - period: 12
                        periodType: Month
                triggerDates:
                  - name: ServiceActivation
                    triggerDate: 2017-03-01
                  - name: CustomerAcceptance
                    triggerDate: 2017-04-01
                type: CreateSubscription
          - orderActions:
              - createSubscription:
                  subscribeToRatePlans:
                    - chargeOverrides:
                        - productRatePlanChargeId: efbff07e6290dfb80162910024d80dd7
                          startDate:
                            triggerEvent: SpecificDate
                      productRatePlanId: efbff07e6290dfb80162910024c80dd5
                      uniqueToken: Sugar-free Monthly
                  subscriptionNumber: SM-00004
                  terms:
                    autoRenew: true
                    initialTerm:
                      period: 12
                      periodType: Month
                      startDate: 2017-01-01
                      termType: TERMED
                    renewalSetting: RENEW_WITH_SPECIFIC_TERM
                    renewalTerms:
                      - period: 12
                        periodType: Month
                triggerDates:
                  - name: ServiceActivation
                    triggerDate: 2017-03-01
                  - name: CustomerAcceptance
                    triggerDate: 2017-04-01
                type: CreateSubscription
          - orderActions:
              - suspend:
                  suspendPeriods: 2
                  suspendPeriodsType: Week
                  suspendPolicy: FixedPeriodsFromToday
                triggerDates:
                  - name: ContractEffective
                    triggerDate: 2018-01-01
                  - name: ServiceActivation
                    triggerDate: 2018-01-01
                  - name: CustomerAcceptance
                    triggerDate: 2018-01-01
                type: Suspend
            subscriptionNumber: SM-00005
          - orderActions:
              - resume:
                  extendsTerm: true
                  resumePolicy: SpecificDate
                  resumeSpecificDate: 2018-10-01
                triggerDates:
                  - name: ContractEffective
                    triggerDate: 2018-01-01
                  - name: ServiceActivation
                    triggerDate: 2018-01-01
                  - name: CustomerAcceptance
                    triggerDate: 2018-01-01
                type: Resume
            subscriptionNumber: SM-00006
      properties:
        customFields:
          $ref: "#/components/schemas/OrderObjectCustomFields"
        description:
          description: A description of the order.
          maxLength: 500
          type: string
        existingAccountNumber:
          description: |
            The account number that this order will be created under. It can be either the accountNumber or the account info provided. It will return an error if both are specified.
            Note that this actually specifies the invoice owner account of the subscriptions included in this order.
          maxLength: 70
          type: string
        newAccount:
          $ref: "#/components/schemas/Account"
        orderDate:
          description: The date when the order is signed. All the order actions under this order will use this order date as the contract effective date if the contract effective date field is skipped or its value is left as null.
          format: date
          type: string
        orderLineItems:
          description: |
            [Order Line Items](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Line_Items/AA_Overview_of_Order_Line_Items) are non subscription based items created by an Order, representing transactional charges such as one-time fees, physical goods, or professional service charges that are not sold as subscription services. 

            With the Order Line Items feature enabled, you can now launch non-subscription and hybrid monetization business models in Zuora, in addition to subscription business models.

            **Note:** The [Order Line Items](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Line_Items/AA_Overview_of_Order_Line_Items) feature is in the **Early Adopter** phase. We are actively soliciting feedback from a small set of early adopters before releasing it as generally available. If you want to join this early adopter program, submit a request at [Zuora Global Support](https://support.zuora.com/). 
          items:
            $ref: "#/components/schemas/CreateOrderOrderLineItem"
          type: array
        orderNumber:
          description: The order number of the new order. If not provided, system will auto-generate a number for this order.
          maxLength: 100
          type: string
        processingOptions:
          $ref: "#/components/schemas/ProcessingOptions"
        subscriptions:
          description: Each item includes a set of order actions, which will be applied to the same base subscription.
          items:
            properties:
              customFields:
                $ref: "#/components/schemas/SubscriptionObjectCustomFields"
              orderActions:
                description: The actions to be applied to the subscription. Order actions will be stored with the sequence when it was provided in the request.
                items:
                  $ref: "#/components/schemas/CreateOrderOrderAction"
                type: array
              quote:
                $ref: "#/components/schemas/QuoteObjectFields"
              ramp:
                $ref: "#/components/schemas/RampRequest"
              subscriptionNumber:
                description: |
                  Leave this empty to represent new subscription creation. Specify a subscription number to update an existing subscription.
                type: string
            type: object
          type: array
      required:
        - orderDate
        - subscriptions
      type: object
    POSTPMMandateInfo:
      description: |
        The mandate information for the Credit Card, ACH, or Bank Transfer payment method.

        The following mandate fields are specific to the ACH and Bank Transfer payment methods:
        * `mandateId`
        * `mandateReceivedStatus`
        * `existingMandateStatus`
        * `mandateCreationDate`
        * `mandateUpdateDate`
        * `mandateStatus`
        * `mandateReason`

        The following mandate fields are specific to the Credit Card payment method:
        * `mitTransactionId`
        * `mitProfileAgreedOn`
        * `mitConsentAgreementRef`
        * `mitConsentAgreementSrc`
        * `mitProfileType`
        * `mitProfileAction`
      properties:
        existingMandateStatus:
          description: |
            Indicates whether the mandate is an existing mandate.
          enum:
            - true
            - false
          type: string
        mandateCreationDate:
          description: |
            The date on which the mandate was created.
          format: date
          type: string
        mandateId:
          description: |
            The mandate ID.
          type: string
        mandateReason:
          description: |
            The reason of the mandate from the gateway side.
          type: string
        mandateReceivedStatus:
          description: |
            Indicates whether the mandate is received from the gateway
          enum:
            - true
            - false
          type: string
        mandateStatus:
          description: |
            The status of the mandate from the gateway side.
          type: string
        mandateUpdateDate:
          description: |
            The date on which the mandate was updated.
          format: date
          type: string
        mitConsentAgreementRef:
          description: |
            Reference for the consent agreement that you have established with the customer.  
          type: string
        mitConsentAgreementSrc:
          enum:
            - External
          type: string
        mitProfileAction:
          description: |
            Specifies how Zuora activates the stored credential profile. Only applicable if you set the `status` field to `Active`.

            * `Activate` (default) - Use this value if you are creating the stored credential profile after receiving the customer's consent.

              Zuora will create the stored credential profile then send a cardholder-initiated transaction (CIT) to the payment gateway to validate the stored credential profile. If the CIT succeeds, the status of the stored credential profile will be `Active`. If the CIT does not succeed, Zuora will not create a stored credential profile.
              
              If the payment gateway does not support the stored credential transaction framework, the status of the stored credential profile will be `Agreed`.


            * `Persist` - Use this value if the stored credential profile represents a stored credential profile in an external system. The status of the payment method's stored credential profile will be `Active`.
          enum:
            - Activate
            - Persist
          type: string
        mitProfileAgreedOn:
          description: |
            The date on which the stored credential profile is agreed. The date format is `yyyy-mm-dd`.
          format: date
          type: string
        mitProfileType:
          description: |
            Indicates the type of the stored credential profile.
          type: string
        mitTransactionId:
          description: |
            Specifies the ID of the transaction. Only applicable if you set the `mitProfileAction` field to `Persist`.
          maxLength: 128
          type: string
      title: mandateInfo
      type: object
    POSTPaymentMethodDecryption:
      example:
        accountID: 402891a25a02e11c015a02f3c6100003
        integrationType: ApplePay
        invoiceId: INV000000005
        merchantID: merchant.CN.com.zuora.services416
        paymentGateway: CyberSourceOPG
        paymentToken:
          data: xGc......JDxuYz1gug0KZRrGXJQ=
          header:
            ephemeralPublicKey: MFkwEw......TMbLoojKBA==
            publicKeyHash: HuLvfqvLon......9jEyX0w=
            transactionId: abbadd18818baea1f37b40844c9e09afa9733b0eccb373905b811da43cf1753b
          signature: MIAGCSqGSIb......AEtrLSv7hE9gAAAAAAAA==
          version: EC_v1
        processPayment: true
      properties:
        accountID:
          description: |-
            The ID of the customer account associated with this payment method.
            To create an orphan payment method that is not associated with any customer account, you do not need to specify this field during creation. However, you must associate the orphan payment method with a customer account within 10 days. Otherwise, this orphan payment method will be deleted.
          type: string
        cardHolderInfo:
          description: Container for cardholder information. If provided, Zuora will only use this information for this card. If not provided, Zuora will use the account's existing bill-to contact information for this card.
          properties:
            addressLine1:
              description: First address line, 255 characters or less.
              type: string
            addressLine2:
              description: Second address line, 255 characters or less.
              type: string
            cardHolderName:
              description: The card holder's full name as it appears on the card, e.g., "John J Smith", 50 characters or less.
              type: string
            city:
              description: City, 40 characters or less.
              type: string
            country:
              description: Country, must be a valid country name or abbreviation.
              type: string
            email:
              description: Card holder's email address, 80 characters or less.
              type: string
            phone:
              description: Phone number, 40 characters or less.
              type: string
            state:
              description: State; must be a valid state name or 2-character abbreviation.
              type: string
            zipCode:
              description: Zip code, 20 characters or less.
              type: string
          type: object
        integrationType:
          description: |+
            Field to identify the token decryption type.

            **Note:** The only value at this time is `ApplePay`.

          type: string
        invoiceId:
          description: |
            The id of invoice this payment will apply to.

            **Note:** When `processPayment` is `true`, this field is required.
            Only one invoice can be paid; for scenarios where you want to pay for multiple invoices, set `processPayment` to `false` and call payment API separately.
          type: string
        merchantID:
          description: |
            The Merchant ID that was configured for use with Apple Pay in the Apple iOS Developer Center.
          type: string
        mitConsentAgreementSrc:
          description: |
            Required if you set the `mitProfileAction` field.
          enum:
            - External
          type: string
        mitProfileAction:
          description: |+
            If you specify this field, Zuora creates a stored credential profile within the payment method.
                
            **Note:** This feature is in the **Early Adopters** phase. We are actively soliciting feedback from a small set of early adopters before releasing as generally available.
                
            * `Activate` - Use this value if you are creating the stored credential profile after receiving the customer's consent. Zuora will create the stored credential profile then send a cardholder-initiated transaction (CIT) to the payment gateway to validate the stored credential profile. If the CIT succeeds, the status of the stored credential profile will be `Active`. If the CIT does not succeed, Zuora will not create a stored credential profile. If the payment gateway does not support the stored credential transaction framework, the status of the stored credential profile will be `Agreed`.     
                
            * `Persist` - Use this value if the stored credential profile represents a stored credential profile in an external system. The status of the payment method's stored credential profile will be `Active`.
                
          enum:
            - Activate
            - Persist
          type: string
        mitProfileType:
          description: |
            Required if you set the `mitProfileAction` field.
          enum:
            - Recurring
          type: string
        paymentGateway:
          description: |
            The label name of the gateway instance configured in Zuora that should process the payment. When creating a Payment, this must be a valid gateway instance ID and this gateway must support the specific payment method. If not specified, the default gateway on the Account will be used.

            **Note:** When `processPayment` is `true`, this field is required.
          type: string
        paymentToken:
          description: |+
            The complete JSON Object representing the encrypted payment token payload returned in the response from the Apple Pay session.

          type: object
        processPayment:
          description: |
            A boolean flag to control whether a payment should be processed after creating payment method. The payment amount will be equivalent to the amount the merchant supplied in the ApplePay session. Default is false.

            When `processPayment` is set to `false`, it must be followed by a separate subscribe or payment API call. 


            **Note:** If you set this field to `true`, you must specify the `paymentGateway` field with the payment gateway instance name. If you set this field to `false`, you must select the **Verify new credit card** check box on the gateway instance settings page. Otherwise, the cryptogram will not be sent to the gateway.
          type: boolean
      required:
        - integrationType
        - merchantID
        - paymentToken
      type: object
    POSTPaymentMethodRequest:
      allOf:
        - properties:
            type:
              description: |
                Type of the payment method. Possible values include:

                * `PayPalEC` - PayPal Express Checkout payment method. Use this type if you are using a [PayPal Payflow Pro Gateway](https://knowledgecenter.zuora.com/CB_Billing/M_Payment_Gateways/Supported_Payment_Gateways/PayPal_Payflow_Pro%2C_Website_Payments_Payflow_Edition%2C_Website_Pro_Payment_Gateway) instance.
                * `PayPalNativeEC` - PayPal Native Express Checkout payment method. Use this type if you are using a [PayPal Express Checkout Gateway](https://knowledgecenter.zuora.com/CB_Billing/M_Payment_Gateways/Supported_Payment_Gateways/PayPal_Express_Checkout_Gateway) instance.
                * `PayPalAdaptive` - PayPal Adaptive payment method. Use this type if you are using a [PayPal Adaptive Payment Gateway](https://knowledgecenter.zuora.com/CB_Billing/M_Payment_Gateways/Supported_Payment_Gateways/PayPal_Adaptive_Payments_Gateway) instance.
                * `CreditCard` - Credit card payment method.
                * `ACH` - ACH payment method.
                * `SEPA` - Single Euro Payments Area.
                * `Betalingsservice` - Direct Debit DK.
                * `Autogiro` - Direct Debit SE.
                * `Bacs` - Direct Debit UK.
                * `Becs` - Direct Entry AU.
                * `Becsnz` - Direct Debit NZ.
                * `PAD` - Pre-Authorized Debit.
                * You can also specify a custom payment method type. This type is only available if the Universal Payment Connector and Open Payment Method services are enabled. See [Set up custom payment gateways and payment methods](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/MB_Set_up_custom_payment_gateways_and_payment_methods) for details.

                Note that Zuora is continuously adding new payment method types.
              type: string
          required:
            - type
          type: object
        - $ref: "#/components/schemas/CreatePMPayPalECPayPalNativeEC"
        - $ref: "#/components/schemas/CreatePaymentMethodPayPalAdaptive"
        - $ref: "#/components/schemas/CreatePaymentMethodCreditCard"
        - $ref: "#/components/schemas/CreatePaymentMethodACH"
        - $ref: "#/components/schemas/CreatePaymentMethodCommon"
        - $ref: "#/components/schemas/CreatePaymentMethodBankTransfer"
        - $ref: "#/components/schemas/PaymentMethodObjectCustomFields"
      example:
        BAID: I-1TJ3GAGG82Y9
        accountKey: 2c92c0f95be68649015bf14e001f2760
        email: customer@example.com
        type: PayPalEC
    POSTPaymentMethodResponse:
      allOf:
        - $ref: "#/components/schemas/CommonResponseType"
        - properties:
            id:
              description: |
                Internal ID of the payment method that was created.
              type: string
            reasons:
              items:
                description: |
                  Error information. Only applicable if the payment method was not created.
                properties:
                  code:
                    description: |
                      Error code.
                    type: string
                  message:
                    description: |
                      Error message.
                    type: string
                type: object
              type: array
          type: object
    POSTPaymentMethodResponseDecryption:
      properties:
        amount:
          description: |
            The payment amount contained within the encrypted token.
          type: string
        paymentId:
          description: |
            The ID of newly processed payment,
          type: string
        paymentMethodId:
          description: |
            ID of the newly-created payment method.
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    POSTPaymentMethodResponseType:
      properties:
        paymentMethodId:
          description: |
            ID of the newly-created payment method.
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    POSTPaymentMethodType:
      allOf:
        - properties:
            accountKey:
              description: |-
                ID of the customer account.
                To create an orphan payment method that is not associated with any customer account, you do not need to specify this field during creation. However, you must associate the orphan payment method with a customer account within 10 days. Otherwise, this orphan payment method will be deleted.
              type: string
            cardHolderInfo:
              $ref: "#/components/schemas/CreatePaymentMethodCardholderInfo"
            creditCardNumber:
              description: |
                Credit card number, a string of up to 16 characters. This field can only be set when creating a new payment method; it cannot be queried or updated.
              type: string
            creditCardType:
              description: |
                The type of the credit card.

                Possible values  include `Visa`, `MasterCard`, `AmericanExpress`, `Discover`, `JCB`, and `Diners`. For more information about credit card types supported by different payment gateways, see [Supported Payment Gateways](https://knowledgecenter.zuora.com/CB_Billing/M_Payment_Gateways/Supported_Payment_Gateways).
              type: string
            defaultPaymentMethod:
              description: |
                Specify true to make this card the default payment method; otherwise, omit this parameter to keep the current default payment method.
              type: boolean
            expirationMonth:
              description: |
                One or two digits expiration month (1-12).
              type: integer
            expirationYear:
              description: |
                Four-digit expiration year.
              type: integer
            gatewayOptions:
              description: |
                The field used to pass gateway-specific parameters and parameter values.
              properties:
                key:
                  description: |
                    The name of a gateway-specific parameter.
                  type: string
                value:
                  description: |
                    The value of the gateway-specific parameter.
                  type: string
              type: object
            mitConsentAgreementRef:
              description: |
                Specifies your reference for the stored credential consent agreement that you have established with the customer. Only applicable if you set the `mitProfileAction` field.
              maxLength: 128
              type: string
            mitConsentAgreementSrc:
              description: |
                Required if you set the `mitProfileAction` field.
              enum:
                - External
              type: string
            mitNetworkTransactionId:
              description: |
                Specifies the ID of a network transaction. Only applicable if you set the `mitProfileAction` field to `Persist`.
              maxLength: 128
              type: string
            mitProfileAction:
              description: |
                If you set this field, Zuora creates a stored credential profile within the payment method.

                **Note:** This feature is in the **Early Adopters** phase. We are actively soliciting feedback from a small set of early adopters before releasing as generally available.

                * `Activate` - Use this value if you are creating the stored credential profile after receiving the customer's consent.

                  Zuora will create the stored credential profile then send a cardholder-initiated transaction (CIT) to the payment gateway to validate the stored credential profile. If the CIT succeeds, the status of the stored credential profile will be `Active`. If the CIT does not succeed, Zuora will not create a stored credential profile.
                  
                  If the payment gateway does not support the stored credential transaction framework, the status of the stored credential profile will be `Agreed`.


                * `Persist` - Use this value if the stored credential profile represents a stored credential profile in an external system. The status of the payment method's stored credential profile will be `Active`.
              enum:
                - Activate
                - Persist
              type: string
            mitProfileAgreedOn:
              description: |
                The date on which the profile is agreed. The date format is `yyyy-mm-dd`.  
              format: date
              type: string
            mitProfileType:
              description: |
                Required if you set the `mitProfileAction` field. Indicates the type of the stored credential profile to process recurring or unsecheduled transactions.
              enum:
                - Recurring
                - Unscheduled
              type: string
            numConsecutiveFailures:
              description: |
                The number of consecutive failed payments for this payment method. It is reset to `0` upon successful payment. 
              format: int32
              maximum: 100
              minimum: 0
              type: integer
            securityCode:
              description: |
                The CVV or CVV2 security code for the credit card or debit card. Only required if changing expirationMonth, expirationYear, or cardHolderName. To ensure PCI compliance, this value isn't stored and can't be queried.
              type: string
          required:
            - creditCardType
            - creditCardNumber
            - expirationMonth
            - expirationYear
          type: object
        - $ref: "#/components/schemas/PaymentMethodObjectCustomFields"
      example:
        accountKey: A00001115
        cardHolderInfo:
          addressLine1: 77 Fallon Glen
          addressLine2: ""
          cardHolderName: Leo
          city: Fremont
          country: USA
          email: smith@example.com
          phone: "4155551234"
          state: California
          zipCode: "94020"
        creditCardNumber: "1111222233334444"
        creditCardType: Discover
        defaultPaymentMethod: false
        expirationMonth: 10
        expirationYear: 2021
        gatewayOptions:
          Comments: Test comments
          IPAddress: 192.168.1.1
        numConsecutiveFailures: 3
        securityCode: "123"
    POSTPaymentRunDataElementRequest:
      properties:
        accountId:
          description: |
            A valid account ID associated with the payment run.

            If `consolidatedPayment` is set to `true`, this field is used in processing a single payment for invoices/debit memos due on an account.
          type: string
        amount:
          description: |
            The amount to be collected for the specified invoice/debit memo. `amount` must be a positive numeric value no more than the balance of the specified invoice/debit memo.

            This field is only available when `documentId` is specified. If `amount` is not specified, whole balance of the invoice/debit memo is collected.
          type: number
        comment:
          description: |
            Additional comments.
          type: string
        documentId:
          description: |
            The ID of a billing document associated with the payment run. `documentId` must be valid and match with `documentType`.

            You must either specify both `documentId` and `documentType`, or specify neither of them.

            If neither of `documentType` and `documentId` is specified, all invoices/debit memos with open balance of the account are collected.
          type: string
        documentType:
          description: |
            The type of a billing document associated with the payment run. The value can be `Invoice` or `DebitMemo`, but `DebitMemo` is only supported if the Invoice Settlement feature is enabled.

            You must either specify both `documentType` and `documentId`, or specify neither of them.

            If neither of `documentType` and `documentId` is specified, all invoices/debit memos with open balance of the account are collected.
          enum:
            - Invoice
            - DebitMemo
          type: string
        paymentGatewayId:
          description: |
            The ID of the payment gateway for collecting invoices/debit memos. The specified payment gateway must be valid and active. If it is not specified, the default payment gateway of the account is used. If no payment gateway is configured for the account, the default payment gateway of the tenant is used.

            If `consolidatedPayment` is set to `true`, this field is used in processing a single payment for invoices/debit memos due on an account.
          type: string
        paymentMethodId:
          description: |
            The ID of the payment method for collecting invoices/debit memos. The specified payment method must be a valid non-system payment method. If it is not specified, the default payment method of the account is used regardless of the `autoPay` value of the account.

            If `processPaymentWithClosedPM` is set to `false`, the payment method cannot be closed.

            If the payment retry rules are enabled, the payment method must meet the rules.

            If `consolidatedPayment` is set to `true`, this field is used in processing a single payment for invoices/debit memos due on an account.
          type: string
      required:
        - accountId
      type: object
    POSTPaymentRunRequest:
      example:
        accountId: 402890245f097f39015f0e9fcdd60558
        autoApplyCreditMemo: "true"
        autoApplyUnappliedPayment: "true"
        consolidatedPayment: "true"
        processPaymentWithClosedPM: "true"
        targetDate: 2017-10-10
      properties:
        accountId:
          description: |
            The ID of the customer account associated with the payment run.

            This field conflicts with each of the `batch`, `billCycleDay`, `currency`, `paymentGatewayId`, and `billingRunId` fields. If there are such conflicts, an error occurs and an error message is returned.
          format: uuid
          type: string
        applyCreditBalance:
          description: |
            **Note:** This field is only available if you have the Credit Balance feature enabled and the Invoice Settlement feature disabled.

            Whether to apply credit balances in the payment run. This field is only available when you have Invoice Settlement feature disabled.
          type: boolean
        autoApplyCreditMemo:
          description: |
            **Note:** This field is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

            Whether to automatically apply a posted credit memo to one or more receivables in the payment run.
          type: boolean
        autoApplyUnappliedPayment:
          description: |
            **Note:** This field is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

            Whether to automatically apply unapplied payments to  one or more receivables in the payment run.
          type: boolean
        batch:
          description: |
            The alias name given to a batch. The batch name is a string of 50 characters or less.

            This field conflicts with the `accountId` field. If they are both specified in the request body, an error occurs and an error message is returned. 
          type: string
        billCycleDay:
          description: |
            The billing cycle day (BCD), the day of the month when a bill run generates invoices for the account. The value must be equal to or less then 31, and 31 is mean the EOM.

            This field conflicts with the `accountId` field. If they are both specified in the request body, an error occurs and an error message is returned.
          type: string
        billingRunId:
          description: |
            The ID of a bill run.

            This field conflicts with the `accountId` field. If they are both specified in the request body, an error occurs and an error message is returned.
          format: uuid
          type: string
        collectPayment:
          description: |
            Whether to process electronic payments during the execution of payment runs. 

            If the Payment user permission "Process Electronic Payment" is disabled, this field will be ignored.
          type: boolean
        consolidatedPayment:
          description: |
            **Note:** The **Process Electronic Payment** permission also needs to be allowed for a Manage Payment Runs role to work. See [Payments Roles](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/A_Administrator_Settings/User_Roles/e_Payments_Roles) for more information. 

            Whether to process a single payment for all receivables that are due on an account.
          type: boolean
        currency:
          description: |
            A currency defined in the web-based UI administrative settings.

            This field conflicts with the `accountId` field. If they are both specified in the request body, an error occurs and an error message is returned.
          type: string
        data:
          description: |
            
            The array of data for specifying records of accounts and invoices/debit memos that will be collected and processed by a payment run. A maximum of 50K records are allowed to be passed into the `data` array.

            Here is an example:
            ```
              {
                "accountId": "60c81b5bc51649e8a7d1b48303194790",
                "documentId": "2c9081a03c63c94c013c6894af5602dd",
                "documentType": "Invoice",
                "amount": 80,
                "paymentMethodId": "2c9081a03c6d7b51013c6d7e4ada0a1c",
                "paymentGatewayId": "d2abe8342e1811ea80e774b9452e17ea",
                "comment": "Payment Comments"
              }
            ```
          items:
            $ref: "#/components/schemas/POSTPaymentRunDataElementRequest"
          title: payment run data
          type: array
        paymentGatewayId:
          description: |
            The ID of the gateway instance that processes the payment.

            This field conflicts with the `accountId` field. If they are both specified in the request body, an error occurs and an error message is returned.
          format: uuid
          type: string
        processPaymentWithClosedPM:
          description: |
            **Note:** The **Process Electronic Payment** permission also needs to be allowed for a Manage Payment Runs role to work. See [Payments Roles](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/A_Administrator_Settings/User_Roles/e_Payments_Roles) for more information. 

            Whether to process payments even if the default payment method is closed.
          type: boolean
        runDate:
          description: |
            The date and time when the scheduled payment run is to be executed, in `yyyy-mm-dd hh:mm:ss` format. The backend will ignore mintues and seconds in the field value. For example, if you specify `2017-03-01 11:30:37` for this value, this payment run will be run at 2017-03-01 11:00:00.

            You must specify either the `runDate` field or the `targetDate` field in the request body. If you specify the `runDate` field, the scheduced payment run is to be executed on the run date. If you specify the `targetDate` field, the payment run is executed immediately after it is created. 
          format: date-time
          type: string
        targetDate:
          description: |
            The target date used to determine which receivables to be paid in the payment run. The payments are collected for all receivables with the due date no later than the target date.

            You must specify either the `runDate` field or the `targetDate` field in the request body. If you specify the `runDate` field, the scheduced payment run is to be executed on the run date. If you specify the `targetDate` field, the payment run is executed immediately after it is created. 
          format: date
          type: string
      type: object
    POSTPublicEmailTemplateRequest:
      example:
        active: true
        bccEmailAddress: user@example.com
        ccEmailAddress: user@example.com
        ccEmailType: SpecificEmails
        description: Email when an account is edited
        emailBody: Dear user,<p>the account <Account.Name> has been edited. <p>Example Co. Ltd.
        emailSubject: Account <Account.Number> has been edited
        encodingType: UTF8
        eventTypeName: AccountEdit
        fromEmailAddress: null
        fromEmailType: TenantEmail
        fromName: Example Co. Ltd.
        isHtml: true
        name: Account Edit Email
        replyToEmailAddress: null
        replyToEmailType: TenantEmail
        toEmailAddress: null
        toEmailType: BillToContact
      properties:
        active:
          default: true
          description: The status of the email template. The default value is true.
          type: boolean
        bccEmailAddress:
          description: The email bcc address.
          format: email
          type: string
        ccEmailAddress:
          description: The email CC address.
          type: string
        ccEmailType:
          default: SpecificEmails
          description: |-
            Email CC type:
            * When EventType is CDC/External and 'ReferenceObjectType' in EventType is associated to Account, ccEmailType can be ALL values in enum. 
            * When EventType is CDC/External and 'ReferenceObjectType' in EventType is not associated to Account, ccEmailType MUST be TenantAdmin, RunOwner or SpecificEmail. 
            * When EventType is CDC/External and 'ReferenceObjectType' in EventType is EMPTY, ccEmailType MUST be TenantAdmin, RunOwner or SpecificEmail.
          enum:
            - BillToContact
            - SoldToContact
            - SpecificEmails
            - TenantAdmin
            - BillToAndSoldToContacts
            - RunOwner
            - AllContacts
            - InvoiceOwnerBillToContact
            - InvoiceOwnerSoldToContact
            - InvoiceOwnerBillToAndSoldToContacts
            - InvoiceOwnerAllContacts
          type: string
        description:
          description: The description of the email template.
          maxLength: 255
          type: string
        emailBody:
          description: |-
            The email body. You can add merge fields in the email object using angle brackets. 
            You can also embed HTML tags if 'isHtml' is true.
          type: string
        emailSubject:
          description: The email subject. Users can add merge fields in the email subject using angle brackets.
          type: string
        encodingType:
          default: UTF8
          description: The endcode type of the email body.
          enum:
            - UTF8
            - Shift_JIS
            - ISO_2022_JP
            - EUC_JP
            - X_SJIS_0213
          type: string
        eventTypeName:
          description: |
            The name of the event type. 
          minLength: 1
          type: string
        eventTypeNamespace:
          description: |
            The namespace of the `eventTypeName` field. The `eventTypeName` has the `user.notification` namespace by default. 

            Note that if the `eventTypeName` is a standard event type, you must specify the `com.zuora.notification` namespace; otherwise, you will get an error.

            For example, if you want to create an email template on the `OrderActionProcessed` event, you must specify `com.zuora.notification` for this field.         
          type: string
        fromEmailAddress:
          description: If fromEmailType is SpecificEmail, this field is required.
          type: string
        fromEmailType:
          description: The type of the email.
          enum:
            - TenantEmail
            - SpecificEmail
          type: string
        fromName:
          description: The name of the email sender.
          type: string
        isHtml:
          default: false
          description: Specifies whether the style of email body is HTML. The default value is false.
          type: boolean
        name:
          description: The name of the email template, a unique name in a tenant.
          maxLength: 255
          type: string
        replyToEmailAddress:
          description: If replyToEmailType is SpecificEmail, this field is required.
          type: string
        replyToEmailType:
          description: Type of the replyTo email.
          enum:
            - TenantEmail
            - SpecificEmail
          type: string
        toEmailAddress:
          description: If toEmailType is SpecificEmail, this field is required.
          type: string
        toEmailType:
          description: |-
            Email receive type.
            * When EventType is CDC/External and 'ReferenceObjectType' in EventType is associated to Account, toEmailType can be ALL values in enum. 
            * When EventType is CDC/External and 'ReferenceObjectType' in EventType is not associated to Account, toEmailType MUST be TenantAdmin, RunOwner or SpecificEmail.
            * When EventType is CDC/External and 'ReferenceObjectType' in EventType is EMPTY, toEmailType MUST be TenantAdmin, RunOwner or SpecificEmail.
          enum:
            - BillToContact
            - SoldToContact
            - SpecificEmails
            - TenantAdmin
            - BillToAndSoldToContacts
            - RunOwner
            - AllContacts
            - InvoiceOwnerBillToContact
            - InvoiceOwnerSoldToContact
            - InvoiceOwnerBillToAndSoldToContacts
            - InvoiceOwnerAllContacts
          type: string
      required:
        - eventTypeName
        - name
        - fromEmailType
        - emailSubject
        - emailBody
        - toEmailType
      type: object
    POSTPublicNotificationDefinitionRequest:
      example:
        active: true
        callout:
          active: true
          calloutAuth:
            domain: example_domain
            password: example_password
            preemptive: true
            username: example_user
          calloutBaseurl: https://www.example.com/callout/AccountEdit
          calloutParams:
            AccountName: <Account.Name>
            AccountNumber: <Account.AccountNumber>
          calloutRetry: true
          description: Callout when an account is edited
          eventTypeName: AccountEdit
          httpMethod: POST
          name: Callout for Account Edited
          requiredAuth: true
        calloutActive: true
        communicationProfileId: 6e569e1e05f040eda51a927b140c0ac5
        description: Notification sent out when an account is edited
        emailActive: true
        emailTemplateId: 6e569e1e05f040eda51a927b140c0ac6
        eventTypeName: AccountEdit
        filterRule:
          condition: Account.Balance >= _VIP_BALANCE_AMOUNT && Account.Status == _ACCOUNT_STATUS
          description: Filter rule to test if an account is a VIP account
          parameters:
            _ACCOUNT_STATUS:
              description: The status of the VIP Account
              displayName: VIP Account Status
              options:
                - Draft
                - Active
                - Canceled
              valueType: STRING
            _VIP_BALANCE_AMOUNT:
              description: The minimum account balance
              displayName: VIP Account Balance
              options: null
              valueType: BIG_DECIMAL
        filterRuleParams:
          _EDITED_FROM: UI
          _VIP_ACCOUNT_BALANCE: "100000"
        name: Account Edit Notification
      properties:
        active:
          default: true
          description: The status of the notification definition. The default value is true.
          type: boolean
        callout:
          properties:
            active:
              default: true
              description: The status of the callout. The default is true.
              type: boolean
            calloutAuth:
              $ref: "#/components/schemas/CalloutAuth"
            calloutBaseurl:
              description: The callout URL. It must start with 'https://'
              example: https://***
              format: url
              minLength: 10
              type: string
            calloutParams:
              $ref: "#/components/schemas/CalloutMergeFields"
            calloutRetry:
              default: true
              description: Specified whether to retry the callout when the callout fails. The default is true.
              type: boolean
            description:
              description: Description for the callout.
              maxLength: 255
              type: string
            eventTypeName:
              description: The name of the event type.
              minLength: 1
              type: string
            httpMethod:
              description: The HTTP method of the callout.
              enum:
                - GET
                - PUT
                - POST
                - DELETE
              example: POST
              type: string
            name:
              description: The name of the created callout.
              maxLength: 255
              type: string
            requiredAuth:
              description: Specifies whether the callout requires auth.
              type: boolean
          required:
            - eventTypeName
            - name
            - calloutBaseurl
            - httpMethod
            - requiredAuth
          type: object
        calloutActive:
          default: false
          description: The status of the callout action. Default value is false.
          type: boolean
        communicationProfileId:
          description: |
            The profile that notification definition belongs to. 

            You can use the [Query Action](https://www.zuora.com/developer/api-reference/#operation/Action_POSTquery) to get the communication profile Id. See the following request sample:

            `{
                "queryString": "select Id, ProfileName from CommunicationProfile"
             }`

            If you do not pass the communicationProfileId, notification service will be automatically added to the 'Default Profile'.
          type: string
        description:
          description: The description of the notification definition.
          maxLength: 255
          type: string
        emailActive:
          default: false
          description: The status of the email action. The default value is false.
          type: boolean
        emailTemplateId:
          description: The ID of the email template. If emailActive is true, an email template is required. And EventType of the email template MUST be the same as the eventType.
          format: uuid
          type: string
        eventTypeName:
          description: |
            The name of the event type. 
          minLength: 1
          type: string
        eventTypeNamespace:
          description: |
            The namespace of the `eventTypeName` field. The `eventTypeName` has the `user.notification` namespace by default. 
                      
            For example, if you want to create a notification definition on the `OrderActionProcessed` event, you must specify `com.zuora.notification` for this field.
          type: string
        filterRule:
          description: ""
          properties:
            condition:
              description: |
                The filter rule conditions, written in [JEXL](http://commons.apache.org/proper/commons-jexl/).
                The rule might contain event context merge fields and data source merge fields. Data source merge fields must be from [the base object of the event or from the joined objects of the base object](https://knowledgecenter.zuora.com/DC_Developers/M_Export_ZOQL#Data_Sources_and_Objects). Notifications with invalid merge fields will fail to evaluate, thus will not be invoked. For example, to filter an invoice posted notification to only invoices with an amount over 1000, you would define the following condition:

                ```Invoice.Amount > 1000```

                There are conventions and keywords you need to be aware of. For example:

                * `Invoice.Amount` refers to the `Amount` field of the Zuora object `Invoice`.

                * Unlike Event Triggers, there is no access to variables with the `_old` suffix. Fields with the `_old` suffix are only available on Event Trigger conditions.
              example: Account.Balance >= _VIP_BALANCE_AMOUNT && Account.Status == _ACCOUNT_STATUS
              type: string
            description:
              description: The description of the filter rule.
              maxLength: 255
              type: string
            parameters:
              $ref: "#/components/schemas/FilterRuleParameterDefinitions"
          required:
            - condition
            - parameters
          type: object
        filterRuleParams:
          $ref: "#/components/schemas/FilterRuleParameterValues"
        name:
          description: The name of the notification definition, unique per communication profile.
          maxLength: 255
          type: string
      required:
        - eventTypeName
        - name
      type: object
    POSTQuoteDocResponseType:
      properties:
        file:
          description: |
            URL of the generated quote document if the file was successfully generated.
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    POSTQuoteDocType:
      example:
        apiuser: contact@example.com
        documentType: pdf
        locale: en_US
        quoteId: a0Bi000000A71rp
        serverUrl: https://c.na10.visual.force.com/services/Soap/u/10.0/00DF00000008VnX
        sessionId: we764buuM03bkE0fmmc5zGMYp
        templateId: 4028925648fdb7830148fdc1246c0003
        useSFDCLocale: "1"
        zquotesMajorVersion: "7"
        zquotesMinorVersion: "0"
      properties:
        apiuser:
          description: |
            If not using Salesforce locale, this API Zuora user will be used to retrieve the locale from Zuora.
          type: string
        documentType:
          description: |
            Type of the document to generate: `PDF` or `DOC`.
          type: string
        locale:
          description: |
            Salesforce locale value to use.
          type: string
        password:
          description: ""
          type: string
        quoteId:
          description: ｜ Id of the quote。
          type: string
        sandbox:
          description: ""
          type: string
        serverUrl:
          description: |
            SOAP URL used to login to Salesforce to get data. You can get the value with the following code in a Visualforce page: `{!$Api.Partner_Server_URL_100}`
          type: string
        sessionId:
          description: |
            Salesforce session id used to log in to Salesforce to get data. You can get the value with the following code in a Visualforce page: *{!$Api.Session_ID}*
          type: string
        templateId:
          description: |
            Id of the quote template in Zuora.
          type: string
        token:
          description: ""
          type: string
        useSFDCLocale:
          description: |
            If using Salesforce org locale, set this to a value that is not null.
          type: string
        username:
          description: ""
          type: string
        zquotesMajorVersion:
          description: |
            The major version number of Zuora Quotes you are generating the quote document in.
            You can use a quote template with hierarchy sizes bigger than 3 if this is set to 7 or higher.
          type: string
        zquotesMinorVersion:
          description: |
            The minor version number of Zuora Quotes you are generating the quote document in.
          type: string
      required:
        - documentType
        - quoteId
        - serverUrl
        - templateId
        - sessionId
      type: object
    POSTRSASignatureResponseType:
      properties:
        key:
          description: |
            Public key generated for this Payment Page.
          type: string
        signature:
          description: |
            Digital signature generated for this Payment Page.
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
        tenantId:
          description: |
            ID of the Zuora tenant.
          type: string
        token:
          description: |
            Token generated for this Payment Page.
          type: string
      type: object
    POSTRSASignatureType:
      example:
        method: POST
        pageId: 2c92c0f855e2b4630155ec9e6a1b6eec
        uri: https://apisandbox.zuora.com/apps/PublicHostedPageLite.do
      properties:
        method:
          description: |
            The type of the request. Set it to POST.
          type: string
        pageId:
          description: |
            The page id of your Payment Pages 2.0 form. Click **Show Page Id** next to the Payment Page name in the Hosted Page List to retrieve the page id.
          type: string
        uri:
          description: |
            The URL that the Payment Page will be served from.
            * For US Production environment: Use https://www.zuora.com/apps/PublicHostedPageLite.do
            * For US API Sandbox environment: Use https://apisandbox.zuora.com/apps/PublicHostedPageLite.do
            * For EU Cloud Production environment: Use https://eu.zuora.com/apps/PublicHostedPageLite.do
            * For EU Cloud Sandbox environment: Use https://sandbox.eu.zuora.com/apps/PublicHostedPageLite.do
            * For US Cloud Production environment: Use https://na.zuora.com/apps/PublicHostedPageLite.do
            * For US Cloud Sandbox environment: Use https://sandbox.na.zuora.com/apps/PublicHostedPageLite.do
            * For US Central Sandbox environment: Use https://test.zuora.com/apps/PublicHostedPageLite.do
            * For EU Central Sandbox environment: Use https://test.eu.zuora.com/apps/PublicHostedPageLite.do
          type: string
      required:
        - method
        - pageId
        - uri
      type: object
    POSTReconcileRefundRequest:
      example:
        action: settle
        actionDate: 2020-10-25 11:11:11
        gatewayReconciliationReason: refund_paid
        gatewayReconciliationStatus: paid
        payoutId: PAYOUT123
      properties:
        action:
          description: |
            The action of the refund reconciliation.
              - `settle`: Sets the gatewayState to "Settled" and returns the refund object as response.
              - `reject`: Sets the gatewayState to "FailedToSettle" and handle the event according to the settings configured in the Gateway Reconciliation Configuration in Payments Settings through Zuora UI. See [Configure how to handle refund rejected events](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/M_Payment_Gateways/Gateway_Reconciliation#Configure_how_to_handle_refund_rejected_events) for details.
          enum:
            - settle
            - reject
          type: string
        actionDate:
          description: |
            The date and time of the refund reconciliation action, in `yyyy-mm-dd hh:mm:ss` format.
          format: datetime
          type: string
        gatewayReconciliationReason:
          description: |
            The reason of gateway reconciliation.
          type: string
        gatewayReconciliationStatus:
          description: |
            The status of gateway reconciliation.
          type: string
        payoutId:
          description: |
            The payout ID of the refund from the gateway side.
          type: string
      type: object
    POSTReconcileRefundResponse:
      example:
        accountId: 4028905f5a87c0ff015a87d25ae90025
        amount: 4
        cancelledOn: null
        comment: Create a refund for unapplied payment.
        createdById: 402881e522cf4f9b0122cf5d82860002
        createdDate: 2020-03-01 14:46:03
        creditMemoId: null
        financeInformation:
          bankAccountAccountingCode: null
          bankAccountAccountingCodeType: null
          transferredToAccounting: No
          unappliedPaymentAccountingCode: null
          unappliedPaymentAccountingCodeType: null
        gatewayId: null
        gatewayReconciliationReason: refund_paid
        gatewayReconciliationStatus: paid
        gatewayResponse: null
        gatewayResponseCode: null
        gatewayState: Settled
        id: 4028905f5a87c0ff015a889e590e00c9
        markedForSubmissionOn: null
        methodType: CreditCard
        number: R-00000001
        paymentId: 4028905f5a87c0ff015a889ddfb800c0
        paymentMethodId: null
        paymentMethodSnapshotId: null
        payoutId: PAYOUT123
        reasonCode: Standard Refund
        referenceId: null
        refundDate: 2020-03-01
        refundTransactionTime: null
        secondRefundReferenceId: null
        settledOn: 2020-10-25 11:11:11
        softDescriptor: null
        softDescriptorPhone: null
        status: Processed
        submittedOn: null
        success: true
        type: Electronic
        updatedById: 402881e522cf4f9b0122cf5d82860002
        updatedDate: 2020-03-01 14:46:03
      properties:
        accountId:
          description: |
            The ID of the customer account that the refund is for.
          type: string
        amount:
          description: |
            The total amount of the refund.
          format: double
          type: number
        cancelledOn:
          description: |
            The date and time when the transaction was cancelled, in `yyyy-mm-dd hh:mm:ss` format.
          format: date-time
          type: string
        comment:
          description: |
            Comments about the refund.
          type: string
        createdById:
          description: |
            The ID of the Zuora user who created the refund.
          type: string
        createdDate:
          description: |
            The date and time when the refund is created, in `yyyy-mm-dd hh:mm:ss` format.
          format: date-time
          type: string
        creditMemoId:
          description: |
            The ID of the credit memo that is refunded.
          type: string
        financeInformation:
          description: |
            Container for the finance information related to the refund.
          properties:
            bankAccountAccountingCode:
              description: |
                The accounting code that maps to a bank account in your accounting system.
              maxLength: 100
              minLength: 0
              type: string
            bankAccountAccountingCodeType:
              description: |+
                The type of the accounting code that maps to a bank account in your accounting system.
                  
              type: string
            transferredToAccounting:
              description: |
                Whether the refund was transferred to an external accounting system. Use this field for integration with accounting systems, such as NetSuite. 
              enum:
                - Processing
                - Yes
                - No
                - Error
                - Ignore
              type: string
            unappliedPaymentAccountingCode:
              description: |
                The accounting code for the unapplied payment.
              maxLength: 100
              minLength: 0
              type: string
            unappliedPaymentAccountingCodeType:
              description: |+
                The type of the accounting code for the unapplied payment.
                  
              type: string
          type: object
        gatewayId:
          description: |
            The ID of the gateway instance that processes the refund.
          type: string
        gatewayReconciliationReason:
          description: |
            The reason of gateway reconciliation.
          type: string
        gatewayReconciliationStatus:
          description: |
            The status of gateway reconciliation.
          type: string
        gatewayResponse:
          description: |
            The message returned from the payment gateway for the refund. This message is gateway-dependent.
          type: string
        gatewayResponseCode:
          description: |
            The code returned from the payment gateway for the refund. This code is gateway-dependent.
          type: string
        gatewayState:
          description: |
            The status of the refund in the gateway; used for reconciliation.
          enum:
            - Settled
            - FailedToSettle
          type: string
        id:
          description: |
            The ID of the refund.
          type: string
        markedForSubmissionOn:
          description: |
            The date and time when a refund was marked and waiting for batch submission to the payment process, in `yyyy-mm-dd hh:mm:ss` format.
          format: date-time
          type: string
        methodType:
          description: |
            How an external refund was issued to a customer. 
          enum:
            - ACH
            - Cash
            - Check
            - CreditCard
            - PayPal
            - WireTransfer
            - DebitCard
            - CreditCardReferenceTransaction
            - BankTransfer
            - Other
          type: string
        number:
          description: |
            The unique identification number of the refund. For example, R-00000001.
          type: string
        paymentId:
          description: |
            The ID of the payment that is refunded.
          type: string
        paymentMethodId:
          description: |
            The unique ID of the payment method that the customer used to make the refund.
          type: string
        paymentMethodSnapshotId:
          description: |
            The unique ID of the payment method snapshot which is a copy of the particular Payment Method used in a transaction.
          type: string
        payoutId:
          description: |
            The payout ID of the refund from the gateway side.
          type: string
        reasonCode:
          description: |
            A code identifying the reason for the transaction.      
          type: string
        referenceId:
          description: |
            The transaction ID returned by the payment gateway for an electronic refund. Use this field to reconcile refunds between your gateway and Zuora Payments.
          type: string
        refundDate:
          description: |
            The date when the refund takes effect, in `yyyy-mm-dd` format. For example, 2020-03-01.       
          format: date
          type: string
        refundTransactionTime:
          description: |
            The date and time when the refund was issued, in `yyyy-mm-dd hh:mm:ss` format.
          format: date-time
          type: string
        secondRefundReferenceId:
          description: |
            The transaction ID returned by the payment gateway if there is an additional refund. 
          type: string
        settledOn:
          description: |
            The date and time when the transaction is settled, in `yyyy-mm-dd hh:mm:ss` format.
          format: date-time
          type: string
        softDescriptor:
          description: |
            A payment gateway-specific field that maps Zuora to other gateways.
          type: string
        softDescriptorPhone:
          description: |
            A payment gateway-specific field that maps Zuora to other gateways.          
          type: string
        status:
          description: |
            The status of the refund.
          type: string
        submittedOn:
          description: |
            The date and time when the refund was submitted, in yyyy-mm-dd hh:mm:ss format.
          format: date-time
          type: string
        success:
          description: Indicates if the request is processed successfully.
          type: boolean
        type:
          description: |
            The type of the refund.
          enum:
            - External
            - Electronic
          type: string
        updatedById:
          description: |
            The ID of the Zuora user who last updated the refund.
          type: string
        updatedDate:
          description: |
            The date and time when the refund was last updated, in `yyyy-mm-dd hh:mm:ss` format.
          format: date-time
          type: string
      type: object
    POSTRejectPaymentRequest:
      example:
        gatewayResponse: Insufficient funds
        gatewayResponseCode: "023"
        referenceId: "825522036728874689"
        secondReferenceId: "825522036690700110"
        settledOn: 2019-05-07 20:56:32.981
      properties:
        gatewayResponse:
          description: |
            The transaction response returned by the gateway for this transaction. If the transaction was declined, this reason is provided in the message.
          type: string
        gatewayResponseCode:
          description: |
            Response message Code returned by the gateway about the transaction status.
          type: string
        referenceId:
          description: |
            Unique Id generated by the gateway for each transaction. Use this ID to find the respective Zuora Payment ID. 
          maxLength: 100
          type: string
        secondReferenceId:
          description: |
            The second reference Id. Some gateway uses two unique transaction IDs.
          maxLength: 100
          type: string
        settledOn:
          description: |
            The date and time of the transaction settlement. The format is `yyyy-mm-dd hh:mm:ss`.
          format: date-time
          type: string
      type: object
    POSTRejectPaymentResponse:
      properties:
        accountId:
          description: |
            The ID of the customer account that the payment is for.
          type: string
        amount:
          description: |
            The total amount of the payment.
          format: double
          type: number
        cancelledOn:
          description: |
            The date and time when the payment was cancelled, in `yyyy-mm-dd hh:mm:ss` format.
          format: date-time
          type: string
        comment:
          description: |
            Comments about the payment.
          type: string
        createdById:
          description: |
            The ID of the Zuora user who created the refund.
          type: string
        createdDate:
          description: |
            The date and time when the chargeback is created, in `yyyy-mm-dd hh:mm:ss` format. For example, 2019-03-01 15:31:10.
          format: date-time
          type: string
        creditMemoId:
          description: |
            The ID of the credit memo that is refunded.
          type: string
        financeInformation:
          description: |
            Container for the finance information related to the refund.
          properties:
            bankAccountAccountingCode:
              description: |
                The accounting code that maps to a bank account in your accounting system.
              maxLength: 100
              minLength: 0
              type: string
            bankAccountAccountingCodeType:
              description: |+
                The type of the accounting code that maps to a bank account in your accounting system.
                  
              type: string
            transferredToAccounting:
              description: |
                Whether the refund was transferred to an external accounting system. Use this field for integration with accounting systems, such as NetSuite. 
              enum:
                - Processing
                - Yes
                - No
                - Error
                - Ignore
              type: string
            unappliedPaymentAccountingCode:
              description: |
                The accounting code for the unapplied payment.
              maxLength: 100
              minLength: 0
              type: string
            unappliedPaymentAccountingCodeType:
              description: |+
                The type of the accounting code for the unapplied payment.
                  
              type: string
          type: object
        gatewayId:
          description: |
            The ID of the gateway instance that processes the payment.
          type: string
        gatewayResponse:
          description: |
            The message returned from the payment gateway for the payment. This message is gateway-dependent.
          type: string
        gatewayResponseCode:
          description: |
            The code returned from the payment gateway for the payment. This code is gateway-dependent.
          type: string
        gatewayState:
          description: |
            The status of the payment in the gateway; used for reconciliation.
          enum:
            - MarkedForSubmission
            - Submitted
            - Settled
            - NotSubmitted
            - FailedToSettle
          type: string
        id:
          description: |
            The ID of the payment chargeback.
          type: string
        markedForSubmissionOn:
          description: |
            The date and time when a charge was marked and waiting for batch submission to the payment process, in `yyyy-mm-dd hh:mm:ss` format.
          format: date-time
          type: string
        methodType:
          description: |
            How an external refund was issued to a customer. 
          enum:
            - ACH
            - Cash
            - Check
            - CreditCard
            - PayPal
            - WireTransfer
            - DebitCard
            - CreditCardReferenceTransaction
            - BankTransfer
            - Other
          type: string
        number:
          description: |
            The unique identification number of the payment. For example, P-00000001.
          type: string
        paymentId:
          description: |
            The ID of the payment that is refunded.
          type: string
        paymentMethodId:
          description: |
            The unique ID of the payment method that the customer used to make the payment.
          type: string
        paymentMethodSnapshotId:
          description: |
            The unique ID of the payment method snapshot which is a copy of the particular Payment Method used in a transaction.
          type: string
        reasonCode:
          description: |
            A code identifying the reason for the transaction.      
          type: string
        referenceId:
          description: |
            The transaction ID returned by the payment gateway for an electronic refund. Use this field to reconcile refunds between your gateway and Zuora Payments.
          type: string
        refundDate:
          description: |
            The date when the refund takes effect, in `yyyy-mm-dd` format. For example, 2017-03-01.       
          format: date
          type: string
        refundTransactionTime:
          description: |
            The date and time when the refund was issued, in `yyyy-mm-dd hh:mm:ss` format.
          format: date-time
          type: string
        secondRefundReferenceId:
          description: |
            The transaction ID returned by the payment gateway if there is an additional refund. 
          type: string
        settledOn:
          description: |
            The date and time when the transaction is settled, in `yyyy-mm-dd hh:mm:ss` format.
          format: date-time
          type: string
        softDescriptor:
          description: |
            A payment gateway-specific field that maps Zuora to other gateways.
          type: string
        softDescriptorPhone:
          description: |
            A payment gateway-specific field that maps Zuora to other gateways.          
          type: string
        status:
          description: |
            The status of the payment.
          type: string
        submittedOn:
          description: |
            The date and time when the payment was submitted, in yyyy-mm-dd hh:mm:ss format.
          format: date-time
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
        type:
          description: |
            The type of the payment.
          enum:
            - External
            - Electronic
          type: string
        updatedById:
          description: |
            The ID of the Zuora user who last updated the payment.
          type: string
        updatedDate:
          description: |
            The date and time when the payment was last updated, in `yyyy-mm-dd hh:mm:ss` format. For example, 2019-03-02 15:36:10.
          format: date-time
          type: string
      type: object
    POSTRevenueScheduleByChargeResponseType:
      properties:
        revenueScheduleNumber:
          description: |
            Revenue schedule number. The revenue schedule number is always prefixed with "RS", for example, "RS-00000001".
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    POSTRevenueScheduleByChargeType:
      allOf:
        - properties:
            amount:
              description: |
                The revenue schedule amount, which is the sum of all revenue items. This field cannot be null and must be formatted based on the currency, such as `JPY 30` or `USD 30.15`. Test out the currency to ensure you are using the proper formatting otherwise, the response will fail and this error message is returned: `Allocation amount with wrong decimal places.`
              format: decimal
              type: string
            deferredRevenueAccountingCode:
              description: |
                The accounting code for deferred revenue, such as Monthly Recurring Liability. Required only when `overrideChargeAccountingCodes` is `true`. Otherwise, this value is ignored.
              type: string
            deferredRevenueAccountingCodeType:
              description: |
                The type of the deferred revenue accounting code, such as Deferred Revenue. Required only when `overrideChargeAccountingCodes` is `true`. Otherwise, this value is ignored.
              type: string
            notes:
              description: |
                Additional information about this record.

                Character Limit: 2,000
              type: string
            overrideChargeAccountingCodes:
              default: false
              description: |
                When overriding accounting codes from a charge, `recognizedRevenueAccountingCode` and `deferredRevenue AccountingCode` must be in the request body and can have the empty value.
              enum:
                - true
                - false
              type: boolean
            recognizedRevenueAccountingCode:
              description: |
                The accounting code for recognized revenue, such as Monthly Recurring Charges or Overage Charges. Required only when `overrideChargeAccountingCodes` is `true`. Otherwise, the value is ignored.
              type: string
            recognizedRevenueAccountingCodeType:
              description: |
                The type of the recognized revenue accounting code, such as Sales Revenue or Sales Discount. Required only when `overrideChargeAccountingCodes` is `true`. Otherwise, this value is ignored.
              type: string
            referenceId:
              description: |
                Reference ID is used only in the custom unlimited rule to create a revenue schedule. In this scenario, the revenue schedule is not linked to an invoice item or invoice item adjustment.

                Character Limit: 100
              type: string
            revenueDistributions:
              description: |
                An array of revenue distributions. Represents how you want to distribute revenue for this revenue schedule. You can distribute revenue into a maximum of 250 accounting periods with one revenue schedule.

                The sum of the newAmount fields must be equal to the amount field.
              items:
                $ref: "#/components/schemas/POSTDistributionItemType"
              type: array
            revenueEvent:
              $ref: "#/components/schemas/POSTRevenueScheduleByChargeTypeRevenueEvent"
            revenueScheduleDate:
              description: |
                The effective date of the revenue schedule. For example, the revenue schedule date for bookings-based revenue recognition is typically set to the order date or contract date.

                The date cannot be in a closed accounting period. The date must be in `yyyy-mm-dd` format.
              format: date
              type: string
          required:
            - amount
            - revenueScheduleDate
          type: object
        - $ref: "#/components/schemas/RevenueScheduleObjectCustomFields"
      example:
        amount: "300"
        deferredRevenueAccountingCode: Deferred Revenue
        deferredRevenueAccountingCodeType: Deferred Revenue
        overrideChargeAccountingCodes: "true"
        recognizedRevenueAccountingCode: Subscription Revenue
        recognizedRevenueAccountingCodeType: Sales Revenue
        referenceId: rs transaction ref
        revenueDistributions:
          - accountingPeriodName: Jan'2013
            newAmount: "100"
          - accountingPeriodName: Feb'2013
            newAmount: "200"
        revenueEvent:
          eventType: Revenue Distributed
          eventTypeSystemId: "1111111"
          notes: Manually distribute revenue by usage
        revenueScheduleDate: 2013-01-01
    POSTRevenueScheduleByChargeTypeRevenueEvent:
      allOf:
        - properties:
            eventType:
              description: |
                Label of the revenue event type. Revenue event type labels can be duplicated. You can configure your revenue event type labels by navigating to **Settings > Finance > Configure Revenue Event Types** in the Zuora UI.

                Note that `Credit Memo Posted` and `Debit Memo Posted` are only available if you enable the Invoice Settlement feature.
              enum:
                - Invoice Posted
                - Invoice Item Adjustment Created
                - Invoice Canceled
                - Invoice Item Adjustment Canceled
                - Revenue Distributed
                - Credit Memo Posted
                - Debit Memo Posted
              type: string
            eventTypeSystemId:
              description: |
                System ID of the revenue event type. Each eventType has a unique system ID. You can configure your revenue event type system IDs by navigating to **Settings > Finance > Configure Revenue Event Types** in the Zuora UI.
              type: string
            notes:
              description: |
                Additional information about this record.
              type: string
          required:
            - eventTypeSystemId
            - eventType
          type: object
        - $ref: "#/components/schemas/RevenueEventObjectCustomFields"
      description: |
        Represents a change to a revenue schedule, such as posting an invoice or distributing revenue.
      title: RevenueEvent
    POSTRevenueScheduleByDateRangeType:
      allOf:
        - properties:
            distributionType:
              description: |
                How you want to distribute the revenue. 


                * Daily Distribution: Distributes revenue evenly across each day between the recognitionStart and recognitionEnd dates.
                * Monthly Distribution (Back Load): Back loads the revenue so you distribute the monthly amount in the partial month in the end only.
                * Monthly Distribution (Front Load): Front loads the revenue so you distribute the monthly amount in the partial month in the beginning only.
                * Monthly Distribution (Proration by Days): Splits the revenue amount between the two partial months.

                **Note:** To use any of the Monthly Distribution options, you must have the "Monthly recognition over time" model enabled in **Settings > Finance > Manage Revenue Recognition Models** in the Zuora UI.
              enum:
                - Daily Distribution
                - Monthly Distribution (Back Load)
                - Monthly Distribution (Front Load)
                - Monthly Distribution (Proration by Days)
              type: string
            notes:
              description: |
                Additional information about this record.
              type: string
            recognitionEnd:
              description: |
                The end date of a recognition period in `yyyy-mm-dd` format. 

                The maximum difference between the `recognitionStart` and `recognitionEnd` date fields is equal to 250 multiplied by the length of an accounting period.
              format: date
              type: string
            recognitionStart:
              description: |
                The start date of a recognition period in `yyyy-mm-dd` format.

                If there is a closed accounting period between the `recognitionStart` and `recognitionEnd` dates, the revenue that would be placed in the closed accounting period is instead placed in the next open accounting period.
              format: date
              type: string
            revenueEvent:
              $ref: "#/components/schemas/POSTRevenueScheduleByDateRangeTypeRevenueEvent"
          required:
            - recognitionEnd
            - recognitionStart
            - revenueEvent
          type: object
        - $ref: "#/components/schemas/RevenueScheduleObjectCustomFields"
      example:
        distributionType: Daily distribution
        notes: Manually distribute revenue by usage
        recognitionEnd: 2016-12-31
        recognitionStart: 2016-12-1
        revenueEvent:
          eventType: Revenue Distributed
          eventTypeSystemId: RevenueDistributed__z
          notes: ""
    POSTRevenueScheduleByDateRangeTypeRevenueEvent:
      allOf:
        - properties:
            eventType:
              description: |
                Label of the revenue event type. Revenue event type labels can be duplicated. You can configure your revenue event type labels by navigating to **Settings > Finance > Configure Revenue Event Types** in the Zuora UI.

                Note that `Credit Memo Posted` and `Debit Memo Posted` are only available if you enable the Invoice Settlement feature.
              enum:
                - Invoice Posted
                - Invoice Item Adjustment Created
                - Invoice Canceled
                - Invoice Item Adjustment Canceled
                - Revenue Distributed
                - Credit Memo Posted
                - Debit Memo Posted
              type: string
            eventTypeSystemId:
              description: |
                System ID of the revenue event type. Each eventType has a unique system ID. You can configure your revenue event type system IDs by navigating to **Settings > Finance > Configure Revenue Event Types** in the Zuora UI.

                Required only if there is more than one revenue event type with the same label.
              type: string
            notes:
              description: ""
              type: string
          type: object
        - $ref: "#/components/schemas/RevenueEventObjectCustomFields"
      description: |
        Must specify at least one of `eventType` or `eventTypeSystemId`.
      title: RevenueEvent
    POSTRevenueScheduleByTransactionRatablyCMType:
      allOf:
        - properties:
            distributionType:
              description: |
                How you want to distribute the revenue.

                * Daily Distribution: Distributes revenue evenly across each day between the recognitionStart and recognitionEnd dates.
                * Monthly Distribution (Back Load): Back loads the revenue so you distribute the monthly amount in the partial month in the end only.
                * Monthly Distribution (Front Load): Front loads the revenue so you distribute the monthly amount in the partial month in the beginning only.
                * Monthly Distribution (Proration by Days): Splits the revenue amount between the two partial months.

                **Note:** To use any of the Monthly Distribution options, you must have the "Monthly recognition over time" model enabled in **Settings > Finance > Manage Revenue Recognition Models** in the Zuora UI.
              type: string
            notes:
              description: |
                Additional information about this record.
              maxLength: 2000
              minLength: 0
              type: string
            recognitionEnd:
              description: |
                The end date of a recognition period in `yyyy-mm-dd` format.

                The maximum difference between the `recognitionStart` and `recognitionEnd` date fields is equal to 250 multiplied by the length of an accounting period.
              format: date
              type: string
            recognitionStart:
              description: |
                The start date of a recognition period in `yyyy-mm-dd` format.

                If there is a closed accounting period between the `recognitionStart` and `recognitionEnd` dates, the revenue that would be placed in the closed accounting period is instead placed in the next open accounting period.
              format: date
              type: string
            revenueEvent:
              $ref: "#/components/schemas/POSTRevenueScheduleByTransactionRatablyTypeRevenueEvent"
          required:
            - recognitionEnd
            - recognitionStart
          type: object
        - $ref: "#/components/schemas/RevenueScheduleObjectCustomFields"
      example:
        distributionType: daily distribution
        notes: notes
        recognitionEnd: 2016-12-31
        recognitionStart: 2016-01-01
        revenueEvent:
          eventType: Credit Memo Posted
          eventTypeSystemId: CreditMemoPosted__z
          notes: some notes
    POSTRevenueScheduleByTransactionRatablyDMType:
      allOf:
        - properties:
            distributionType:
              description: |
                How you want to distribute the revenue.

                * Daily Distribution: Distributes revenue evenly across each day between the recognitionStart and recognitionEnd dates.
                * Monthly Distribution (Back Load): Back loads the revenue so you distribute the monthly amount in the partial month in the end only.
                * Monthly Distribution (Front Load): Front loads the revenue so you distribute the monthly amount in the partial month in the beginning only.
                * Monthly Distribution (Proration by Days): Splits the revenue amount between the two partial months.

                **Note:** To use any of the Monthly Distribution options, you must have the "Monthly recognition over time" model enabled in **Settings > Finance > Manage Revenue Recognition Models** in the Zuora UI.
              type: string
            notes:
              description: |
                Additional information about this record.
              maxLength: 2000
              minLength: 0
              type: string
            recognitionEnd:
              description: |
                The end date of a recognition period in `yyyy-mm-dd` format.

                The maximum difference between the `recognitionStart` and `recognitionEnd` date fields is equal to 250 multiplied by the length of an accounting period.
              format: date
              type: string
            recognitionStart:
              description: |
                The start date of a recognition period in `yyyy-mm-dd` format.

                If there is a closed accounting period between the `recognitionStart` and `recognitionEnd` dates, the revenue that would be placed in the closed accounting period is instead placed in the next open accounting period.
              format: date
              type: string
            revenueEvent:
              $ref: "#/components/schemas/POSTRevenueScheduleByTransactionRatablyTypeRevenueEvent"
          required:
            - recognitionEnd
            - recognitionStart
          type: object
        - $ref: "#/components/schemas/RevenueScheduleObjectCustomFields"
      example:
        distributionType: daily distribution
        notes: notes
        recognitionEnd: 2016-12-31
        recognitionStart: 2016-01-01
        revenueEvent:
          eventType: Debit Memo Posted
          eventTypeSystemId: DebitMemoPosted__z
          notes: some notes
    POSTRevenueScheduleByTransactionRatablyTypeRevenueEvent:
      allOf:
        - properties:
            eventType:
              description: |
                The label of the revenue event type. Revenue event type labels can be duplicated. You can configure your revenue event type labels by navigating to **Settings > Finance > Configure Revenue Event Types** in the Zuora UI.

                Note that `Credit Memo Posted` and `Debit Memo Posted` are only available if you enable the Invoice Settlement feature.
              maxLength: 50
              minLength: 0
              type: string
            eventTypeSystemId:
              description: |
                System ID of the revenue event type. Each eventType has a unique system ID. You can configure your revenue event type system IDs by navigating to **Settings > Finance > Configure Revenue Event Types** in the Zuora UI.

                Required only if there is more than one revenue event type with the same label.
              maxLength: 50
              minLength: 0
              type: string
            notes:
              description: |
                Additional information about the revenue event.
              maxLength: 2000
              minLength: 0
              type: string
          type: object
        - $ref: "#/components/schemas/RevenueEventObjectCustomFields"
      description: |
        Must specify at least one of `eventType` or `eventTypeSystemId`.
      title: RevenueEvent
    POSTRevenueScheduleByTransactionResponseType:
      properties:
        revenueScheduleNumber:
          description: |
            Revenue schedule number. The revenue schedule number is always prefixed with "RS", for example, "RS-00000001".
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    POSTRevenueScheduleByTransactionType:
      allOf:
        - properties:
            notes:
              description: |
                Additional information about this record.

                Character Limit: 2,000
              type: string
            revenueDistributions:
              description: |
                An array of revenue distributions. Represents how you want to distribute revenue for this revenue schedule. You can distribute revenue into a maximum of 250 accounting periods with one revenue schedule.

                The sum of new Amounts must equal the the Charge Amount of the specified Invoice Item.
              items:
                $ref: "#/components/schemas/POSTDistributionItemType"
              type: array
            revenueEvent:
              $ref: "#/components/schemas/POSTRevenueScheduleByTransactionTypeRevenueEvent"
          type: object
        - $ref: "#/components/schemas/RevenueScheduleObjectCustomFields"
      example:
        revenueDistributions:
          - accountingPeriodName: Jan '16
            newAmount: "20"
          - accountingPeriodName: Open-Ended
            newAmount: "30"
        revenueEvent:
          eventType: Revenue Distributed
          eventTypeSystemId: RevenueDistributed__z
          notes: My notes
    POSTRevenueScheduleByTransactionTypeRevenueEvent:
      allOf:
        - properties:
            eventType:
              description: |
                Label of the revenue event type. Revenue event type labels can be duplicated. You can configure your revenue event type labels by navigating to **Settings > Finance > Configure Revenue Event Types** in the Zuora UI.

                Note that `Credit Memo Posted` and `Debit Memo Posted` are only available if you enable the Invoice Settlement feature.
              enum:
                - Invoice Posted
                - Invoice Item Adjustment Created
                - Invoice Canceled
                - Invoice Item Adjustment Canceled
                - Revenue Distributed
                - Credit Memo Posted
                - Debit Memo Posted
              type: string
            eventTypeSystemId:
              description: |
                System ID of the revenue event type. Each eventType has a unique system ID. You can configure your revenue event type system IDs by navigating to **Settings > Finance > Configure Revenue Event Types** in the Zuora UI.

                Required only if there is more than one revenue event type with the same label.
              type: string
            notes:
              description: |
                Additional information about this record.
              type: string
          type: object
        - $ref: "#/components/schemas/RevenueEventObjectCustomFields"
      description: |
        Represents a change to a revenue schedule, such as posting an invoice or distributing revenue.

        You must specify the `eventType` or the `eventTypeSystemID`, or both. If you have configured more than one revenue event type with the same label, you must specify the `eventTypeSystemId`.
      title: RevenueEvent
    POSTReversePaymentRequest:
      example:
        amount: 100
        gatewayResponse: Insufficient funds
        gatewayResponseCode: "023"
        referenceId: "825522036728874689"
        secondReferenceId: "825522036690700110"
        settledOn: 2019-05-07 20:56:32.981
      properties:
        amount:
          description: |
            The amount that needs to be reversed (chargeback). It cannot be greater than the total Payment amount. 
          type: number
        gatewayResponse:
          description: |
            The transaction response returned by the gateway for this transaction. If the transaction was declined, this reason is provided in the message.
          type: string
        gatewayResponseCode:
          description: |
            Response message Code returned by the gateway about the transaction status.
          type: string
        referenceId:
          description: |
            Unique Id generated by the gateway for each transaction. Use this ID to find the respective Zuora Payment ID. 
          maxLength: 100
          type: string
        secondReferenceId:
          description: |
            The second reference Id. Some gateways use two unique transaction IDs.
          maxLength: 100
          type: string
        settledOn:
          description: |
            The date and time of the transaction settlement. The format is `yyyy-mm-dd hh:mm:ss`.
          format: date-time
          type: string
      required:
        - amount
      type: object
    POSTReversePaymentResponse:
      properties:
        accountId:
          description: |
            The ID of the customer account that the payment is for.
          type: string
        amount:
          description: |
            The total amount of the payment.
          format: double
          type: number
        cancelledOn:
          description: |
            The date and time when the payment was cancelled, in `yyyy-mm-dd hh:mm:ss` format.
          format: date-time
          type: string
        comment:
          description: |
            Comments about the payment.
          type: string
        createdById:
          description: |
            The ID of the Zuora user who created the refund.
          type: string
        createdDate:
          description: |
            The date and time when the chargeback is created, in `yyyy-mm-dd hh:mm:ss` format. For example, 2019-03-01 15:31:10.
          format: date-time
          type: string
        creditMemoId:
          description: |
            The ID of the credit memo that is refunded.
          type: string
        financeInformation:
          description: |
            Container for the finance information related to the refund.
          properties:
            bankAccountAccountingCode:
              description: |
                The accounting code that maps to a bank account in your accounting system.
              maxLength: 100
              minLength: 0
              type: string
            bankAccountAccountingCodeType:
              description: |+
                The type of the accounting code that maps to a bank account in your accounting system.
                  
              type: string
            transferredToAccounting:
              description: |
                Whether the refund was transferred to an external accounting system. Use this field for integration with accounting systems, such as NetSuite. 
              enum:
                - Processing
                - Yes
                - No
                - Error
                - Ignore
              type: string
            unappliedPaymentAccountingCode:
              description: |
                The accounting code for the unapplied payment.
              maxLength: 100
              minLength: 0
              type: string
            unappliedPaymentAccountingCodeType:
              description: |+
                The type of the accounting code for the unapplied payment.
                  
              type: string
          type: object
        gatewayId:
          description: |
            The ID of the gateway instance that processes the payment.
          type: string
        gatewayResponse:
          description: |
            The message returned from the payment gateway for the payment. This message is gateway-dependent.
          type: string
        gatewayResponseCode:
          description: |
            The code returned from the payment gateway for the payment. This code is gateway-dependent.
          type: string
        gatewayState:
          description: |
            The status of the payment in the gateway; used for reconciliation.
          enum:
            - MarkedForSubmission
            - Submitted
            - Settled
            - NotSubmitted
            - FailedToSettle
          type: string
        id:
          description: |
            The ID of the payment chargeback.
          type: string
        markedForSubmissionOn:
          description: |
            The date and time when a charge was marked and waiting for batch submission to the payment process, in `yyyy-mm-dd hh:mm:ss` format.
          format: date-time
          type: string
        methodType:
          description: |
            How an external refund was issued to a customer. 
          enum:
            - ACH
            - Cash
            - Check
            - CreditCard
            - PayPal
            - WireTransfer
            - DebitCard
            - CreditCardReferenceTransaction
            - BankTransfer
            - Other
          type: string
        number:
          description: |
            The unique identification number of the payment. For example, P-00000001.
          type: string
        paymentId:
          description: |
            The ID of the payment that is refunded.
          type: string
        paymentMethodId:
          description: |
            The unique ID of the payment method that the customer used to make the payment.
          type: string
        paymentMethodSnapshotId:
          description: |
            The unique ID of the payment method snapshot which is a copy of the particular Payment Method used in a transaction.
          type: string
        reasonCode:
          description: |
            A code identifying the reason for the transaction.   
          type: string
        referenceId:
          description: |
            The transaction ID returned by the payment gateway for an electronic refund. Use this field to reconcile refunds between your gateway and Zuora Payments.
          type: string
        refundDate:
          description: |
            The date when the refund takes effect, in `yyyy-mm-dd` format. For example, 2017-03-01.
          format: date
          type: string
        refundTransactionTime:
          description: |
            The date and time when the refund was issued, in `yyyy-mm-dd hh:mm:ss` format.
          format: date-time
          type: string
        secondRefundReferenceId:
          description: |
            The transaction ID returned by the payment gateway if there is an additional refund. 
          type: string
        settledOn:
          description: |
            The date and time when the transaction is settled, in `yyyy-mm-dd hh:mm:ss` format.
          format: date-time
          type: string
        softDescriptor:
          description: |
            A payment gateway-specific field that maps Zuora to other gateways.
          type: string
        softDescriptorPhone:
          description: |
            A payment gateway-specific field that maps Zuora to other gateways.          
          type: string
        status:
          description: |
            The status of the payment.
          type: string
        submittedOn:
          description: |
            The date and time when the payment was submitted, in yyyy-mm-dd hh:mm:ss format.
          format: date-time
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
        type:
          description: |
            The type of the payment.
          enum:
            - External
            - Electronic
          type: string
        updatedById:
          description: |
            The ID of the Zuora user who last updated the payment.
          type: string
        updatedDate:
          description: |
            The date and time when the payment was last updated, in `yyyy-mm-dd hh:mm:ss` format. For example, 2019-03-02 15:36:10.
          format: date-time
          type: string
      type: object
    POSTScCreateType:
      allOf:
        - properties:
            applyDiscountTo:
              description: |
                Specifies the type of charges that you want a specific discount to apply to.

                Values:

                * `ONETIME`
                * `RECURRING`
                * `USAGE`
                * `ONETIMERECURRING`
                * `ONETIMEUSAGE`
                * `RECURRINGUSAGE`
                * `ONETIMERECURRINGUSAGE`
              type: string
            billCycleDay:
              description: |
                Sets the bill cycle day (BCD) for the charge. The BCD determines which day of the month the customer is billed.

                Values: `1`-`31`
              type: string
            billCycleType:
              description: |
                Specifies how to determine the billing day for the charge. When this field is set to `SpecificDayofMonth`, set the `BillCycleDay` field. When this field is set to `SpecificDayofWeek`, set the `weeklyBillCycleDay` field.

                Values:

                * `DefaultFromCustomer`
                * `SpecificDayofMonth`
                * `SubscriptionStartDay`
                * `ChargeTriggerDay`
                * `SpecificDayofWeek`
              type: string
            billingPeriod:
              description: |
                Billing period for the charge. The start day of the billing period is also called the bill cycle day (BCD).

                Values:

                * `Month`
                * `Quarter`
                * `Semi_Annual`
                * `Annual`
                * `Eighteen_Months`
                * `Two_Years`
                * `Three_Years`
                * `Five_Years`
                * `Specific_Months`
                * `Subscription_Term`
                * `Week`
                * `Specific_Weeks`
              type: string
            billingPeriodAlignment:
              description: |
                Aligns charges within the same subscription if multiple charges begin on different dates.

                Values:

                * `AlignToCharge`
                * `AlignToSubscriptionStart`
                * `AlignToTermStart`
              type: string
            billingTiming:
              description: |
                Billing timing for the charge for recurring charge types. Not avaliable for one time, usage, and discount charges.

                Values:

                * `IN_ADVANCE` (default)
                * `IN_ARREARS`
              type: string
            chargeModelConfiguration:
              $ref: "#/components/schemas/ChargeModelConfigurationType"
            description:
              description: |
                Description of the charge.
              type: string
            discountAmount:
              description: |
                Specifies the amount of fixed-amount discount.
              type: number
            discountLevel:
              description: |
                Specifies if the discount applies to the product rate plan only, the entire subscription, or to any activity in the account.

                Values:

                * `rateplan`
                * `subscription`
                * `account`
              type: string
            discountPercentage:
              description: |
                Percentage of discount for a percentage discount. 
              type: number
            endDateCondition:
              description: |
                Defines when the charge ends after the charge trigger date. If the subscription ends before the charge end date, the charge ends when the subscription ends. But if the subscription end date is subsequently changed through a Renewal, or Terms and Conditions amendment, the charge will end on the charge end date.

                Values:

                * `Subscription_End`
                * `Fixed_Period`
                * `Specific_End_Date`
              type: string
            includedUnits:
              description: |
                Specifies the number of units in the base set of units for this charge. Must be >=`0`.
              type: number
            listPriceBase:
              description: |
                The list price base for the product rate plan charge.

                Values:

                * `Per_Billing_Period`
                * `Per_Month`
                * `Per_Week`
              type: string
            number:
              description: |
                Unique number that identifies the charge. Max 50 characters. System-generated if not provided.
              type: string
            numberOfPeriods:
              description: |
                Specifies the number of periods to use when calculating charges in an overage smoothing charge model.
              format: int64
              type: integer
            overagePrice:
              description: |
                Price for units over the allowed amount.
              type: number
            overageUnusedUnitsCreditOption:
              description: |
                Determines whether to credit the customer with unused units of usage.

                Values:

                * `NoCredit`
                * `CreditBySpecificRate`
              type: string
            price:
              description: |
                Price for units in the subscription rate plan.
              type: number
            priceChangeOption:
              description: |
                Applies an automatic price change when a termed subscription is renewed. The Billing Admin setting **Enable Automatic Price Change When Subscriptions are Renewed?** must be set to Yes to use this field.
                Values:

                * `NoChange` (default)
                * `SpecificPercentageValue`
                * `UseLatestProductCatalogPricing`
              type: string
            priceIncreasePercentage:
              description: |
                Specifies the percentage to increase or decrease the price of a termed subscription's renewal. Required if you set the `PriceChangeOption` field to `SpecificPercentageValue`. 

                Value must be a decimal between `-100` and `100`.
              type: number
            productRatePlanChargeId:
              description: |
                ID of a product rate-plan charge for this subscription.
              type: string
            quantity:
              description: |
                Number of units. Must be a decimal >=`0`. 

                When using `chargeOverrides` for creating subscriptions with recurring charge types, the `quantity` field must be populated when the charge model is "Tiered Pricing" or "Volume Pricing". It is not required for "Flat Fee Pricing" charge model.
              type: number
            ratingGroup:
              description: |
                Specifies a rating group based on which usage records are rated.

                Possible values:

                - `ByBillingPeriod` (default): The rating is based on all the usages in a billing period.
                - `ByUsageStartDate`: The rating is based on all the usages on the same usage start date. 
                - `ByUsageRecord`: The rating is based on each usage record.
                - `ByUsageUpload`: The rating is based on all the  usages in a uploaded usage file (`.xls` or `.csv`).
                - `ByGroupId`: The rating is based on all the usages in a custom group.

                **Note:** 
                - The `ByBillingPeriod` value can be applied for all charge models. 
                - The `ByUsageStartDate`, `ByUsageRecord`, and `ByUsageUpload` values can only be applied for per unit, volume pricing, and tiered pricing charge models. 
                - The `ByGroupId` value is only available if you have the Active Rating feature enabled.
                - Use this field only for Usage charges. One-Time Charges and Recurring Charges return `NULL`.
              type: string
            specificBillingPeriod:
              description: |
                Specifies the number of month or week for the charges billing period. Required if you set the value of the `billingPeriod` field to `Specific_Months` or `Specific_Weeks`.
              format: int64
              type: integer
            specificEndDate:
              description: |
                Defines when the charge ends after the charge trigger date.

                **note:**

                * This field is only applicable when the `endDateCondition` field is set to `Specific_End_Date`.

                * If the subscription ends before the specific end date, the charge ends when the subscription ends. But if the subscription end date is subsequently changed through a Renewal, or Terms and Conditions amendment, the charge will end on the specific end date.
              format: date
              type: string
            tiers:
              description: |
                Container for Volume, Tiered, or Tiered with Overage charge models. Supports the following charge types:

                * One-time
                * Recurring
                * Usage-based
              items:
                $ref: "#/components/schemas/POSTTierType"
              type: array
            triggerDate:
              description: |
                Specifies when to start billing the customer for the charge. Required if the `triggerEvent` field is set to `USD`.
              format: date
              type: string
            triggerEvent:
              description: |
                Specifies when to start billing the customer for the charge.

                Values:

                * `UCE`
                * `USA`
                * `UCA`
                * `USD`
              type: string
            unusedUnitsCreditRates:
              description: |
                Specifies the rate to credit a customer for unused units of usage. This field applies only for overage charge models when the `OverageUnusedUnitsCreditOption` field is set to `CreditBySpecificRate`.
              type: number
            upToPeriods:
              description: |
                Specifies the length of the period during which the charge is active. If this period ends before the subscription ends, the charge ends when this period ends.

                **Note:** You must use this field together with the `upToPeriodsType` field to specify the time period.

                * This field is applicable only when the `endDateCondition` field is set to `Fixed_Period`. 
                * If the subscription end date is subsequently changed through a Renewal, or Terms and Conditions amendment, the charge end date will change accordingly up to the original period end.
              format: int64
              type: integer
            upToPeriodsType:
              description: |
                
                The period type used to define when the charge ends. 

                Values:

                * `Billing_Periods`
                * `Days`
                * `Weeks`
                * `Months`
                * `Years`

                You must use this field together with the `upToPeriods` field to specify the time period.

                This field is applicable only when the `endDateCondition` field is set to `Fixed_Period`. 
              type: string
            weeklyBillCycleDay:
              description: |
                Specifies which day of the week is the bill cycle day (BCD) for the charge. 

                Values:

                * `Sunday`
                * `Monday`
                * `Tuesday`
                * `Wednesday`
                * `Thursday`
                * `Friday`
                * `Saturday`
              type: string
          required:
            - productRatePlanChargeId
          type: object
        - $ref: "#/components/schemas/RatePlanChargeObjectCustomFields"
      title: chargeOverrides
    POSTSequenceSetRequest:
      description: ""
      properties:
        creditMemo:
          $ref: "#/components/schemas/CreditMemoEntityPrefix"
        debitMemo:
          $ref: "#/components/schemas/DebitMemoEntityPrefix"
        invoice:
          $ref: "#/components/schemas/InvoiceEntityPrefix"
        name:
          description: |
            The name of the sequence set to configure for billing documents, payments, and refunds.
          example: FRANCE
          type: string
        payment:
          $ref: "#/components/schemas/PaymentEntityPrefix"
        refund:
          $ref: "#/components/schemas/RefundEntityPrefix"
      required:
        - name
        - invoice
        - creditMemo
        - debitMemo
      title: sequenceSets
      type: object
    POSTSequenceSetsRequest:
      description: ""
      example:
        sequenceSets:
          - creditMemo:
              prefix: FCM
              startNumber: 10
            debitMemo:
              prefix: FDM
              startNumber: 10
            invoice:
              prefix: FINV
              startNumber: 10
            name: FR
            payment:
              prefix: FP-
              startNumber: 10
            refund:
              prefix: FR-
              startNumber: 10
          - creditMemo:
              prefix: ICM
              startNumber: 10
            debitMemo:
              prefix: IDM
              startNumber: 10
            invoice:
              prefix: IINV
              startNumber: 10
            name: ITA
            payment:
              prefix: IP-
              startNumber: 10
            refund:
              prefix: IR-
              startNumber: 10
      properties:
        sequenceSets:
          description: |
            Array of sequence sets configured for billing documents, payments, and refunds.
          items:
            $ref: "#/components/schemas/POSTSequenceSetRequest"
          type: array
      type: object
    POSTSequenceSetsResponse:
      description: ""
      properties:
        sequenceSets:
          description: |
            Array of sequence sets configured for billing documents, payments, and refunds.
          items:
            $ref: "#/components/schemas/GETSequenceSetResponse"
          type: array
        success:
          description: |
            Indicates whether the call succeeded.
          example: true
          type: boolean
      type: object
    POSTSettlePaymentRequest:
      example:
        settledOn: 2019-05-07 20:56:32.981
      properties:
        settledOn:
          description: |
            The date and time of the transaction settlement. The format is `yyyy-mm-dd hh:mm:ss`.
          format: date-time
          type: string
      type: object
    POSTSettlePaymentResponse:
      properties:
        accountId:
          description: |
            The ID of the customer account that the payment is for.
          type: string
        amount:
          description: |
            The total amount of the payment.
          format: double
          type: number
        appliedAmount:
          description: |
            The applied amount of the payment.
          format: double
          type: number
        authTransactionId:
          description: |
            The authorization transaction ID from the payment gateway.
          type: string
        bankIdentificationNumber:
          description: |
            The first six digits of the credit card or debit card used for the payment, when applicable.
          type: string
        cancelledOn:
          description: |
            The date and time when the payment was cancelled, in `yyyy-mm-dd hh:mm:ss` format.
          format: date-time
          type: string
        comment:
          description: |
            Comments about the payment.
          type: string
        createdById:
          description: |
            The ID of the Zuora user who created the refund.
          type: string
        createdDate:
          description: |
            The date and time when the chargeback is created, in `yyyy-mm-dd hh:mm:ss` format. For example, 2019-03-01 15:31:10.
          format: date-time
          type: string
        creditBalanceAmount:
          description: |
            The amount that the payment transfers to the credit balance. The value is not `0` only for those payments that come from legacy payment operations performed without the Invoice Settlement feature.
          format: double
          type: number
        currency:
          description: |
            A currency defined in the web-based UI administrative settings.
          type: string
        effectiveDate:
          description: |
            The date and time when the payment takes effect, in `yyyy-mm-dd hh:mm:ss` format.
          format: date-time
          type: string
        financeInformation:
          description: |
            Container for the finance information related to the refund.
          properties:
            bankAccountAccountingCode:
              description: |
                The accounting code that maps to a bank account in your accounting system.
              maxLength: 100
              minLength: 0
              type: string
            bankAccountAccountingCodeType:
              description: |+
                The type of the accounting code that maps to a bank account in your accounting system.
                  
              type: string
            transferredToAccounting:
              description: |
                Whether the refund was transferred to an external accounting system. Use this field for integration with accounting systems, such as NetSuite. 
              enum:
                - Processing
                - Yes
                - No
                - Error
                - Ignore
              type: string
            unappliedPaymentAccountingCode:
              description: |
                The accounting code for the unapplied payment.
              maxLength: 100
              minLength: 0
              type: string
            unappliedPaymentAccountingCodeType:
              description: |+
                The type of the accounting code for the unapplied payment.
                  
              type: string
          type: object
        gatewayId:
          description: |
            The ID of the gateway instance that processes the payment.
          type: string
        gatewayOrderId:
          description: |
            A merchant-specified natural key value that can be passed to the electronic payment gateway when a payment is created. If not specified, the payment number will be passed in instead.
          type: string
        gatewayResponse:
          description: |
            The message returned from the payment gateway for the payment. This message is gateway-dependent.
          type: string
        gatewayResponseCode:
          description: |
            The code returned from the payment gateway for the payment. This code is gateway-dependent.
          type: string
        gatewayState:
          description: |
            The status of the payment in the gateway; used for reconciliation.
          enum:
            - MarkedForSubmission
            - Submitted
            - Settled
            - NotSubmitted
            - FailedToSettle
          type: string
        id:
          description: |
            The ID of the payment chargeback.
          type: string
        markedForSubmissionOn:
          description: |
            The date and time when a charge was marked and waiting for batch submission to the payment process, in `yyyy-mm-dd hh:mm:ss` format.
          format: date-time
          type: string
        number:
          description: |
            The unique identification number of the payment. For example, P-00000001.
          type: string
        paymentMethodId:
          description: |
            The unique ID of the payment method that the customer used to make the payment.
          type: string
        paymentMethodSnapshotId:
          description: |
            The unique ID of the payment method snapshot which is a copy of the particular Payment Method used in a transaction.
          type: string
        referenceId:
          description: |
            The transaction ID returned by the payment gateway for an electronic refund. Use this field to reconcile refunds between your gateway and Zuora Payments.
          type: string
        refundAmount:
          description: |
            The amount of the payment that is refunded.
          format: double
          type: number
        secondPaymentReferenceId:
          description: |
            The transaction ID returned by the payment gateway if there is an additional transaction for the payment. 
          type: string
        settledOn:
          description: |
            The date and time when the transaction is settled, in `yyyy-mm-dd hh:mm:ss` format.
          format: date-time
          type: string
        softDescriptor:
          description: |
            A payment gateway-specific field that maps Zuora to other gateways.
          type: string
        softDescriptorPhone:
          description: |
            A payment gateway-specific field that maps Zuora to other gateways.
          type: string
        status:
          description: |
            The status of the payment.
          type: string
        submittedOn:
          description: |
            The date and time when the payment was submitted, in `yyyy-mm-dd hh:mm:ss` format.
          format: date-time
          type: string
        success:
          description: |
            Indicates if the request is processed successfully.
          type: boolean
        type:
          description: |
            The type of the payment.
          enum:
            - External
            - Electronic
          type: string
        unappliedAmount:
          description: |
            The unapplied amount of the payment.
          format: double
          type: number
        updatedById:
          description: |
            The ID of the Zuora user who last updated the payment.
          type: string
        updatedDate:
          description: |
            The date and time when the payment was last updated, in `yyyy-mm-dd hh:mm:ss` format. For example, 2019-03-02 15:36:10.
          format: date-time
          type: string
      type: object
    POSTSrpCreateType:
      allOf:
        - properties:
            chargeOverrides:
              description: |
                This optional container is used to override the quantity of one or more product rate plan charges for this subscription.
              items:
                $ref: "#/components/schemas/POSTScCreateType"
              type: array
            productRatePlanId:
              description: |
                ID of a product rate plan for this subscription.
              type: string
          required:
            - productRatePlanId
          type: object
        - $ref: "#/components/schemas/RatePlanObjectCustomFields"
      title: subscribeToRatePlans
    POSTSubscriptionCancellationResponseType:
      properties:
        cancelledDate:
          description: |
            The date that the subscription was canceled.
          format: date
          type: string
        creditMemoId:
          description: |
            The credit memo ID, if a credit memo is generated during the subscription process.

            **Note:** This container is only available if you set the Zuora REST API minor version to 207.0 or later in the request header, and you have  [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
          type: string
        invoiceId:
          description: |
            ID of the invoice, if one is generated.
          type: string
        paidAmount:
          description: |
            Amount paid.
          type: number
        paymentId:
          description: |
            ID of the payment, if a payment is collected.
          type: string
        subscriptionId:
          description: |
            The subscription ID.
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
        totalDeltaMrr:
          description: |
            Change in the subscription monthly recurring revenue as a result of the update.
          type: number
        totalDeltaTcv:
          description: |
            Change in the total contracted value of the subscription as a result of the update.
          type: number
      type: object
    POSTSubscriptionCancellationType:
      example:
        cancellationEffectiveDate: 2019-05-31
        cancellationPolicy: SpecificDate
        collect: false
        runBilling: true
      properties:
        applicationOrder:
          description: |
            The priority order to apply credit memos and/or unapplied payments to an invoice. Possible item values are: `CreditMemo`, `UnappliedPayment`.

            **Note:**
              - This field is valid only if the `applyCredit` field is set to `true`.
              - If no value is specified for this field, the default priority order is used, ["CreditMemo", "UnappliedPayment"], to apply credit memos first and then apply unapplied payments.
              - If only one item is specified, only the items of the spedified type are applied to invoices. For example, if the value is `["CreditMemo"]`, only credit memos are used to apply to invoices.
          items:
            type: string
          type: array
        applyCredit:
          description: |
            Whether to automatically apply credit memos or unapplied payments, or both to an invoice.

            If the value is `true`, the credit memo or unapplied payment, or both will be automatically applied to the invoice. If no value is specified or the value is `false`, no action is taken.

            **Note:** This field is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
          type: boolean
        applyCreditBalance:
          description: |
            Whether to automatically apply a credit balance to an invoice.

            If the value is `true`, the credit balance is applied to the invoice. If the value is `false`, no action is taken.


            To view the credit balance adjustment, retrieve the details of the invoice using the Get Invoices method.

            Prerequisite: `invoice` must be `true`. 

            **Note:** 
              - If you are using the field `invoiceCollect` rather than the field `invoice`, the `invoiceCollect` value must be `true`.
              - This field is deprecated if you have the Invoice Settlement feature enabled.
          type: boolean
        cancellationEffectiveDate:
          description: |
            Date the cancellation takes effect, in the format yyyy-mm-dd.  Use only if `cancellationPolicy` is `SpecificDate`. Should not be earlier than the subscription contract-effective date, later than the subscription term-end date, or within a period for which the customer has been invoiced.
          format: date
          type: string
        cancellationPolicy:
          description: |
            Cancellation method. Possible values are: `EndOfCurrentTerm`, `EndOfLastInvoicePeriod`, `SpecificDate`. If using `SpecificDate`, the `cancellationEffectiveDate` field is required.
          type: string
        collect:
          default: false
          description: |
            Collects an automatic payment for a subscription. The collection generated in this operation is only for this subscription, not for the entire customer account.

            If the value is `true`, the automatic payment is collected. If the value is `false`, no action is taken.

            Prerequisite: The `invoice` or `runBilling` field must be `true`. 

            **Note**: This field is only available if you set the `zuora-version` request header to `196.0` or later.
          type: boolean
        contractEffectiveDate:
          description: |
            The date when the customer notifies you that they want to cancel their subscription.
          format: date
          type: string
        documentDate:
          description: |
            The date of the billing document, in `yyyy-mm-dd` format. It represents the invoice date for invoices, credit memo date for credit memos, and debit memo date for debit memos.

            - If this field is specified, the specified date is used as the billing document date. 
            - If this field is not specified, the date specified in the `targetDate` is used as the billing document date.
          format: date
          type: string
        invoice:
          description: |
            **Note:** This field has been replaced by the `runBilling` field. The
            `invoice` field is only available for backward compatibility.


            Creates an invoice for a subscription. The invoice generated in this
            operation is only for this subscription, not for the entire customer
            account.


            If the value is `true`, an invoice is created. If the value is
            `false`, no action is taken. The default value is `false`. 


            This field is in Zuora REST API version control. Supported minor
            versions are `196.0` and `207.0`. To use this field in the method, you
            must set the zuora-version parameter to the minor version number in
            the request header. 
          type: boolean
        invoiceCollect:
          default: false
          description: |
            This field has been replaced by the `invoice` field and the
            `collect` field. `invoiceCollect` is available only for backward compatibility.

            If this field is set to `true`, an invoice is generated and payment automatically collected.

            **Note**: This field is only available if you set the `zuora-version` request header to `186.0`, `187.0`, `188.0`, or `189.0`.
          type: boolean
        invoiceTargetDate:
          description: |
            **Note:** This field has been replaced by the `targetDate` field. The
            `invoiceTargetDate` field is only available for backward
            compatibility.


            Date through which to calculate charges if an invoice is generated, as
            yyyy-mm-dd. Default is current date.


            This field is in Zuora REST API version control. Supported minor
            versions are `207.0` and earlier.  
          format: date
          type: string
        runBilling:
          default: false
          description: |
            Creates an invoice for a subscription. If you have the Invoice Settlement feature enabled, a credit memo might also be created based on the [invoice and credit memo generation rule](https://knowledgecenter.zuora.com/CB_Billing/Invoice_Settlement/Credit_and_Debit_Memos/Rules_for_Generating_Invoices_and_Credit_Memos).  


            The billing documents generated
            in this operation is only for this subscription, not for the entire
            customer account.


            Possible values:

            - `true`: An invoice is created. If you have the Invoice Settlement feature enabled, a credit memo might also be created.


            - `false`: No invoice is created.


            **Note:** This field is in Zuora REST API version control. Supported
            minor versions are `211.0` or later. To use this field in the method,
            you must set the `zuora-version` parameter to the minor version number
            in the request header.
          enum:
            - true
            - false
          type: boolean
        targetDate:
          description: |
            Date through which to calculate charges if an invoice or a credit memo is generated, as
            yyyy-mm-dd. Default is current date.


            **Note:** The credit memo is only available if you have the Invoice Settlement feature enabled.


            This field is in Zuora REST API version control. Supported minor
            versions are `211.0` and later. To use this field in the method, you
            must set the  `zuora-version` parameter to the minor version number in
            the request header.
          format: date
          type: string
      required:
        - cancellationPolicy
        - invoiceCollect
      type: object
    POSTSubscriptionPreviewCreditMemoItemsType:
      properties:
        amountWithoutTax:
          description: |
            The credit memo item amount excluding tax.
          format: double
          type: number
        chargeAmount:
          description: |
            The amount of the credit memo item. For tax-inclusive credit memo items, the amount indicates the credit memo item amount including tax. For tax-exclusive credit memo items, the amount indicates the credit memo item amount excluding tax
          format: double
          type: number
        chargeDescription:
          description: |
            Description of this credit memo item.
          type: string
        chargeName:
          description: |
            Name of this credit memo item.
          type: string
        productName:
          description: |
            Name of the product associated with this credit memo item.
          type: string
        productRatePlanChargeId:
          description: |
            ID of the product rate plan charge associated with this credit memo item.
          type: string
        quantity:
          description: |
            Quantity of the charge associated with this credit memo item.
          type: integer
        serviceEndDate:
          description: |
            End date of the service period for this credit memo item, as yyyy-mm-dd.
          format: date
          type: string
        serviceStartDate:
          description: |
            Service start date of this credit memo item, as yyyy-mm-dd.
          format: date
          type: string
        taxAmount:
          description: |
            The tax amount of the credit memo item.
          format: double
          type: number
        unitOfMeasure:
          description: Unit used to measure consumption.
          type: string
      title: creditMemoItems
      type: object
    POSTSubscriptionPreviewInvoiceItemsType:
      properties:
        chargeAmount:
          description: |
            The amount of the charge. This amount doesn't include taxes unless the charge's tax mode is inclusive.
          type: number
        chargeDescription:
          description: |
            Description of the charge.
          type: string
        chargeName:
          description: |
            Name of the charge.
          type: string
        productName:
          description: |
            Name of the product associated with this item.
          type: string
        productRatePlanChargeId:
          description: |
            ID of the product rate plan charge.
          type: string
        quantity:
          description: |
            Quantity of this item.
          type: number
        serviceEndDate:
          description: |
            End date of the service period for this item, i.e., the last day of the period, as yyyy-mm-dd.
          format: date
          type: string
        serviceStartDate:
          description: |
            Service start date as yyyy-mm-dd. If the charge is a one-time fee, this is the date of that charge.
          format: date
          type: string
        taxAmount:
          description: |
            The tax amount of the invoice item.
          format: double
          type: number
        unitOfMeasure:
          description: ""
          type: string
      title: invoiceItems
      type: object
    POSTSubscriptionPreviewResponseType:
      properties:
        amount:
          description: |
            Invoice amount.
          type: number
        amountWithoutTax:
          description: |
            Invoice amount minus tax.
          type: number
        chargeMetrics:
          description: |
            Container for charge metrics.
          properties:
            dmrr:
              description: |
                Change in monthly recurring revenue.
              type: string
            dtcv:
              description: |
                Change in total contract value.
              type: string
            mrr:
              description: |
                Monthly recurring revenue.
              type: string
            number:
              description: |
                The charge number of the subscription. Only available for update subscription.
              type: string
            originRatePlanId:
              description: |
                The origin rate plan ID. Only available for update subscription.
              type: string
            originalId:
              description: |
                The original rate plan charge ID. Only available for update subscription.
              type: string
            productRatePlanChargeId:
              description: |
                The product rate plan charge ID.
              type: string
            productRatePlanId:
              description: |
                The product rate plan ID.
              type: string
            tcv:
              description: |
                Total contract value.
              type: string
          type: object
        contractedMrr:
          description: |
            Monthly recurring revenue of the subscription.
          type: number
        creditMemo:
          description: |
            
            Container for credit memos.

            **Note:** This container is only available if you set the Zuora REST API minor version to 207.0 or later in the request header, and you have  [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 
          properties:
            amount:
              description: Credit memo amount.
              format: double
              type: number
            amountWithoutTax:
              description: Credit memo amount minus tax.
              format: double
              type: number
            creditMemoItems:
              description: ""
              items:
                $ref: "#/components/schemas/POSTSubscriptionPreviewCreditMemoItemsType"
              type: array
            taxAmount:
              description: Tax amount on the credit memo.
              format: double
              type: number
          type: object
        invoice:
          description: |+
            Container for invoices.


             **Note:** This field is only available if you set the Zuora REST API minor version to 207.0 or later in the request header. Also, the response structure is changed and the following invoice related response fields are moved to this **invoice** container:
              
               * amount
               * amountWithoutTax
               * taxAmount
               * invoiceItems
               * targetDate
               * chargeMetrics
               
          type: object
        invoiceItems:
          description: |
            Container for invoice items.
          items:
            $ref: "#/components/schemas/POSTSubscriptionPreviewInvoiceItemsType"
          type: array
        invoiceTargetDate:
          description: |
            Date through which charges are calculated on the invoice, as yyyy-mm-dd.

            **Note:** This field is only available if you do not specify the Zuora REST API minor version or specify the minor version to 186.0, 187.0, 188.0, 189.0, and 196.0. See [Zuora REST API Versions](https://www.zuora.com/developer/api-reference/#section/API-Versions) for more information.
          format: date
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
        targetDate:
          description: |
            Date through which to calculate charges if an invoice is generated, as yyyy-mm-dd. Default is current date.

            **Note:** This field is only available if you set the Zuora REST API minor version to 207.0 or later in the request header. See [Zuora REST API Versions](https://www.zuora.com/developer/api-reference/#section/API-Versions) for more information.
          format: date
          type: string
        taxAmount:
          description: |
            Tax amount on the invoice.
          type: number
        totalContractedValue:
          description: |
            Total contracted value of the subscription.
          type: number
      type: object
    POSTSubscriptionPreviewType:
      allOf:
        - properties:
            accountKey:
              description: |
                
                Customer account number or ID.

                You must specify the account information either in this field or in the `previewAccountInfo` field with the following conditions:
                         
                * If you already have a customer account, specify the account number or ID in this field.
                * If you do not have a customer account, provide account information in the `previewAccountInfo` field.
              type: string
            contractEffectiveDate:
              description: |
                Effective contract date for this subscription, as yyyy-mm-dd.
              format: date
              type: string
            customerAcceptanceDate:
              description: |
                The date on which the services or products within a subscription have been accepted by the customer, as yyyy-mm-dd.

                Default value is dependent on the value of other fields. See **Notes** section for more details.
              format: date
              type: string
            includeExistingDraftDocItems:
              description: |
                Specifies whether to include draft invoice items in subscription previews.
                Values are:

                * `true` (default). Includes draft invoice items in the preview result.
                * `false`. Excludes draft invoice items in the preview result.

                **Note:** This field is in Zuora REST API version control. Supported minor versions are 207.0 or later. To use this field in the method, you must set the **zuora-version** parameter to the minor version number in the request header. See [Zuora REST API Versions](https://www.zuora.com/developer/api-reference/#section/API-Versions) for more information.
              type: boolean
            includeExistingDraftInvoiceItems:
              description: |
                Specifies whether to include draft invoice items in previews.
                Values are:

                * `true` (default). Includes draft invoice items in the preview result.
                * `false`. Excludes draft invoice items in the preview result.

                **Note:** This field is in Zuora REST API version control. Supported minor versions are 186.0, 187.0, 188.0, 189.0, and 196.0. See [Zuora REST API Versions](https://www.zuora.com/developer/api-reference/#section/API-Versions) for more information.
              type: boolean
            initialTerm:
              description: |
                Duration of the first term of the subscription, in whole months. If `termType` is `TERMED`, then this field is required, and the value must be greater than `0`. If `termType` is `EVERGREEN`, this field is ignored.    
              format: int64
              type: integer
            initialTermPeriodType:
              description: |+
                The period type of the initial term. 

                Supported values are:

                * `Month`
                * `Year`
                * `Day`
                * `Week`
                 
                The default period type is `Month`.

              type: string
            invoiceOwnerAccountKey:
              description: |
                Invoice owner account number or ID.

                **Note:** This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).
              type: string
            invoiceTargetDate:
              description: |
                Date through which to calculate charges if an invoice is generated, as yyyy-mm-dd. Default is current date.

                **Note:** This field is in Zuora REST API version control. Supported minor versions are 186.0, 187.0, 188.0, 189.0, and 196.0. See [Zuora REST API Versions](https://www.zuora.com/developer/api-reference/#section/API-Versions) for more information.
              format: date
              type: string
            notes:
              description: String of up to 500 characters.
              type: string
            previewAccountInfo:
              $ref: "#/components/schemas/POSTSubscriptionPreviewTypePreviewAccountInfo"
            previewType:
              description: |
                The type of preview you will receive. 

                This field is in Zuora REST API version control. The supported values of this field depend on the REST API minor version you specified in the request header.


                * If you do not specify the REST API minor version or specify the minor version number to one of following values in the request header:
                 
                  * 186.0
                  * 187.0
                  * 188.0
                  * 189.0
                  * 196.0 
                  
                  The following values are supported in the **previewType** field:

                  * InvoiceItem
                  * ChargeMetrics
                  * InvoiceItemChargeMetrics
                  
                  The default value is InvoiceItem.

                * If you specify the REST API minor version to 207.0 or later in the request header, the following values are supported in the **previewType** field:

                  - LegalDoc
                  - ChargeMetrics
                  - LegalDocChargeMetrics

                  The default value is LegalDoc.

                See [Zuora REST API Versions](https://www.zuora.com/developer/api-reference/#section/API-Versions) for more information.
              type: string
            serviceActivationDate:
              description: |
                The date on which the services or products within a subscription have been activated and access has been provided to the customer, as yyyy-mm-dd.

                Default value is dependent on the value of other fields. See **Notes** section for more details.
              format: date
              type: string
            subscribeToRatePlans:
              description: |
                Container for one or more rate plans for this subscription.
              items:
                $ref: "#/components/schemas/POSTSrpCreateType"
              type: array
            targetDate:
              description: |
                Date through which to calculate charges if an invoice is generated, as yyyy-mm-dd. Default is current date.

                **Note:** This field is in Zuora REST API version control. Supported minor versions are 207.0 or later. To use this field in the method, you must set the **zuora-version** parameter to the minor version number in the request header. See [Zuora REST API Versions](https://www.zuora.com/developer/api-reference/#section/API-Versions) for more information.
              format: date
              type: string
            termStartDate:
              description: |
                The date on which the subscription term begins, as yyyy-mm-dd. If this is a renewal subscription, this date is different from the subscription start date.
              format: date
              type: string
            termType:
              description: |
                Possible values are: `TERMED`, `EVERGREEN`.
              type: string
          required:
            - termType
            - contractEffectiveDate
            - subscribeToRatePlans
          type: object
        - $ref: "#/components/schemas/SubscriptionObjectCustomFields"
      example:
        contractEffectiveDate: 2013-1-15
        initialTerm: 12
        initialTermPeriodType: Week
        invoiceTargetDate: 2013-12-31
        previewAccountInfo:
          billCycleDay: 31
          billToContact:
            city: Walnut Creek
            country: United States
            county: Contra Consta
            state: California
            zipCode: "94549"
          currency: USD
        subscribeToRatePlans:
          - chargeOverrides:
              - productRatePlanChargeId: ff8080811ca15d19011cddad8c953b53
                quantity: 100
            productRatePlanId: ff8080811ca15d19011cdda9b0ad3b51
        termType: TERMED
    POSTSubscriptionPreviewTypePreviewAccountInfo:
      allOf:
        - properties:
            billCycleDay:
              description: |
                The account's bill cycle day (BCD), when bill runs generate invoices for the account. Specify any day of the month (`1`-`31`, where `31` = end-of-month), or `0` for auto-set.
              format: int64
              type: integer
            billToContact:
              description: |
                Container for bill-to contact information of this account.
              properties:
                city:
                  description: |
                    The city of the bill-to address. The value should be 40 characters or less.
                  type: string
                country:
                  description: |
                    The country of the bill-to address. The value must be a valid country name or abbreviation.

                    **Note:** You must specify this field if you are using Zuora Tax for this account.
                  type: string
                county:
                  description: |
                    The county of the bill-to address. The value should be 32 characters or less.
                  type: string
                state:
                  description: |
                    The state of the bill-to address. The value must be a valid state or province name or 2-character abbreviation.

                    **Note:** You must specify this field if you are using Zuora Tax for this account and the country is `USA` or `Canada`.
                  type: string
                taxRegion:
                  description: |
                    If using Zuora Tax, a region string as optionally defined in your tax rules.
                  type: string
                zipCode:
                  description: |
                    The zip code of the bill-to address. The value should be 20 characters or less.
                  type: string
              type: object
            currency:
              description: |
                A currency as defined in Billing Settings.
              type: string
          required:
            - billCycleDay
            - billToContact
            - currency
          type: object
        - $ref: "#/components/schemas/AccountObjectNSFields"
        - $ref: "#/components/schemas/AccountObjectCustomFields"
      description: |
        A container for providing a customer account information if you do not have an existing customer account. This customer account information is only used for subscription preview.

        You must specify the account information either in this field or in the `accountKey` field with the following conditions:

        * If you already have a customer account, specify the account number or ID in the accountKey field.
        * If you do not have a customer account, provide account information in this field.
      title: previewAccountInfo
    POSTSubscriptionResponseType:
      properties:
        contractedMrr:
          description: |
            Monthly recurring revenue of the subscription.
          type: number
        creditMemoId:
          description: |
            The credit memo ID, if a credit memo is generated during the subscription process.

            **Note:** This container is only available if you set the Zuora REST API minor version to 207.0 or later in the request header, and you have  [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
          type: string
        invoiceId:
          description: |
            Invoice ID, if an invoice is generated during the subscription process.
          type: string
        paidAmount:
          description: |
            Payment amount, if a payment is collected.
          type: number
        paymentId:
          description: |
            Payment ID, if a payment is collected.
          type: string
        subscriptionId:
          description: ""
          type: string
        subscriptionNumber:
          description: ""
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
        totalContractedValue:
          description: |
            Total contracted value of the subscription.
          type: number
      type: object
    POSTSubscriptionType:
      allOf:
        - properties:
            accountKey:
              description: |
                Customer account number or ID
              type: string
            applicationOrder:
              description: |
                The priority order to apply credit memos and/or unapplied payments to an invoice. Possible item values are: `CreditMemo`, `UnappliedPayment`.

                **Note:**
                  - This field is valid only if the `applyCredit` field is set to `true`.
                  - If no value is specified for this field, the default priority order is used, ["CreditMemo", "UnappliedPayment"], to apply credit memos first and then apply unapplied payments.
                  - If only one item is specified, only the items of the spedified type are applied to invoices. For example, if the value is `["CreditMemo"]`, only credit memos are used to apply to invoices.
              items:
                type: string
              type: array
            applyCredit:
              description: |
                Whether to automatically apply credit memos or unapplied payments, or both to an invoice.

                If the value is `true`, the credit memo or unapplied payment, or both will be automatically applied to the invoice. If no value is specified or the value is `false`, no action is taken.

                **Note:** This field is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
              type: boolean
            applyCreditBalance:
              description: |
                Whether to automatically apply a credit balance to an invoice.

                If the value is `true`, the credit balance is applied to the invoice. If the value is `false`, no action is taken.


                To view the credit balance adjustment, retrieve the details of the invoice using the Get Invoices method.

                Prerequisite: `invoice` must be `true`. 

                **Note:** 
                  - If you are using the field `invoiceCollect` rather than the field `invoice`, the `invoiceCollect` value must be `true`.
                  - This field is deprecated if you have the Invoice Settlement feature enabled.
              type: boolean
            autoRenew:
              default: false
              description: |
                If true, this subscription automatically renews at the end of the subscription term.

                This field is only required if the `termType` field is set to `TERMED`.
              type: boolean
            collect:
              default: true
              description: |
                Collects an automatic payment for a subscription. The collection generated in this operation is only for this subscription, not for the entire customer account.

                If the value is `true`, the automatic payment is collected. If the value is `false`, no action is taken.

                Prerequisite: The `invoice` or `runBilling` field must be `true`. 

                **Note**: This field is only available if you set the `zuora-version` request header to `196.0` or later.
              type: boolean
            contractEffectiveDate:
              description: |
                Effective contract date for this subscription, as yyyy-mm-dd
              format: date
              type: string
            customerAcceptanceDate:
              description: |
                The date on which the services or products within a subscription have been accepted by the customer, as yyyy-mm-dd.

                Default value is dependent on the value of other fields. See **Notes** section for more details.
              format: date
              type: string
            documentDate:
              description: |
                The date of the billing document, in `yyyy-mm-dd` format. It represents the invoice date for invoices, credit memo date for credit memos, and debit memo date for debit memos.

                - If this field is specified, the specified date is used as the billing document date. 
                - If this field is not specified, the date specified in the `targetDate` is used as the billing document date.
              format: date
              type: string
            gatewayId:
              description: |
                The ID of the payment gateway instance. For example, `2c92c0f86078c4d5016091674bcc3e92`.
              type: string
            initialTerm:
              description: |
                The length of the period for the first subscription term. If `termType` is `TERMED`, then this field is required, and the value must be greater than `0`. If `termType` is `EVERGREEN`, this field is ignored.
              format: int64
              type: integer
            initialTermPeriodType:
              description: |
                The period type for the first subscription term.

                This field is used with the `InitialTerm` field to specify the initial subscription term.

                Values are:

                * `Month` (default)
                * `Year`
                * `Day`
                * `Week`
              type: string
            invoice:
              description: |
                **Note:** This field has been replaced by the `runBilling` field. The
                `invoice` field is only available for backward compatibility.


                Creates an invoice for a subscription. The invoice generated in this
                operation is only for this subscription, not for the entire customer
                account.


                If the value is `true`, an invoice is created. If the value is
                `false`, no action is taken. The default value is `true`. 


                This field is in Zuora REST API version control. Supported minor
                versions are `196.0` and `207.0`. To use this field in the method, you
                must set the zuora-version parameter to the minor version number in
                the request header. 
              type: boolean
            invoiceCollect:
              default: true
              description: |
                **Note:** This field has been replaced by the `invoice` field
                and the `collect` field. `invoiceCollect` is available only for backward compatibility.


                If this field is set to `true`, an invoice is generated and payment collected automatically
                during the subscription process. If `false`, no invoicing or payment takes
                place. The invoice generated in this operation is only for this subscription,
                not for the entire customer account.


                **Note**: This field is only available if you set the `zuora-version` request header to `186.0`, `187.0`, `188.0`, or `189.0`.
              type: boolean
            invoiceOwnerAccountKey:
              description: |
                Invoice owner account number or ID.

                **Note:** This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).
              type: string
            invoiceSeparately:
              description: |
                Separates a single subscription from other subscriptions and invoices the charge independently. 

                If the value is `true`, the subscription is billed separately from other subscriptions. If the value is `false`, the subscription is included with other subscriptions in the account invoice.

                The default value is `false`.

                Prerequisite: The default subscription setting Enable Subscriptions to be Invoiced Separately must be set to Yes.
              type: boolean
            invoiceTargetDate:
              description: |
                **Note:** This field has been replaced by the `targetDate` field. The
                `invoiceTargetDate` field is only available for backward
                compatibility.


                Date through which to calculate charges if an invoice is generated, as
                yyyy-mm-dd. Default is current date.


                This field is in Zuora REST API version control. Supported minor
                versions are `207.0` and earlier.  
              format: date
              type: string
            notes:
              description: |
                String of up to 500 characters.
              type: string
            paymentMethodId:
              description: |
                The ID of the payment method used for the payment.
              type: string
            renewalSetting:
              description: |
                Specifies whether a termed subscription will remain termed or change to evergreen when it is renewed.

                Values:

                * `RENEW_WITH_SPECIFIC_TERM` (default)
                * `RENEW_TO_EVERGREEN`
              type: string
            renewalTerm:
              description: |
                The length of the period for the subscription renewal term. Default is `0`.
              format: int64
              type: integer
            renewalTermPeriodType:
              description: |
                The period type for the subscription renewal term.

                This field is used with the `renewalTerm` field to specify the subscription renewal term.

                Values are:

                * `Month` (default)
                * `Year`
                * `Day`
                * `Week`
              type: string
            runBilling:
              default: true
              description: |
                Creates an invoice for a subscription. If you have the Invoice Settlement feature enabled, a credit memo might also be created based on the [invoice and credit memo generation rule](https://knowledgecenter.zuora.com/CB_Billing/Invoice_Settlement/Credit_and_Debit_Memos/Rules_for_Generating_Invoices_and_Credit_Memos).  


                The billing documents generated
                in this operation is only for this subscription, not for the entire
                customer account.


                Possible values:

                - `true`: An invoice is created. If you have the Invoice Settlement feature enabled, a credit memo might also be created.


                - `false`: No invoice is created.


                **Note:** This field is in Zuora REST API version control. Supported
                minor versions are `211.0` or later. To use this field in the method,
                you must set the `zuora-version` parameter to the minor version number
                in the request header.
              enum:
                - true
                - false
              type: boolean
            serviceActivationDate:
              description: |
                The date on which the services or products within a subscription have been activated and access has been provided to the customer, as yyyy-mm-dd.

                Default value is dependent on the value of other fields. See **Notes** section for more details.
              format: date
              type: string
            subscribeToRatePlans:
              description: |
                Container for one or more rate plans for this subscription.
              items:
                $ref: "#/components/schemas/POSTSrpCreateType"
              type: array
            subscriptionNumber:
              description: |
                Subscription Number. The value can be up to 1000 characters.

                If you do not specify a subscription number when creating a subscription, Zuora will generate a subscription number automatically.

                If the account is created successfully, the subscription number is returned in the `subscriptionNumber` response field.
              type: string
            targetDate:
              description: |
                Date through which to calculate charges if an invoice or a credit memo is generated, as
                yyyy-mm-dd. Default is current date.


                **Note:** The credit memo is only available if you have the Invoice Settlement feature enabled.


                This field is in Zuora REST API version control. Supported minor
                versions are `211.0` and later. To use this field in the method, you
                must set the  `zuora-version` parameter to the minor version number in
                the request header.
              format: date
              type: string
            termStartDate:
              description: |
                The date on which the subscription term begins, as yyyy-mm-dd. If this is a renewal subscription, this date is different from the subscription start date.
              format: date
              type: string
            termType:
              description: |
                Possible values are: `TERMED`, `EVERGREEN`.
              type: string
          required:
            - accountKey
            - contractEffectiveDate
            - subscribeToRatePlans
            - termType
            - renewalTerm
          type: object
        - $ref: "#/components/schemas/SubscriptionObjectQTFields"
        - $ref: "#/components/schemas/SubscriptionObjectNSFields"
        - $ref: "#/components/schemas/SubscriptionObjectCustomFields"
      example:
        accountKey: A00001115
        autoRenew: true
        contractEffectiveDate: 2015-02-1
        initialTerm: "12"
        initialTermPeriodType: Week
        notes: Test POST subscription from z-ruby-sdk
        renewalTerm: "3"
        renewalTermPeriodType: Week
        subscribeToRatePlans:
          - chargeOverrides:
              - billCycleDay: "5"
                billCycleType: SpecificDayofMonth
                billingPeriodAlignment: AlignToCharge
                billingTiming: IN_ARREARS
                description: This is rate plan charge description
                number: TestCharge
                price: 12.01
                productRatePlanChargeId: ff8080811ca15d19011cddad8c953b53
                triggerDate: 2015-09-01
                triggerEvent: USD
            productRatePlanId: ff8080811ca15d19011cdda9b0ad3b51
        termType: TERMED
    POSTTaxationItemForCMType:
      allOf:
        - properties:
            exemptAmount:
              description: |
                The amount of taxes or VAT for which the customer has an exemption.
              format: double
              type: number
            financeInformation:
              description: |
                Container for the finance information related to the taxation item.
              properties:
                onAccountAccountingCode:
                  description: |
                    The accounting code that maps to an on account in your accounting system.
                  maxLength: 100
                  minLength: 0
                  type: string
                salesTaxPayableAccountingCode:
                  description: |
                    The accounting code for the sales taxes payable.
                  maxLength: 100
                  minLength: 0
                  type: string
              type: object
            jurisdiction:
              description: |
                The jurisdiction that applies the tax or VAT. This value is typically a state, province, county, or city.
              type: string
            locationCode:
              description: |
                The identifier for the location based on the value of the `taxCode` field.
              type: string
            memoItemId:
              description: |
                The ID of the credit memo that the taxation item is created for.
              type: string
            name:
              description: |
                The name of the taxation item.
              type: string
            sourceTaxItemId:
              description: |
                The ID of the taxation item of the invoice, which the credit memo is created from. 

                If you want to use this REST API to create taxation items for a credit memo created from an invoice, the taxation items of the invoice must be created or imported through the SOAP API call.

                **Note:** 
                  - This field is only used if the credit memo is created from an invoice. 
                  - If you do not contain this field in the request body, Zuora will automatically set a value for the `sourceTaxItemId` field based on the tax location code, tax jurisdiction, and tax rate.
              type: string
            taxAmount:
              description: |
                The amount of the tax applied to the credit memo.
              format: double
              type: number
            taxCode:
              description: |
                The tax code identifies which tax rules and tax rates to apply to a specific credit memo.
              type: string
            taxCodeDescription:
              description: |
                The description of the tax code.
              type: string
            taxDate:
              description: |
                The date when the tax is applied to the credit memo.
              format: date
              type: string
            taxRate:
              description: |
                The tax rate applied to the credit memo.
              format: double
              type: number
            taxRateDescription:
              description: |
                The description of the tax rate.
              type: string
            taxRateType:
              description: |
                The type of the tax rate applied to the credit memo.
              enum:
                - Percentage
                - FlatFee
              type: string
          required:
            - taxRate
            - jurisdiction
            - name
            - taxRateType
            - taxAmount
          type: object
        - $ref: "#/components/schemas/TaxationItemObjectCustomFields"
      title: taxationItems
    POSTTaxationItemForDMType:
      allOf:
        - properties:
            exemptAmount:
              description: |
                The amount of taxes or VAT for which the customer has an exemption.
              format: double
              type: number
            financeInformation:
              description: |
                Container for the finance information related to the taxation item.
              properties:
                salesTaxPayableAccountingCode:
                  description: |
                    The accounting code for the sales taxes payable.
                  maxLength: 100
                  minLength: 0
                  type: string
              type: object
            jurisdiction:
              description: |
                The jurisdiction that applies the tax or VAT. This value is typically a state, province, county, or city.
              type: string
            locationCode:
              description: |
                The identifier for the location based on the value of the `taxCode` field.
              type: string
            memoItemId:
              description: |
                The ID of the debit memo that the taxation item is created for.
              type: string
            name:
              description: |
                The name of the taxation item.
              type: string
            sourceTaxItemId:
              description: |
                The ID of the taxation item of the invoice, which the debit memo is created from. 

                If you want to use this REST API to create taxation items for a debit memo created from an invoice, the taxation items of the invoice must be created or imported through the SOAP API call.

                **Note:** 
                  - This field is only used if the debit memo is created from an invoice. 
                  - If you do not contain this field in the request body, Zuora will automatically set a value for the `sourceTaxItemId` field based on the tax location code, tax jurisdiction, and tax rate.
              type: string
            taxAmount:
              description: |
                The amount of the tax applied to the debit memo.
              format: double
              type: number
            taxCode:
              description: |
                The tax code identifies which tax rules and tax rates to apply to a specific debit memo.
              type: string
            taxCodeDescription:
              description: |
                The description of the tax code.
              type: string
            taxDate:
              description: |
                The date when the tax is applied to the debit memo.
              format: date
              type: string
            taxRate:
              description: |
                The tax rate applied to the debit memo.
              format: double
              type: number
            taxRateDescription:
              description: |
                The description of the tax rate.
              type: string
            taxRateType:
              description: |
                The type of the tax rate applied to the debit memo.
              enum:
                - Percentage
                - FlatFee
              type: string
          required:
            - taxRate
            - jurisdiction
            - name
            - taxRateType
            - taxAmount
          type: object
        - $ref: "#/components/schemas/TaxationItemObjectCustomFields"
      title: taxationItems
    POSTTaxationItemListForCMType:
      example:
        taxationItems:
          - exemptAmount: 0
            financeInformation:
              onAccountAccountingCode: Check
              salesTaxPayableAccountingCode: Check
            jurisdiction: CALIFORNIA
            locationCode: "06"
            memoItemId: 402890555a7e9791015a879f064d0055
            name: STATE TAX
            sourceTaxItemId: 402890555a7d4022015a7db254e200c1
            taxAmount: 0.1
            taxCode: ServiceTaxCode
            taxCodeDescription: This is tax code description!
            taxDate: 2016-09-30
            taxRate: 0.0625
            taxRateDescription: This is tax rate description!
            taxRateType: Percentage
      properties:
        taxationItems:
          description: |
            Container for taxation items.
          items:
            $ref: "#/components/schemas/POSTTaxationItemForCMType"
          type: array
      type: object
    POSTTaxationItemListForDMType:
      example:
        taxationItems:
          - exemptAmount: 0
            financeInformation:
              salesTaxPayableAccountingCode: Check
            jurisdiction: CALIFORNIA
            locationCode: "06"
            memoItemId: 402890555a7e9791015a87b082980068
            name: STATE TAX
            sourceTaxItemId: 402890555a7d4022015a7db254e200c2
            taxAmount: 0.01
            taxCode: ServiceTaxCode
            taxCodeDescription: This is tax code description!
            taxDate: 2016-06-05
            taxRate: 0.0625
            taxRateDescription: This is tax rate description!
            taxRateType: Percentage
          - exemptAmount: 0
            financeInformation:
              salesTaxPayableAccountingCode: Check
            jurisdiction: CALIFORNIA
            locationCode: "06"
            memoItemId: 402890555a7e9791015a87b082d5006a
            name: STATE TAX
            sourceTaxItemId: 402890555a7d4022015a7db254e200c3
            taxAmount: 0.02
            taxCode: ServiceTaxCode
            taxCodeDescription: This is tax code description!
            taxDate: 2016-06-05
            taxRate: 0.0625
            taxRateDescription: This is tax rate description!
            taxRateType: Percentage
      properties:
        taxationItems:
          description: |
            Container for taxation items.
          items:
            $ref: "#/components/schemas/POSTTaxationItemForDMType"
          type: array
      type: object
    POSTTierType:
      properties:
        endingUnit:
          description: |
            End number of a range of units for the tier.
          type: number
        price:
          description: |
            Price of the tier if the charge is a flat fee, or the price of each unit in the tier if the charge model is tiered pricing.
          type: number
        priceFormat:
          description: |
            Indicates if pricing is a flat fee or is per unit.

            Values:

            * `FlatFee`
            * `PerUnit`
          type: string
        startingUnit:
          description: |
            Starting number of a range of units for the tier.
          type: number
        tier:
          description: |
            Unique number that identifies the tier that the price applies to.
          format: int64
          type: integer
      required:
        - tier
        - price
      title: tiers
      type: object
    POSTUploadFileResponse:
      properties:
        fileId:
          description: |
            The unique ID of the uploaded PDF file.
          type: string
        success:
          description: |
            Indicates whether the call succeeded.
          type: boolean
      type: object
    POSTUsageResponseType:
      properties:
        checkImportStatus:
          description: |
            The path for checking the status of the import.

            The possible status values at this path are `Pending`, `Processing`, `Completed`, `Canceled`, and `Failed`. Only `Completed` indicates that the file contents were imported successfully.
          type: string
        size:
          description: |
            The size of the uploaded file in bytes.
          format: int64
          type: integer
        success:
          description: |
            Indicates whether the call succeeded.
          type: boolean
      type: object
    POSTVoidAuthorize:
      example:
        accountId: 402881e861bd8a7e0161c6a453750026
        accountNumber: A00000004
        gatewayOrderId: A001
        transactionId: "5205213224866613203009"
      properties:
        accountId:
          description: The ID of the customer account. This field is generally required, but is optional if you are using the Ingenico ePayments gateway.
          type: string
        accountNumber:
          description: The number of the customer account. This field is generally required, but is optional if you are using the Ingenico ePayments gateway.
          type: string
        gatewayOrderId:
          description: The order ID for the specific gateway.
          type: string
        paymentGatewayId:
          description: The ID of the payment gateway instance. This field is required if you do not specify the `accountId` and `accountNumber` fields.
          type: string
        transactionId:
          description: The ID of the transaction.
          type: string
      required:
        - transactionId
        - gatewayOrderId
      type: object
    POSTVoidAuthorizeResponse:
      example:
        gatewayOrderId: A001
        resultCode: 0
        resultMessage: "Request ID: 5231719060426316203012"
        success: true
        transactionId: "5231719060426316203012"
      properties:
        gatewayOrderId:
          description: The order ID for the gateway.
          type: string
        resultCode:
          description: The result code of the request. 0 indicates the call succeeded, and other values indicate the call failed.
          type: string
        resultMessage:
          description: The corresponding request ID.
          type: string
        success:
          description: Indicates whether the call succeeded.
          type: boolean
        transactionId:
          description: The ID of the transaction.
          type: string
      type: object
    PUTAcceptUserAccessResponseType:
      properties:
        success:
          description: |
            Returns `true` if the request is successful.
          type: boolean
      type: object
    PUTAccountType:
      allOf:
        - properties:
            additionalEmailAddresses:
              description: |
                A list of additional email addresses to receive emailed invoices. Use a comma to separate each email address.

                **Note:** Invoices are emailed to the email addresses specified in this field only when the `invoiceDeliveryPrefsEmail` field is `true`.
              items:
                type: string
              type: array
            autoPay:
              description: |
                Whether future payments are to be automatically billed when they are due. 
              type: boolean
            batch:
              description: |
                The alias name given to a batch. A string of 50 characters or less.
              type: string
            billToContact:
              $ref: "#/components/schemas/PUTAccountTypeBillToContact"
            communicationProfileId:
              description: |
                The ID of a communication profile.
              type: string
            creditMemoTemplateId:
              description: |
                **Note:** This field is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

                The unique ID of the credit memo template, configured in **Billing Settings** > **Manage Billing Document Configuration** through the Zuora UI. For example, 2c92c08a6246fdf101626b1b3fe0144b.
              type: string
            crmId:
              description: |
                CRM account ID for the account, up to 100 characters.
              type: string
            debitMemoTemplateId:
              description: |
                **Note:** This field is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

                The unique ID of the debit memo template, configured in **Billing Settings** > **Manage Billing Document Configuration** through the Zuora UI. For example, 2c92c08d62470a8501626b19d24f19e2.
              type: string
            invoiceDeliveryPrefsEmail:
              description: |
                Whether the customer wants to receive invoices through email. 

                The default value is `false`.
              type: boolean
            invoiceDeliveryPrefsPrint:
              description: |
                Whether the customer wants to receive printed invoices, such as through postal mail.

                The default value is `false`.
              type: boolean
            invoiceTemplateId:
              description: |
                Invoice template ID, configured in Billing Settings in the Zuora UI.
              type: string
            name:
              description: |
                Account name, up to 255 characters.
              type: string
            notes:
              description: |
                A string of up to 65,535 characters.
              type: string
            parentId:
              description: Identifier of the parent customer account for this Account object. The length is 32 characters. Use this field if you have customer hierarchy enabled.
              type: string
            paymentGateway:
              description: |
                The name of the payment gateway instance. If null or left unassigned, the Account will use the Default Gateway.
              type: string
            salesRep:
              description: The name of the sales representative associated with this account, if applicable. Maximum of 50 characters.
              type: string
            sequenceSetId:
              description: |
                The ID of the billing document sequence set to assign to the customer account. 

                The billing documents to generate for this account will adopt the prefix and starting document number configured in the sequence set.

                If a customer account has no assigned billing document sequence set, billing documents generated for this account adopt the prefix and starting document number from the default sequence set.
              type: string
            soldToContact:
              $ref: "#/components/schemas/PUTAccountTypeSoldToContact"
            tagging:
              description: ""
              type: string
            taxInfo:
              description: |
                Container for tax exempt information, used to establish the tax exempt status of a customer account.
              properties:
                VATId:
                  description: |
                    EU Value Added Tax ID. 

                    **Note:** This feature is in Limited Availability. If you wish to have access to the feature, submit a request at [Zuora Global Support](https://support.zuora.com).
                  type: string
                companyCode:
                  description: |
                    Unique code that identifies a company account in Avalara. Use this field to calculate taxes based on origin and sold-to addresses in Avalara.

                    **Note:** This feature is in Limited Availability. If you wish to have access to the feature, submit a request at [Zuora Global Support](https://support.zuora.com). 
                  type: string
                exemptCertificateId:
                  description: |
                    ID of the customer tax exemption certificate. Requires Zuora Tax.
                  type: string
                exemptCertificateType:
                  description: |
                    Type of tax exemption certificate that the customer holds. Requires Zuora Tax.
                  type: string
                exemptDescription:
                  description: |
                    Description of the tax exemption certificate that the customer holds. Requires Zuora Tax.
                  type: string
                exemptEffectiveDate:
                  description: |
                    Date when the customer tax exemption starts. Requires Zuora Tax.

                    Format: `yyyy-mm-dd`. Defaults to the current date.
                  format: date
                  type: string
                exemptEntityUseCode:
                  description: |
                    A unique entity use code to apply exemptions in Avalara AvaTax.

                    This account-level field is required only when you choose Avalara as your tax engine. See [Exempt Transactions](https://developer.avalara.com/avatax/handling-tax-exempt-customers/)for more details.
                  maxLength: 64
                  type: string
                exemptExpirationDate:
                  description: |
                    Date when the customer tax exemption expires. Requires Zuora Tax.

                    Format: `yyyy-mm-dd`. Defaults to the current date.
                  format: date
                  type: string
                exemptIssuingJurisdiction:
                  description: |
                    Jurisdiction in which the customer tax exemption certificate was issued.
                  type: string
                exemptStatus:
                  description: |
                    Status of the account tax exemption. Requires Zuora Tax.

                    Required if you use Zuora Tax. This field is unavailable if Zuora Tax is not used.

                    Values: `Yes`, `No`, `pendingVerification`.
                  type: string
              type: object
          type: object
        - $ref: "#/components/schemas/AccountObjectNSFields"
        - $ref: "#/components/schemas/AccountObjectCustomFields"
      example:
        additionalEmailAddresses:
          - contact3@example.com
          - contact4@example.com
        paymentGateway: TestGateway
    PUTAccountTypeBillToContact:
      allOf:
        - properties:
            address1:
              description: |
                First address line, 255 characters or less.
              type: string
            address2:
              description: |
                Second address line, 255 characters or less.
              type: string
            city:
              description: |
                City, 40 characters or less.
              type: string
            country:
              description: |
                Country; must be a valid country name or abbreviation. If using Zuora Tax, you must specify a country in the sold-to contact to calculate tax. A bill-to contact may be used if no sold-to contact is provided.
              type: string
            county:
              description: |
                County; 32 characters or less. May optionally be used by Zuora Tax to calculate county tax.
              type: string
            fax:
              description: |
                Fax phone number, 40 characters or less.
              type: string
            firstName:
              description: |
                First name, 100 characters or less.
              type: string
            homePhone:
              description: |
                Home phone number, 40 characters or less.
              type: string
            lastName:
              description: |
                Last name, 100 characters or less.
              type: string
            mobilePhone:
              description: |
                Mobile phone number, 40 characters or less.
              type: string
            nickname:
              description: |
                Nickname for this contact
              type: string
            otherPhone:
              description: |
                Other phone number, 40 characters or less.
              type: string
            otherPhoneType:
              description: |
                Possible values are: `Work`, `Mobile`, `Home`, `Other`.
              type: string
            personalEmail:
              description: |
                Personal email address, 80 characters or less.
              type: string
            state:
              description: |
                State; must be a valid state or province name or 2-character abbreviation. If using Zuora Tax, be aware that Zuora Tax requires a state (in the US) or province (in Canada) in this field for the sold-to contact to calculate tax, and that a bill-to contact may be used if no sold-to contact is provided.
              type: string
            taxRegion:
              description: |
                If using Zuora Tax, a region string as optionally defined in your tax rules. Not required.
              type: string
            workEmail:
              description: |
                Work email address, 80 characters or less.
              type: string
            workPhone:
              description: |
                Work phone number, 40 characters or less.
              type: string
            zipCode:
              description: |
                Zip code, 20 characters or less.
              type: string
          required:
            - firstName
            - lastName
          type: object
        - $ref: "#/components/schemas/ContactObjectCustomFields"
      description: |
        Container for bill-to contact information for this account.
      title: Contact
    PUTAccountTypeSoldToContact:
      allOf:
        - properties:
            address1:
              description: |
                First address line, 255 characters or less.
              type: string
            address2:
              description: |
                Second address line, 255 characters or less.
              type: string
            city:
              description: |
                City, 40 characters or less.
              type: string
            country:
              description: |
                Country; must be a valid country name or abbreviation. If using Zuora Tax, you must specify a country in the sold-to contact to calculate tax. A bill-to contact may be used if no sold-to contact is provided.
              type: string
            county:
              description: |
                County; 32 characters or less. May optionally be used by Zuora Tax to calculate county tax.
              type: string
            fax:
              description: |
                Fax phone number, 40 characters or less.
              type: string
            firstName:
              description: |
                First name, 100 characters or less.
              type: string
            homePhone:
              description: |
                Home phone number, 40 characters or less.
              type: string
            lastName:
              description: |
                Last name, 100 characters or less.
              type: string
            mobilePhone:
              description: |
                Mobile phone number, 40 characters or less.
              type: string
            nickname:
              description: |
                Nickname for this contact
              type: string
            otherPhone:
              description: |
                Other phone number, 40 characters or less.
              type: string
            otherPhoneType:
              description: |
                Possible values are: `Work`, `Mobile`, `Home`, `Other`.
              type: string
            personalEmail:
              description: |
                Personal email address, 80 characters or less.
              type: string
            state:
              description: |
                State; must be a valid state or province name or 2-character abbreviation. If using Zuora Tax, be aware that Zuora Tax  requires a state (in the US) or province (in Canada) in this field for the sold-to contact to calculate tax, and that a bill-to contact may be used if no sold-to contact is provided.
              type: string
            taxRegion:
              description: |
                If using Zuora Tax, a region string as optionally defined in your tax rules. Not required.
              type: string
            workEmail:
              description: |
                Work email address, 80 characters or less.
              type: string
            workPhone:
              description: |
                Work phone number, 40 characters or less.
              type: string
            zipCode:
              description: |
                Zip code, 20 characters or less.
              type: string
          required:
            - firstName
            - lastName
          type: object
        - $ref: "#/components/schemas/ContactObjectCustomFields"
      description: |
        Container for optional sold-to contact.
      title: Contact
    PUTAccountingCodeType:
      allOf:
        - properties:
            glAccountName:
              description: |
                Name of the account in your general ledger.

                Field only available if you have Zuora Finance enabled. Maximum of 255 characters.
              type: string
            glAccountNumber:
              description: |
                Account number in your general ledger.

                Field only available if you have Zuora Finance enabled. Maximum of 255 characters.
              type: string
            name:
              description: |
                Name of the accounting code.

                Accounting code name must be unique. Maximum of 100 characters.
              type: string
            notes:
              description: |
                Maximum of 2,000 characters.
              type: string
            type:
              description: |
                Accounting code type. You cannot change the type of an accounting code from `AccountsReceivable` to a different type. 

                Note that `On-Account Receivable` is only available if you enable the Invoice Settlement feature. 
              enum:
                - AccountsReceivable
                - On-Account Receivable
                - Cash
                - OtherAssets
                - CustomerCashOnAccount
                - DeferredRevenue
                - SalesTaxPayable
                - OtherLiabilities
                - SalesRevenue
                - SalesDiscounts
                - OtherRevenue
                - OtherEquity
                - BadDebt
                - OtherExpenses
              type: string
          type: object
        - $ref: "#/components/schemas/AccountingCodeObjectCustomFields"
      example:
        name: CASH
        type: Cash
    PUTAccountingPeriodType:
      allOf:
        - properties:
            endDate:
              description: |
                The end date of the accounting period in yyyy-mm-dd format, for example, "2016-02-19".
              format: date
              type: string
            fiscalYear:
              description: |
                Fiscal year of the accounting period in yyyy format, for example, "2016".
              type: string
            fiscal_quarter:
              description: ""
              format: int64
              type: integer
            name:
              description: |
                Name of the accounting period.

                Accounting period name must be unique. Maximum of 100 characters.
              type: string
            notes:
              description: |
                Notes about the accounting period.

                Maximum of 255 characters.
              type: string
            startDate:
              description: |
                The start date of the accounting period in yyyy-mm-dd format, for example, "2016-02-19".
              format: date
              type: string
          type: object
        - $ref: "#/components/schemas/AccountingPeriodObjectCustomFields"
      example:
        endDate: 2016-01-31
        fiscalYear: 2016
        name: Jan 2016
        startDate: 2016-01-01
    PUTAllocateManuallyType:
      allOf:
        - properties:
            eventType:
              description: |
                Label of the revenue event type. Revenue event type labels can be duplicated. You can configure your revenue event type labels by navigating to **Settings > Finance > Configure Revenue Event Types** in the Zuora UI.

                Note that `Credit Memo Posted` and `Debit Memo Posted` are only available if you enable the Invoice Settlement feature.
              enum:
                - Invoice Posted
                - Invoice Item Adjustment Created
                - Invoice Canceled
                - Invoice Item Adjustment Canceled
                - Revenue Distributed
                - Credit Memo Posted
                - Debit Memo Posted
              type: string
            eventTypeSystemId:
              description: |
                System ID of the revenue event type. Each eventType has a unique system ID. You can configure your revenue event type system IDs by navigating to **Settings > Finance > Configure Revenue Event Types** in the Zuora UI.

                Cannot be duplicated.
              type: string
            notes:
              description: |
                Additional information about this record.
              type: string
            revenueDistributions:
              description: |
                An array of revenue distributions. Represents how you want to distribute revenue for this revenue schedule. You can distribute revenue into a maximum of 250 accounting periods with one revenue schedule.
              items:
                $ref: "#/components/schemas/POSTDistributionItemType"
              type: array
          type: object
        - $ref: "#/components/schemas/RevenueEventObjectCustomFields"
      example:
        eventType: Revenue Distributed
        eventTypeSystemId: RevenueDistributed__z
        notes: Manually distribute revenue for Phase 1
        revenueDistributions:
          - accountingPeriodName: Jan'2013
            newAmount: "500"
          - accountingPeriodName: Feb'2013
            newAmount: "600"
    PUTAttachmentType:
      example:
        description: Updated image
        fileName: Image123.png
      properties:
        description:
          description: |
            Description of the attachment.
          type: string
        fileName:
          description: |
            File name of the attachment. The value should not contain the file extension. Only the file name without the extension can be edited.
          type: string
      type: object
    PUTBatchDebitMemosRequest:
      example:
        debitMemos:
          - dueDate: 2017-12-28
            id: 402890d25f9f083f015f9f28041d0008
          - dueDate: 2017-12-20
            id: 402890555a87d7f5015a892f2ba10057
      properties:
        debitMemos:
          description: |
            Container for debit memo update details.
          items:
            $ref: "#/components/schemas/BatchDebitMemoType"
          type: array
      type: object
    PUTCreditMemoItemType:
      allOf:
        - properties:
            amount:
              description: |
                The amount of the credit memo item. For tax-inclusive credit memo items, the amount indicates the credit memo item amount including tax. For tax-exclusive credit memo items, the amount indicates the credit memo item amount excluding tax
              format: double
              type: number
            comment:
              description: |
                Comments about the credit memo item.
              type: string
            financeInformation:
              description: |
                Container for the finance information related to the credit memo item.
              properties:
                deferredRevenueAccountingCode:
                  description: |
                    The accounting code for the deferred revenue, such as Monthly Recurring Liability.
                  maxLength: 100
                  minLength: 0
                  type: string
                onAccountAccountingCode:
                  description: |
                    The accounting code that maps to an on account in your accounting system.
                  maxLength: 100
                  minLength: 0
                  type: string
                recognizedRevenueAccountingCode:
                  description: |
                    The accounting code for the recognized revenue, such as Monthly Recurring Charges or Overage Charges.
                  maxLength: 100
                  minLength: 0
                  type: string
                revenueRecognitionRuleName:
                  description: |
                    The name of the revenue recognition rule governing the revenue schedule.
                  maxLength: 100
                  minLength: 0
                  type: string
              type: object
            id:
              description: |
                The ID of the credit memo item.
              maxLength: 32
              minLength: 32
              type: string
            quantity:
              description: |
                The number of units for the credit memo item.
              format: double
              type: number
            serviceEndDate:
              description: |
                The service end date of the credit memo item.
              format: date
              type: string
            serviceStartDate:
              description: |
                The service start date of the credit memo item.
              format: date
              type: string
            skuName:
              description: |
                The name of the SKU.
              type: string
            taxItems:
              description: |
                Container for credit memo taxation items.
              items:
                $ref: "#/components/schemas/PutCreditMemoTaxItemType"
              type: array
            unitOfMeasure:
              description: |
                The definable unit that you measure when determining charges.
              type: string
          required:
            - id
          type: object
        - $ref: "#/components/schemas/CreditMemoItemObjectCustomFields"
      title: items
    PUTCreditMemoType:
      allOf:
        - properties:
            autoApplyUponPosting:
              description: |
                Whether the credit memo automatically applies to the invoice upon posting.
              type: boolean
            comment:
              description: |
                Comments about the credit memo.
              maxLength: 255
              minLength: 0
              type: string
            effectiveDate:
              description: |
                The date when the credit memo takes effect.
              format: date
              type: string
            excludeFromAutoApplyRules:
              description: |
                Whether the credit memo is excluded from the rule of automatically applying credit memos to invoices.
              type: boolean
            items:
              description: |
                Container for credit memo items.
              items:
                $ref: "#/components/schemas/PUTCreditMemoItemType"
              type: array
            reasonCode:
              description: |
                A code identifying the reason for the transaction. The value must be an existing reason code or empty. If you do not specify a value, Zuora uses the default reason code.
              type: string
            transferredToAccounting:
              description: |
                Whether the credit memo is transferred to an external accounting system. Use this field for integration with accounting systems, such as NetSuite. 
              enum:
                - Processing
                - Yes
                - No
                - Error
                - Ignore
              type: string
          type: object
        - $ref: "#/components/schemas/CreditMemoObjectNSFields"
        - $ref: "#/components/schemas/CreditMemoObjectCustomFields"
      example:
        autoApplyUponPosting: false
        comment: new comment
        effectiveDate: 2017-04-17
        excludeFromAutoApplyRules: false
        items:
          - amount: 1
            comment: This is comment!
            id: 402890555b797b57015b7986fc1a001c
            quantity: 1
            serviceEndDate: 2016-11-30
            serviceStartDate: 2016-11-01
            skuName: SKU-1
            taxItems:
              - amount: 0.03
                id: 402890555b797b57015b7986fc3c001d
                jurisdiction: CALIFORNIA
                locationCode: "06"
                taxCode: null
                taxCodeDescription: This is tax code description!
                taxDate: 2016-11-30
                taxExemptAmount: 0
                taxName: STATE TAX1
                taxRate: 0.0625
                taxRateDescription: This is tax rate description!
                taxRateType: Percentage
            unitOfMeasure: Test_UOM
          - amount: 2
            comment: This is comment!
            id: 402890555b797b57015b7986fc41001e
            serviceEndDate: 2016-11-30
            serviceStartDate: 2016-11-01
            skuName: SKU-2
            taxItems:
              - amount: 0.06
                id: 402890555b797b57015b7986fc4c001f
                jurisdiction: CALIFORNIA
                locationCode: "06"
                taxCode: null
                taxCodeDescription: This is tax code description!
                taxDate: 2016-11-30
                taxExemptAmount: 0
                taxName: STATE TAX2
                taxRate: 0.0625
                taxRateDescription: This is tax rate description!
                taxRateType: Percentage
            unitOfMeasure: Test_UOM
        reasonCode: Correcting invoice error
    PUTDebitMemoItemType:
      allOf:
        - properties:
            amount:
              description: |
                The amount of the debit memo item. For tax-inclusive debit memo items, the amount indicates the debit memo item amount including tax. For tax-exclusive debit memo items, the amount indicates the debit memo item amount excluding tax.
              format: double
              type: number
            comment:
              description: |
                Comments about the debit memo item.
              type: string
            financeInformation:
              description: |
                Container for the finance information related to the debit memo item.
              properties:
                deferredRevenueAccountingCode:
                  description: |
                    The accounting code for the deferred revenue, such as Monthly Recurring Liability.
                  maxLength: 100
                  minLength: 0
                  type: string
                recognizedRevenueAccountingCode:
                  description: |
                    The accounting code for the recognized revenue, such as Monthly Recurring Charges or Overage Charges.
                  maxLength: 100
                  minLength: 0
                  type: string
                revenueRecognitionRuleName:
                  description: |
                    The name of the revenue recognition rule governing the revenue schedule.
                  maxLength: 100
                  minLength: 0
                  type: string
              type: object
            id:
              description: |
                The ID of the debit memo item.
              maxLength: 32
              minLength: 32
              type: string
            quantity:
              description: |
                The number of units for the debit memo item.
              format: double
              type: number
            serviceEndDate:
              description: |
                The service end date of the debit memo item.
              format: date
              type: string
            serviceStartDate:
              description: |
                The service start date of the debit memo item. 
              format: date
              type: string
            skuName:
              description: |
                The name of the SKU.
              type: string
            taxItems:
              description: |
                Container for debit memo taxation items.
              items:
                $ref: "#/components/schemas/PutDebitMemoTaxItemType"
              type: array
            unitOfMeasure:
              description: |
                The definable unit that you measure when determining charges.
              type: string
          required:
            - id
          type: object
        - $ref: "#/components/schemas/DebitMemoItemObjectCustomFields"
      title: items
    PUTDebitMemoType:
      allOf:
        - properties:
            autoPay:
              description: |
                Whether debit memos are automatically picked up for processing in the corresponding payment run. 

                By default, debit memos are automatically picked up for processing in the corresponding payment run.
              type: boolean
            comment:
              description: |
                Comments about the debit memo.
              maxLength: 255
              minLength: 0
              type: string
            dueDate:
              description: |
                The date by which the payment for the debit memo is due, in `yyyy-mm-dd` format.
              format: date
              type: string
            effectiveDate:
              description: |
                The date when the debit memo takes effect.
              format: date
              type: string
            items:
              description: |
                Container for debit memo items.
              items:
                $ref: "#/components/schemas/PUTDebitMemoItemType"
              type: array
            reasonCode:
              description: |
                A code identifying the reason for the transaction. The value must be an existing reason code or empty. If you do not specify a value, Zuora uses the default reason code
              type: string
            transferredToAccounting:
              description: |
                Whether the debit memo is transferred to an external accounting system. Use this field for integration with accounting systems, such as NetSuite. 
              enum:
                - Processing
                - Yes
                - No
                - Error
                - Ignore
              type: string
          type: object
        - $ref: "#/components/schemas/DebitMemoObjectNSFields"
        - $ref: "#/components/schemas/DebitMemoObjectCustomFields"
      example:
        autoPay: true
        comment: new comment
        dueDate: 2017-05-20
        effectiveDate: 2017-04-17
        items:
          - amount: 1
            comment: This is comment!
            id: 402890555b797b57015b7986fc1a001c
            quantity: 1
            serviceEndDate: 2016-11-30
            serviceStartDate: 2016-11-01
            skuName: SKU-1
            taxItems:
              - amount: 0.03
                id: 402890555b797b57015b7986fc3c001d
                jurisdiction: CALIFORNIA
                locationCode: "06"
                taxCode: null
                taxCodeDescription: This is tax code description!
                taxDate: 2016-11-30
                taxExemptAmount: 0
                taxName: STATE TAX1
                taxRate: 0.0625
                taxRateDescription: This is tax rate description!
                taxRateType: Percentage
            unitOfMeasure: Test_UOM
          - amount: 2
            comment: This is comment!
            id: 402890555b797b57015b7986fc41001e
            serviceEndDate: 2016-11-30
            serviceStartDate: 2016-11-01
            skuName: SKU-2
            taxItems:
              - amount: 0.06
                id: 402890555b797b57015b7986fc4c001f
                jurisdiction: CALIFORNIA
                locationCode: "06"
                taxCode: null
                taxCodeDescription: This is tax code description!
                taxDate: 2016-11-30
                taxExemptAmount: 0
                taxName: STATE TAX2
                taxRate: 0.0625
                taxRateDescription: This is tax rate description!
                taxRateType: Percentage
            unitOfMeasure: Test_UOM
        reasonCode: Correcting invoice error
    PUTDenyUserAccessResponseType:
      properties:
        success:
          description: |
            Returns `true` if the request is successful.
          type: boolean
      type: object
    PUTDocumentPropertiesType:
      example:
        customFileName: exampleCreditMemo
      properties:
        customFileName:
          description: |
            The custom file name to use to generate new Word or PDF files for the billing document.
          type: string
      type: object
    PUTEntityConnectionsAcceptResponseType:
      properties:
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    PUTEntityConnectionsDenyResponseType:
      properties:
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    PUTEntityConnectionsDisconnectResponseType:
      properties:
        success:
          description: Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    PUTEventRIDetailType:
      example:
        revenueItems:
          - accountingPeriodName: Oct'2014
          - accountingPeriodName: Nov'2014
      properties:
        revenueItems:
          description: |
            Revenue items are listed in ascending order by the accounting period start date.

            Include at least one custom field.
          items:
            $ref: "#/components/schemas/EventRevenueItemType"
          type: array
      required:
        - revenueItems
      type: object
    PUTJournalEntryItemType:
      allOf:
        - properties:
            accountingCodeName:
              description: |
                Name of the accounting code.

                If the Journal Entry Item has a blank accounting code, enter the empty string.
              type: string
            accountingCodeType:
              description: |
                Accounting code type.

                Note that `On-Account Receivable` is only available if you enable the Invoice Settlement feature. 
              enum:
                - AccountsReceivable
                - On-Account Receivable
                - Cash
                - OtherAssets
                - CustomerCashOnAccount
                - DeferredRevenue
                - SalesTaxPayable
                - OtherLiabilities
                - SalesRevenue
                - SalesDiscounts
                - OtherRevenue
                - OtherEquity
                - BadDebt
                - OtherExpenses
              type: string
            type:
              description: "Type of journal entry item. "
              enum:
                - Credit
                - Debit
              type: string
          required:
            - accountingCodeName
            - type
          type: object
        - $ref: "#/components/schemas/JournalEntryItemObjectCustomFields"
      title: journalEntryItems
    PUTOrderActionTriggerDatesRequestType:
      example:
        subscriptions:
          - orderActions:
              - charges:
                  - chargeNumber: C-0000001
                    specificTriggerDate: 2016-09-01
                sequence: 0
                triggerDates:
                  - name: CustomerAcceptance
                    triggerDate: 2016-09-01
            subscriptionNumber: A-S00000009
      properties:
        subscriptions:
          items:
            properties:
              orderActions:
                items:
                  properties:
                    charges:
                      items:
                        properties:
                          chargeNumber:
                            description: Charge number of the charge which needs the triggering date to be provided. The charge's `triggerEvent` must have been set as `SpecificDate`.
                            type: string
                          specificTriggerDate:
                            description: Date in YYYY-MM-DD format. The specific trigger date you are to set for the charge.
                            format: date
                            type: string
                        type: object
                      type: array
                    sequence:
                      description: |
                        Identifies which order action will have its triggering dates updated. 
                      type: integer
                    triggerDates:
                      description: Container for the service activation and customer acceptance dates of the order action.
                      items:
                        properties:
                          name:
                            description: Name of the trigger date of the order action.
                            enum:
                              - ServiceActivation
                              - CustomerAcceptance
                            type: string
                          triggerDate:
                            description: |
                              Trigger date in YYYY-MM-DD format. The date you are to set as the service activation date or the customer acceptance date.
                            format: date
                            type: string
                        type: object
                      type: array
                  required:
                    - sequence
                  type: object
                type: array
              subscriptionNumber:
                description: |
                  Subscription number of a subscription in the `Pending` order for which you are to update the triggering dates. For example, A-S00000001.
                maxLength: 100
                type: string
            required:
              - subscriptionNumber
            type: object
          type: array
      type: object
    PUTOrderLineItemRequestType:
      $ref: "#/components/schemas/PutOrderLineItemUpdateType"
    PUTOrderPatchRequestType:
      example:
        customFields:
          order_cf__c: order custom fields
        subscriptions:
          - orderActions:
              - customFields:
                  order_action_cf__c: Order action custom fields
                  order_action_undex__c: Order action custom fields
                sequence: 0
            subscriptionNumber: S-00005
      properties:
        customFields:
          $ref: "#/components/schemas/OrderObjectCustomFields"
        subscriptions:
          items:
            properties:
              orderActions:
                items:
                  properties:
                    customFields:
                      $ref: "#/components/schemas/OrderActionObjectCustomFields"
                    orderActionId:
                      description: |
                        The Id of the order action in the order. You can provide either the `sequence` or the `orderActionId` field to specify which order action to update. You cannot use then both at the same time.
                      type: string
                    sequence:
                      description: |
                        The sequence number of the order action in the order. You can provide either the `sequence` or the `orderActionId` field to specify which order action to update. You cannot use then both at the same time.
                      type: integer
                  type: object
                type: array
              subscriptionNumber:
                type: string
            type: object
          type: array
      type: object
    PUTOrderTriggerDatesResponseType:
      allOf:
        - $ref: "#/components/schemas/CommonResponseType"
        - properties:
            accountNumber:
              description: The account number for the order.
              type: string
            orderNumber:
              description: The order number of the order updated.
              type: string
            status:
              description: Status of the order.
              enum:
                - Completed
                - Pending
              type: string
            subscriptions:
              description: The subscriptions updated.
              items:
                properties:
                  status:
                    description: Status of the subscription. `Pending Activation` and `Pending Acceptance` are only applicable for an order that contains a `CreateSubscription` order action.
                    enum:
                      - Active
                      - Pending Activation
                      - Pending Acceptance
                    type: string
                  subscriptionNumber:
                    description: Subscription number of the subscription updated.
                    type: string
                type: object
              type: array
          type: object
    PUTPMAccountHolderInfo:
      properties:
        addressLine1:
          description: |
            The first line of the address for the account holder.
          type: string
        addressLine2:
          description: |
            The second line of the address for the account holder. 
          type: string
        city:
          description: |
            The city where the account holder stays.
          type: string
        country:
          description: |
            The country where the account holder stays.
          type: string
        email:
          description: |
            The email address of the account holder.
          type: string
        phone:
          description: |
            The phone number of the account holder. 
          type: string
        state:
          description: |
            The state where the account holder stays.
          type: string
        zipCode:
          description: |
            The zip code for the address of the account holder.
          type: string
      title: accountHolderInfo
      type: object
    PUTPMCreditCardInfo:
      properties:
        expirationMonth:
          description: |+
            One or two digits expiration month (1-12).
                    
          type: integer
        expirationYear:
          description: |
            Four-digit expiration year.
          type: integer
        securityCode:
          description: |
            Optional. It is the CVV or CVV2 security code specific for the credit card or debit card. To ensure PCI compliance, this value is not stored and cannot be queried. 

            If securityCode code is not passed in the request payload, this operation only updates related fields in the payload. It does not validate the payment method through the gateway.

            If securityCode is passed in the request payload, this operation retrieves the credit card information from payload and validates them through the gateway.
          type: string
      type: object
    PUTPaymentMethodRequest:
      allOf:
        - properties:
            accountHolderInfo:
              $ref: "#/components/schemas/PUTPMAccountHolderInfo"
            authGateway:
              description: |
                Specifies the ID of the payment gateway that Zuora will use to authorize the payments that are made with the payment method.
              type: string
            currencyCode:
              description: |
                The currency used for payment method authorization.
              type: string
            gatewayOptions:
              description: |
                The field used to pass gateway-specific parameters and parameter values.
              properties:
                key:
                  description: |
                    The name of a gateway-specific parameter.
                  type: string
                value:
                  description: |
                    The value of the gateway-specific parameter.
                  type: string
              type: object
          type: object
        - $ref: "#/components/schemas/PUTPMCreditCardInfo"
        - $ref: "#/components/schemas/PaymentMethodObjectCustomFields"
      example:
        accountHolderInfo:
          addressLine1: address 1
          phone: "1333333333"
        expirationMonth: 8
        expirationYear: 2024
        securityCode: "123"
    PUTPaymentMethodResponse:
      properties:
        id:
          description: |
            ID of the updated payment method.
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    PUTPaymentMethodResponseType:
      properties:
        paymentMethodId:
          description: |
            ID of the updated payment method.
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    PUTPaymentMethodType:
      allOf:
        - properties:
            addressLine1:
              description: |
                First address line, 255 characters or less.
              type: string
            addressLine2:
              description: |
                Second address line, 255 characters or less.
              type: string
            cardHolderName:
              description: |
                The full name as it appears on the card, e.g., "John J Smith", 50 characters or less.
              type: string
            city:
              description: |
                City, 40 characters or less.
              type: string
            country:
              description: |
                Country; must be a valid country name or abbreviation.
              type: string
            defaultPaymentMethod:
              description: |
                Specify "true" to make this card the default payment method; otherwise, omit this parameter to keep the current default payment method.
              type: boolean
            email:
              description: |
                Card holder's email address, 80 characters or less.
              type: string
            expirationMonth:
              description: |
                One or two digit(s) expiration month (1-12).
              type: integer
            expirationYear:
              description: |
                Four-digit expiration year.
              type: integer
            gatewayOptions:
              description: |
                The field used to pass gateway-specific parameters and parameter values.
              properties:
                key:
                  description: |
                    The name of a gateway-specific parameter.
                  type: string
                value:
                  description: |
                    The value of the gateway-specific parameter.
                  type: string
              type: object
            numConsecutiveFailures:
              description: |
                The number of consecutive failed payments for this payment method. It is reset to `0` upon successful payment. 
              format: int32
              maximum: 100
              minimum: 0
              type: integer
            phone:
              description: |
                Phone number, 40 characters or less.
              type: string
            securityCode:
              description: |+
                The CVV or CVV2 security code for the credit card or debit card. Only required if changing expirationMonth, expirationYear, or cardHolderName. To ensure PCI compliance, this value isn't stored and can't be queried.

              type: string
            state:
              description: |
                State; must be a valid state name or 2-character abbreviation.
              type: string
            zipCode:
              description: |
                Zip code, 20 characters or less.
              type: string
          type: object
        - $ref: "#/components/schemas/PaymentMethodObjectCustomFields"
      example:
        cardHolderName: Leo
        expirationMonth: 8
        expirationYear: 2015
        gatewayOptions:
          Comments: Updated comments
          IPAddress: 172.112.1.1
        numConsecutiveFailures: 5
        securityCode: "111"
    PUTPaymentRunRequest:
      example:
        autoApplyCreditMemo: "true"
        autoApplyUnappliedPayment: "true"
        consolidatedPayment: "true"
        processPaymentWithClosedPM: "true"
        targetDate: 2017-10-12
      properties:
        accountId:
          description: |
            The ID of the customer account associated with the payment run.

            This field conflicts with each of the `batch`, `billCycleDay`, `currency`, `paymentGatewayId`, and `billingRunId` fields. If there are such conflicts, an error occurs and an error message is returned.
          format: uuid
          type: string
        applyCreditBalance:
          description: |
            **Note:** This field is only available if you have the Credit Balance feature enabled and the Invoice Settlement feature disabled.

            Whether to apply credit balances in the payment run. This field is only available when you have Invoice Settlement feature disabled.
          type: boolean
        autoApplyCreditMemo:
          description: |
            **Note:** This field is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

            Whether to automatically apply a posted credit memo to one or more receivables in the payment run.
          type: boolean
        autoApplyUnappliedPayment:
          description: |
            **Note:** This field is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

            Whether to automatically apply unapplied payments to  one or more receivables in the payment run.
          type: boolean
        batch:
          description: |
            The alias name given to a batch. The batch name is a string of 50 characters or less.

            This field conflicts with the `accountId` field. If they are both specified in the request body, an error occurs and an error message is returned. 
          type: string
        billCycleDay:
          description: |
            The billing cycle day (BCD), the day of the month when a bill run generates invoices for the account. The value must be equal to or less then 31, and 31 is mean the EOM.

            This field conflicts with the `accountId` field. If they are both specified in the request body, an error occurs and an error message is returned.
          type: string
        billingRunId:
          description: |
            The ID of a bill run.

            This field conflicts with the `accountId` field. If they are both specified in the request body, an error occurs and an error message is returned.
          format: uuid
          type: string
        collectPayment:
          description: |
            Whether to process electronic payments during the execution of payment runs. 

            If the Payment user permission "Process Electronic Payment" is disabled, this field will be ignored.
          type: boolean
        consolidatedPayment:
          description: |
            **Note:** The **Process Electronic Payment** permission also needs to be allowed for a Manage Payment Runs role to work. See [Payments Roles](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/A_Administrator_Settings/User_Roles/e_Payments_Roles) for more information. 

            Whether to process a single payment for all receivables that are due on an account.
          type: boolean
        currency:
          description: |
            A currency defined in the web-based UI administrative settings.

            This field conflicts with the `accountId` field. If they are both specified in the request body, an error occurs and an error message is returned.
          type: string
        paymentGatewayId:
          description: |
            The ID of the gateway instance that processes the payment.

            This field conflicts with the `accountId` field. If they are both specified in the request body, an error occurs and an error message is returned.
          format: uuid
          type: string
        processPaymentWithClosedPM:
          description: |
            **Note:** The **Process Electronic Payment** permission also needs to be allowed for a Manage Payment Runs role to work. See [Payments Roles](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/A_Administrator_Settings/User_Roles/e_Payments_Roles) for more information. 

            Whether to process payments even if the default payment method is closed.
          type: boolean
        runDate:
          description: |
            The date and time when the scheduled payment run is to be executed, in `yyyy-mm-dd hh:mm:ss` format. The backend will ignore mintues and seconds in the field value. For example, if you specify `2017-03-01 11:30:37` for this value, this payment run will be run at 2017-03-01 11:00:00.
          format: date-time
          type: string
        targetDate:
          description: |
            The target date used to determine which receivables to be paid in the payment run. The payments are collected for all receivables with the due date no later than the target date.
          format: date
          type: string
      type: object
    PUTPublicCalloutOptionsRequest:
      example:
        confirmSucFromResContent: false
        intervalTime: 30
        retryNumber: 3
      properties:
        confirmSucFromResContent:
          description: If the value is `false`, callout is successful when response code is 200. If value is `true`, when the response code is 200, and ONLY when response `Content-Type` is `application/json` and body payload is `{success:true}`, the callout is succesful.
          type: boolean
        intervalTime:
          description: The interval, in minutes, between callout retries.
          format: int32
          minimum: 1
          type: integer
        retryNumber:
          description: The number of retries when the callout fails.
          format: int32
          minimum: 1
          type: integer
      type: object
    PUTPublicEmailTemplateRequest:
      example:
        active: true
        bccEmailAddress: user@example.com
        ccEmailAddress: user@example.com
        ccEmailType: SpecificEmails
        description: Email when an account is edited
        emailBody: Dear user,<p>the account <Account.Name> has been edited. <p>Example Co. Ltd.
        emailSubject: Account <Account.Number> has been edited
        encodingType: UTF8
        fromEmailAddress: null
        fromEmailType: TenantEmail
        fromName: Example Co. Ltd.
        isHtml: true
        name: Account Edit Email
        replyToEmailAddress: null
        replyToEmailType: TenantEmail
        toEmailAddress: null
        toEmailType: BillToContact
      properties:
        active:
          description: The status of the email template.
          type: boolean
        bccEmailAddress:
          description: Email bcc address.
          format: email
          type: string
        ccEmailAddress:
          description: Email cc address.
          type: string
        ccEmailType:
          default: SpecificEmails
          description: |-
            Email cc type.
            * When EventType is CDC/External and 'ReferenceObjectType' in EventType is associated to Account, ccEmailType can be ALL values in enum. 
            * When EventType is CDC/External and 'ReferenceObjectType' in EventType is not associated to Account, ccEmailType MUST be TenantAdmin, RunOwner or SpecificEmail.
            * When EventType is CDC/External and 'ReferenceObjectType' in EventType is EMPTY, ccEmailType MUST be TenantAdmin, RunOwner or SpecificEmail.
          enum:
            - BillToContact
            - SoldToContact
            - SpecificEmails
            - TenantAdmin
            - BillToAndSoldToContacts
            - RunOwner
            - AllContacts
            - InvoiceOwnerBillToContact
            - InvoiceOwnerSoldToContact
            - InvoiceOwnerBillToAndSoldToContacts
            - InvoiceOwnerAllContacts
          type: string
        description:
          description: The description of the email template.
          maxLength: 255
          type: string
        emailBody:
          description: |-
            The email body. You can add merge fields in the email object using angle brackets. 
            User can also embed html tags if 'isHtml' is true.
          type: string
        emailSubject:
          description: The email subject. You can add merge fields in the email subject using angle brackets.
          type: string
        encodingType:
          description: The endcode type of the email body.
          enum:
            - UTF8
            - Shift_JIS
            - ISO_2022_JP
            - EUC_JP
            - X_SJIS_0213
          type: string
        fromEmailAddress:
          description: If fromEmailType is SpecificEmail, this field is required
          type: string
        fromEmailType:
          description: The type of fromEmail.
          enum:
            - TenantEmail
            - SpecificEmail
          type: string
        fromName:
          description: The name of email sender.
          type: string
        isHtml:
          description: Specifies whether the style of email body is HTML.
          type: boolean
        name:
          description: The name of the email template.
          maxLength: 255
          type: string
        replyToEmailAddress:
          description: If replyToEmailType is SpecificEmail, this field is required.
          type: string
        replyToEmailType:
          description: The type of the reply email.
          enum:
            - TenantEmail
            - SpecificEmail
          type: string
        toEmailAddress:
          description: If toEmailType is SpecificEmail, this field is required.
          type: string
        toEmailType:
          description: |-
            Email receive type.
            * When EventType is CDC/External and 'ReferenceObjectType' in EventType is associated to Account, toEmailType can be ALL values in enum. 
            * When EventType is CDC/External and 'ReferenceObjectType' in EventType is not associated to Account, toEmailType MUST be TenantAdmin, RunOwner or SpecificEmail. 
            * When EventType is CDC/External and 'ReferenceObjectType' in EventType is EMPTY, toEmailType MUST be TenantAdmin, RunOwner or SpecificEmail.
          enum:
            - BillToContact
            - SoldToContact
            - SpecificEmails
            - TenantAdmin
            - BillToAndSoldToContacts
            - RunOwner
            - AllContacts
            - InvoiceOwnerBillToContact
            - InvoiceOwnerSoldToContact
            - InvoiceOwnerBillToAndSoldToContacts
            - InvoiceOwnerAllContacts
          type: string
      type: object
    PUTPublicNotificationDefinitionRequest:
      example:
        active: true
        callout:
          active: true
          calloutAuth:
            domain: example_domain
            password: example_password
            preemptive: true
            username: example_user
          calloutBaseurl: https://www.example.com/callout/AccountEdit
          calloutParams:
            AccountName: <Account.Name>
            AccountNumber: <Account.Number>
          calloutRetry: true
          description: Callout when an account is edited
          httpMethod: POST
          name: Callout for Account Edited
          requiredAuth: true
        calloutActive: true
        communicationProfileId: 6e569e1e05f040eda51a927b140c0ac5
        description: Notification sent out when an account is edited
        emailActive: true
        emailTemplateId: 6e569e1e05f040eda51a927b140c0ac6
        filterRule:
          condition: Account.Balance >= _VIP_BALANCE_AMOUNT && Account.Status == _ACCOUNT_STATUS
          description: Filter rule to test if an account is a VIP account
          parameters:
            _ACCOUNT_STATUS:
              description: The status of the VIP Account
              displayName: VIP Account Status
              options:
                - Draft
                - Active
                - Canceled
              valueType: STRING
            _VIP_BALANCE_AMOUNT:
              description: The minimum account balance
              displayName: VIP Account Balance
              options: null
              valueType: BIG_DECIMAL
        filterRuleParams:
          _EDITED_FROM: UI
          _VIP_ACCOUNT_BALANCE: "100000"
        name: Account Edit Notification
      properties:
        active:
          default: true
          description: The status of the notification definition. The default value is true.
          type: boolean
        callout:
          properties:
            active:
              default: true
              description: The status of the callout. The default is true.
              type: boolean
            calloutAuth:
              $ref: "#/components/schemas/CalloutAuth"
            calloutBaseurl:
              description: The callout URL. It must start with 'https://'
              example: https://***
              format: url
              minLength: 10
              type: string
            calloutParams:
              $ref: "#/components/schemas/CalloutMergeFields"
            calloutRetry:
              default: true
              description: Specified whether to retry the callout when the callout fails. The default is true.
              type: boolean
            description:
              description: Description for the callout.
              maxLength: 255
              type: string
            httpMethod:
              description: The HTTP method of the callout.
              enum:
                - GET
                - PUT
                - POST
                - DELETE
              example: POST
              type: string
            name:
              description: The name of the created callout.
              maxLength: 255
              type: string
            requiredAuth:
              description: Specifies whether the callout requires auth.
              type: boolean
          required:
            - eventTypeName
            - name
            - calloutBaseurl
            - httpMethod
            - requiredAuth
          type: object
        calloutActive:
          default: false
          description: The status of the callout action. The default value is false.
          type: boolean
        communicationProfileId:
          description: |
            The profile that notification definition belongs to. If you want to
            update the notification to a system notification, you should pass
            'SystemNotification'. '

            * When EventType is CDC/External and 'ReferenceObjectType' in EventType is associated to Account, comunicationProfileId can be 'SystemNotification'/Empty/UUID. 

            * When EventType is CDC/External and 'ReferenceObjectType' in EventType is not  associated to Account, comunicationProfileId can be 'SystemNotification'/Empty. 

            * When EventType is CDC/External and 'ReferenceObjectType' in EventType is EMPTY, comunicationProfileId can be 'SystemNotification'/Empty.
          format: uuid
          type: string
        description:
          description: The description of the notification definition.
          maxLength: 255
          type: string
        emailActive:
          default: false
          description: The status of the email action. The default is false.
          type: boolean
        emailTemplateId:
          description: |
            The ID of the email template. If emailActive is updated from
            false to true, an email template is required, and the EventType of
            the email template MUST be the same as the EventType of the notification definition.
          format: uuid
          type: string
        filterRule:
          description: ""
          properties:
            condition:
              description: |
                The filter rule conditions, written in [JEXL](http://commons.apache.org/proper/commons-jexl/).
                The rule might contain event context merge fields and data source merge fields. Data source merge fields must be from [the base object of the event or from the joined objects of the base object](https://knowledgecenter.zuora.com/DC_Developers/M_Export_ZOQL#Data_Sources_and_Objects). Notifications with invalid merge fields will fail to evaluate, thus will not be invoked. For example, to trigger an event when an invoice is posted with the amount over 1000, you would define the following condition on the `Invoice` object:

                ```changeType == 'UPDATE' && Invoice.Status == 'Posted' && Invoice.Status_old != 'Posted' && Invoice.Amount > 1000```

                There are conventions and keywords you need to be aware of. For example:

                * `changeType` is a keyword to specify what kind of change happened to the object. Allowed values are `INSERT`, `UPDATE` or `DELETE`.

                * `Invoice.Status` refers to field `Status` of the Zuora object `Invoice`.

                * A variable with the `_old` suffix means it’s a previous value of the corresponding object field. The "_old" fields are only available on the base objects.
              example: Account.Balance >= _VIP_BALANCE_AMOUNT && Account.Status == _ACCOUNT_STATUS
              type: string
            description:
              description: The description of the filter rule.
              maxLength: 255
              type: string
            parameters:
              $ref: "#/components/schemas/FilterRuleParameterDefinitions"
          required:
            - eventTypeName
            - condition
            - parameters
          type: object
        filterRuleParams:
          $ref: "#/components/schemas/FilterRuleParameterValues"
        name:
          description: The name of the notification definition, which is unique in the profile.
          maxLength: 255
          type: string
      type: object
    PUTRSBasicInfoType:
      allOf:
        - properties:
            notes:
              description: |
                Additional information about this record.
              type: string
            referenceId:
              description: |
                Reference ID is used only in the custom unlimited rule to create a revenue schedule. In this scenario, the revenue schedule is not linked to an invoice item or invoice item adjustment.

                Use this field only when the revenue schedule is not linked to an invoice item or invoice item adjustment, such as for revenue schedules based on the Custom - Unlimited recognition model.
              maxLength: 100
              minLength: 0
              type: string
          type: object
        - $ref: "#/components/schemas/RevenueScheduleObjectCustomFields"
      example:
        notes: change recognition term
        referenceId: Reference ID
    PUTRSTermType:
      allOf:
        - properties:
            distributionType:
              description: |
                How you want to distribute the revenue. 


                * Daily Distribution: Distributes revenue evenly across each day between the recognitionStart and recognitionEnd dates.
                * Monthly Distribution (Back Load): Back loads the revenue so you distribute the monthly amount in the partial month in the end only.
                * Monthly Distribution (Front Load): Front loads the revenue so you distribute the monthly amount in the partial month in the beginning only.
                * Monthly Distribution (Proration by Days): Splits the revenue amount between the two partial months.

                **Note:** To use any of the Monthly Distribution options, you must have the "Monthly recognition over time" model enabled in **Settings > Finance > Manage Revenue Recognition Models** in the Zuora UI.
              enum:
                - Daily Distribution
                - Monthly Distribution (Back Load)
                - Monthly Distribution (Front Load)
                - Monthly Distribution (Proration by Days)
              type: string
            eventType:
              description: |
                Label of the revenue event type. Revenue event type labels can be duplicated. You can configure your revenue event type labels by navigating to **Settings > Finance > Configure Revenue Event Types** in the Zuora UI.

                Note that `Credit Memo Posted` and `Debit Memo Posted` are only available if you enable the Invoice Settlement feature.
              enum:
                - Invoice Posted
                - Invoice Item Adjustment Created
                - Invoice Canceled
                - Invoice Item Adjustment Canceled
                - Revenue Distributed
                - Credit Memo Posted
                - Debit Memo Posted
              type: string
            eventTypeSystemId:
              description: |
                System ID of the revenue event type. Each eventType has a unique system ID. You can configure your revenue event type system IDs by navigating to **Settings > Finance > Configure Revenue Event Types** in the Zuora UI.
              type: string
            notes:
              description: |
                Additional information about this record.
              type: string
            recognitionEnd:
              description: |
                The end date of a recognition period in `yyyy-mm-dd` format. 

                The maximum difference between the `recognitionStart` and `recognitionEnd` date fields is equal to 250 multiplied by the length of an accounting period.
              format: date
              type: string
            recognitionStart:
              description: |
                The start date of a recognition period in `yyyy-mm-dd` format.

                If there is a closed accounting period between the `recognitionStart` and `recognitionEnd` dates, the revenue that would be placed in the closed accounting period is instead placed in the next open accounting period.
              format: date
              type: string
          required:
            - recognitionEnd
            - recognitionStart
          type: object
        - $ref: "#/components/schemas/RevenueEventObjectCustomFields"
      example:
        distributionType: Daily distribution
        eventType: Revenue Distributed
        eventTypeSystemId: RevenueDistributed__z
        notes: manual distribute revenue by usage
        recognitionEnd: 2015-12-31
        recognitionStart: 2015-12-1
    PUTRefundType:
      allOf:
        - properties:
            comment:
              description: |
                Comments about the refund.
              maxLength: 255
              minLength: 0
              type: string
            financeInformation:
              description: |
                Container for the finance information related to the refund.
              properties:
                bankAccountAccountingCode:
                  description: |
                    The accounting code that maps to a bank account in your accounting system.
                  maxLength: 100
                  minLength: 0
                  type: string
                transferredToAccounting:
                  description: |
                    Whether the payment was transferred to an external accounting system. Use this field for integration with accounting systems, such as NetSuite. 
                  enum:
                    - Processing
                    - Yes
                    - No
                    - Error
                    - Ignore
                  type: string
                unappliedPaymentAccountingCode:
                  description: |
                    The accounting code for the unapplied payment.
                  maxLength: 100
                  minLength: 0
                  type: string
              type: object
            reasonCode:
              description: |
                A code identifying the reason for the transaction. The value must be an existing reason code or empty. If you do not specify a value, Zuora uses the default reason code.
              type: string
            referenceId:
              description: |
                The transaction ID returned by the payment gateway. Use this field to reconcile refunds between your gateway and Zuora Payments.

                You can only update the reference ID for external refunds.
              maxLength: 100
              minLength: 0
              type: string
          type: object
        - $ref: "#/components/schemas/RefundObjectNSFields"
        - $ref: "#/components/schemas/RefundObjectCustomFields"
      example:
        comment: update comment
        financeInformation:
          transferredToAccounting: No
    PUTRenewSubscriptionResponseType:
      properties:
        creditMemoId:
          description: |
            The credit memo ID, if a credit memo is generated during the subscription process.

            **Note:** This container is only available if you set the Zuora REST API minor version to 207.0 or later in the request header, and you have  [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
          type: string
        invoiceId:
          description: |
            Invoice ID, if one is generated.
          type: string
        paidAmount:
          description: |
            Payment amount, if payment is collected.
          type: number
        paymentId:
          description: |
            Payment ID, if payment is collected.
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
        termEndDate:
          description: |
            Date the new subscription term ends, as yyyy-mm-dd.
          format: date
          type: string
        termStartDate:
          description: |
            Date the new subscription term begins, as yyyy-mm-dd.
          format: date
          type: string
        totalDeltaMrr:
          description: |
            Change in the subscription monthly recurring revenue as a result of the update. For a renewal, this is the MRR of the subscription in the new term.
          type: number
        totalDeltaTcv:
          description: |
            Change in the total contracted value of the subscription as a result of the update. For a renewal, this is the TCV of the subscription in the new term.
          type: number
      type: object
    PUTRenewSubscriptionType:
      example:
        collect: false
        runBilling: true
      properties:
        applicationOrder:
          description: |
            The priority order to apply credit memos and/or unapplied payments to an invoice. Possible item values are: `CreditMemo`, `UnappliedPayment`.

            **Note:**
              - This field is valid only if the `applyCredit` field is set to `true`.
              - If no value is specified for this field, the default priority order is used, ["CreditMemo", "UnappliedPayment"], to apply credit memos first and then apply unapplied payments.
              - If only one item is specified, only the items of the spedified type are applied to invoices. For example, if the value is `["CreditMemo"]`, only credit memos are used to apply to invoices.
          items:
            type: string
          type: array
        applyCredit:
          description: |
            Whether to automatically apply credit memos or unapplied payments, or both to an invoice.

            If the value is `true`, the credit memo or unapplied payment, or both will be automatically applied to the invoice. If no value is specified or the value is `false`, no action is taken.

            **Note:** This field is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
          type: boolean
        applyCreditBalance:
          description: |
            Whether to automatically apply a credit balance to an invoice.

            If the value is `true`, the credit balance is applied to the invoice. If the value is `false`, no action is taken.


            To view the credit balance adjustment, retrieve the details of the invoice using the Get Invoices method.

            Prerequisite: `invoice` must be `true`. 

            **Note:** 
              - If you are using the field `invoiceCollect` rather than the field `invoice`, the `invoiceCollect` value must be `true`.
              - This field is deprecated if you have the Invoice Settlement feature enabled.
          type: boolean
        collect:
          default: false
          description: |
            Collects an automatic payment for a subscription. The collection generated in this operation is only for this subscription, not for the entire customer account.

            If the value is `true`, the automatic payment is collected. If the value is `false`, no action is taken.

            Prerequisite: The `invoice` or `runBilling` field must be `true`. 

            **Note**: This field is only available if you set the `zuora-version` request header to `196.0` or later.
          type: boolean
        documentDate:
          description: |
            The date of the billing document, in `yyyy-mm-dd` format. It represents the invoice date for invoices, credit memo date for credit memos, and debit memo date for debit memos.

            - If this field is specified, the specified date is used as the billing document date. 
            - If this field is not specified, the date specified in the `targetDate` is used as the billing document date.
          format: date
          type: string
        invoice:
          description: |
            **Note:** This field has been replaced by the `runBilling` field. The
            `invoice` field is only available for backward compatibility.


            Creates an invoice for a subscription. The invoice generated in this
            operation is only for this subscription, not for the entire customer
            account.


            If the value is `true`, an invoice is created. If the value is
            `false`, no action is taken. The default value is `false`. 


            This field is in Zuora REST API version control. Supported minor
            versions are `196.0` and `207.0`. To use this field in the method, you
            must set the zuora-version parameter to the minor version number in
            the request header. 
          type: boolean
        invoiceCollect:
          default: true
          description: |
            **Note:** This field has been replaced by the `invoice` field
            and the `collect` field. `invoiceCollect` is available only for backward compatibility.


            If this field is set to `true`, an invoice is generated and payment collected automatically during the subscription process. If `false`, no invoicing or payment takes place. The invoice generated in this operation is only for this subscription, not for the entire customer account.


            **Note**: This field is only available if you set the `zuora-version` request header to `186.0`, `187.0`, `188.0`, or `189.0`.
          type: boolean
        invoiceTargetDate:
          description: |
            **Note:** This field has been replaced by the `targetDate` field. The
            `invoiceTargetDate` field is only available for backward
            compatibility.


            Date through which to calculate charges if an invoice is generated, as
            yyyy-mm-dd. Default is current date.


            This field is in Zuora REST API version control. Supported minor
            versions are `207.0` and earlier.  
          format: date
          type: string
        runBilling:
          default: false
          description: |
            Creates an invoice for a subscription. If you have the Invoice Settlement feature enabled, a credit memo might also be created based on the [invoice and credit memo generation rule](https://knowledgecenter.zuora.com/CB_Billing/Invoice_Settlement/Credit_and_Debit_Memos/Rules_for_Generating_Invoices_and_Credit_Memos).  


            The billing documents generated
            in this operation is only for this subscription, not for the entire
            customer account.


            Possible values:

            - `true`: An invoice is created. If you have the Invoice Settlement feature enabled, a credit memo might also be created.


            - `false`: No invoice is created.


            **Note:** This field is in Zuora REST API version control. Supported
            minor versions are `211.0` or later. To use this field in the method,
            you must set the `zuora-version` parameter to the minor version number
            in the request header.
          enum:
            - true
            - false
          type: boolean
        targetDate:
          description: |
            Date through which to calculate charges if an invoice or a credit memo is generated, as
            yyyy-mm-dd. Default is current date.


            **Note:** The credit memo is only available if you have the Invoice Settlement feature enabled.


            This field is in Zuora REST API version control. Supported minor
            versions are `211.0` and later. To use this field in the method, you
            must set the  `zuora-version` parameter to the minor version number in
            the request header.
          format: date
          type: string
      type: object
    PUTRevenueScheduleResponseType:
      properties:
        revenueEventNumber:
          description: |
            The revenue event number created when a revenue event occurs.
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    PUTRevproAccCodeResponse:
      properties:
        success:
          description: ""
          type: boolean
      type: object
    PUTScAddType:
      allOf:
        - properties:
            applyDiscountTo:
              description: |
                Specifies the type of charges that you want a specific discount to apply to.

                Values:

                * `ONETIME`
                * `RECURRING`
                * `USAGE`
                * `ONETIMERECURRING`
                * `ONETIMEUSAGE`
                * `RECURRINGUSAGE`
                * `ONETIMERECURRINGUSAGE`

                Available for the following charge type for the Discount-Fixed Amount and Discount-Percentage charge models:

                * Recurring
              type: string
            billCycleDay:
              description: |
                Sets the bill cycle day (BCD) for the charge. The BCD determines which day of the month customer is billed.

                Values: `1`-`31`

                Available for the following charge types:

                * Recurring
                * Usage-based
              type: string
            billCycleType:
              description: |
                Specifies how to determine the billing day for the charge. When this field is set to `SpecificDayofMonth`, set the `BillCycleDay` field. When this field is set to `SpecificDayofWeek`, set the `weeklyBillCycleDay` field.

                Values:

                * `DefaultFromCustomer`
                * `SpecificDayofMonth`
                * `SubscriptionStartDay`
                * `ChargeTriggerDay`
                * `SpecificDayofWeek`

                Available for the following charge types:

                * Recurring
                * Usage-based
              type: string
            billingPeriod:
              description: |
                Billing period for the charge. The start day of the billing period is also called the bill cycle day (BCD).

                Values:

                * `Month`
                * `Quarter`
                * `Semi_Annual`
                * `Annual`
                * `Eighteen_Months`
                * `Two_Years`
                * `Three_Years`
                * `Five_Years`
                * `Specific_Months`
                * `Subscription_Term`
                * `Week`
                * `Specific_Weeks`

                Available for the following charge types:

                * Recurring
                * Usage-based
              type: string
            billingPeriodAlignment:
              description: |
                Aligns charges within the same subscription if multiple charges begin on different dates.

                Values:

                * `AlignToCharge`
                * `AlignToSubscriptionStart`
                * `AlignToTermStart`

                Available for the following charge types:

                * Recurring
                * Usage-based
              type: string
            billingTiming:
              description: |
                Billing timing for the charge for recurring charge types. Not avaliable for one time, usage and discount charges.

                Values:

                * `IN_ADVANCE` (default)
                * `IN_ARREARS`
              type: string
            chargeModelConfiguration:
              $ref: "#/components/schemas/ChargeModelConfigurationType"
            description:
              description: |
                Description of the charge.
              type: string
            discountAmount:
              description: |
                Specifies the amount of fixed-amount discount.

                Available for the following charge type for the Discount-Fixed Amount charge model:

                * Recurring
              type: number
            discountLevel:
              description: |
                Specifies if the discount applies to the product rate plan only , the entire subscription, or to any activity in the account.

                Values:

                * `rateplan`
                * `subscription`
                * `account`

                Available for the following charge type for the Discount-Fixed Amount and Discount-Percentage charge models:

                * Recurring
              type: string
            discountPercentage:
              description: |
                Specifies the percentage of a percentage discount. 

                Available for the following charge type for the Discount-Percentage charge model:

                * Recurring
              type: number
            endDateCondition:
              description: |
                Defines when the charge ends after the charge trigger date. If the subscription ends before the charge end date, the charge ends when the subscription ends. But if the subscription end date is subsequently changed through a Renewal, or Terms and Conditions amendment, the charge will end on the charge end date.

                Values:

                * `Subscription_End`
                * `Fixed_Period`
                * `Specific_End_Date`
              type: string
            includedUnits:
              description: |
                Specifies the number of units in the base set of units for this charge. Must be >=`0`.

                Available for the following charge types for the Overage charge model:

                * Recurring
                * Usage-based
              type: number
            listPriceBase:
              description: |
                The list price base for the product rate plan charge.

                Values:

                * `Per_Billing_Period`
                * `Per_Month`
                * `Per_Week`

                Available for the following charge type for the Flat Fee, Per Unit, Volume Pricing, and Tiered Pricing charge models:

                * Recurring
              type: string
            number:
              description: |
                Unique number that identifies the charge. System-generated if not provided.
              type: string
            numberOfPeriods:
              description: |
                Specifies the number of periods to use when calculating charges in an overage smoothing charge model.

                Available for the following charge type for the Overage and Tiered with Overage charge models:

                * Usage-based
              format: int64
              type: integer
            overagePrice:
              description: |
                Price for units over the allowed amount. 

                Available for the following charge type for the Overage and Tiered with Overage charge models:

                * Usage-based
              type: number
            overageUnusedUnitsCreditOption:
              description: |
                Determines whether to credit the customer with unused units of usage.

                Values:

                * `NoCredit`
                * `CreditBySpecificRate`

                Available for the following charge type for the Overage and Tiered with Overage charge models:

                * Usage-based
              type: string
            price:
              description: |
                Price for units in the subscription rate plan.

                Supports all charge types for the Flat Fee and Per Unit charge models
              type: number
            priceChangeOption:
              description: |
                Applies an automatic price change when a termed subscription is renewed. The Zuora Billing Admin setting Enable Automatic Price Change When Subscriptions are Renewed?  must be set to Yes to use this field.  See Define Default Subscription Settings for more information on setting this option.

                Values:

                * `NoChange` (default)
                * `SpecificPercentageValue`
                * `UseLatestProductCatalogPricing`

                Available for the following charge types:

                * Recurring
                * Usage-based
                * Not available for the Fixed-Amount Discount charge model.
              type: string
            priceIncreasePercentage:
              description: |
                Specifies the percentage to increase or decrease the price of a termed subscription's renewal. Required if you set the `PriceChangeOption` field to `SpecificPercentageValue`.

                Decimal between -100 and 100.

                Available for the following charge types:

                * Recurring
                * Usage-based

                Not available for the Fixed-Amount Discount charge model.
              type: number
            productRatePlanChargeId:
              description: ""
              type: string
            quantity:
              description: |
                Number of units. Must be >=`0`.

                Available for the following charge types for the Per Unit, Volume Pricing, and Tiered Pricing charge models:

                * One-time
                * Recurring
              type: number
            ratingGroup:
              description: |
                Specifies a rating group based on which usage records are rated.

                Possible values:

                - `ByBillingPeriod` (default): The rating is based on all the usages in a billing period.
                - `ByUsageStartDate`: The rating is based on all the usages on the same usage start date. 
                - `ByUsageRecord`: The rating is based on each usage record.
                - `ByUsageUpload`: The rating is based on all the  usages in a uploaded usage file (`.xls` or `.csv`).
                - `ByGroupId`: The rating is based on all the usages in a custom group.

                **Note:** 
                - The `ByBillingPeriod` value can be applied for all charge models. 
                - The `ByUsageStartDate`, `ByUsageRecord`, and `ByUsageUpload` values can only be applied for per unit, volume pricing, and tiered pricing charge models. 
                - The `ByGroupId` value is only available if you have the Active Rating feature enabled.
                - Use this field only for Usage charges. One-Time Charges and Recurring Charges return `NULL`.
              type: string
            specificBillingPeriod:
              description: |
                Specifies the number of month or week for the charges billing period. Required if you set the value of the `billingPeriod` field to `Specific_Months` or `Specific_Weeks`.

                Available for the following charge types:

                * Recurring
                * Usage-based
              format: int64
              type: integer
            specificEndDate:
              description: |
                Defines when the charge ends after the charge trigger date.

                This field is only applicable when the `endDateCondition` field is set to `Specific_End_Date`.

                If the subscription ends before the specific end date, the charge ends when the subscription ends. But if the subscription end date is subsequently changed through a Renewal, or Terms and Conditions amendment, the charge will end on the specific end date.
              format: date
              type: string
            tiers:
              description: |
                Container for Volume, Tiered or Tiered with Overage charge models. Supports the following charge types:

                * One-time
                * Recurring
                * Usage-based
              items:
                $ref: "#/components/schemas/POSTTierType"
              type: array
            triggerDate:
              description: |
                Specifies when to start billing the customer for the charge. Required if the `triggerEvent` field is set to `USD`.
              format: date
              type: string
            triggerEvent:
              description: |
                Specifies when to start billing the customer for the charge.

                Values:

                * `UCE`
                * `USA`
                * `UCA`
                * `USD`
              type: string
            unusedUnitsCreditRates:
              description: |
                Specifies the rate to credit a customer for unused units of usage. This field applies only for overage charge models when the `OverageUnusedUnitsCreditOption` field is set to `CreditBySpecificRate`.

                Available for the following charge type for the Overage and Tiered with Overage charge models:

                * Usage-based
              type: number
            upToPeriods:
              description: |
                The period type used to define when the charge ends. 

                Values:

                * `Billing_Periods`
                * `Days`
                * `Weeks`
                * `Months`
                * `Years`

                You must use this field together with the `upToPeriods` field to specify the time period.

                This field is applicable only when the `endDateCondition` field is set to `Fixed_Period`. 
              format: int64
              type: integer
            upToPeriodsType:
              description: |
                The period type used to define when the charge ends. 

                Values:

                * `Billing_Periods`
                * `Days`
                * `Weeks`
                * `Months`
                * `Years`

                You must use this field together with the `upToPeriods` field to specify the time period.

                This field is applicable only when the `endDateCondition` field is set to `Fixed_Period`. 
              type: string
          required:
            - productRatePlanChargeId
          type: object
        - $ref: "#/components/schemas/RatePlanChargeObjectCustomFields"
      title: chargeOverrides
    PUTScUpdateType:
      allOf:
        - properties:
            billingPeriodAlignment:
              description: |
                Aligns charges within the same subscription if multiple charges begin on different dates.

                Values:

                * `AlignToCharge`
                * `AlignToSubscriptionStart`
                * `AlignToTermStart`

                Available for the following charge types:

                * Recurring
                * Usage-based
              type: string
            chargeModelConfiguration:
              $ref: "#/components/schemas/ChargeModelConfigurationType"
            description:
              description: |
                Description of the charge.
              type: string
            includedUnits:
              description: |
                Specifies the number of units in the base set of units for this charge. Must be >=0.

                Available for the following charge types for the Overage charge model:

                * `Recurring`
                * `Usage-based`
              type: number
            overagePrice:
              description: |
                Price for units over the allowed amount. 

                Available for the following charge type for the Overage and Tiered with Overage charge models:

                * Usage-based
              type: number
            price:
              description: |
                Price for units in the subscription rate plan.

                Supports all charge types for the Flat Fee and Per Unit charge models
              type: number
            priceChangeOption:
              description: |
                Applies an automatic price change when a termed subscription is renewed. The Billing Admin setting **Enable Automatic Price Change When Subscriptions are Renewed?** must be set to Yes to use this field.

                Values:

                * `NoChange` (default)
                * `SpecificPercentageValue`
                * `UseLatestProductCatalogPricing`

                Available for the following charge types:

                * Recurring
                * Usage-based

                Not available for the Fixed-Amount Discount charge model.
              type: string
            priceIncreasePercentage:
              description: |
                Specifies the percentage to increase or decrease the price of a termed subscription's renewal. Required if you set the `PriceChangeOption` field to `SpecificPercentageValue`.

                Decimal between `-100` and `100`.

                Available for the following charge types:

                * Recurring
                * Usage-based

                Not available for the Fixed-Amount Discount charge model.
              type: number
            quantity:
              description: |
                Quantity of units; must be greater than zero.
              type: number
            ratePlanChargeId:
              description: |
                ID of a rate-plan charge for this subscription.
              type: string
            tiers:
              description: |
                Container for Volume, Tiered or Tiered with Overage charge models. Supports the following charge types:

                * One-time
                * Recurring
                * Usage-based
              items:
                $ref: "#/components/schemas/POSTTierType"
              type: array
            triggerDate:
              description: |
                Specifies when to start billing the customer for the charge. Required if the `triggerEvent` field is set to USD.

                `triggerDate` cannot be updated for the following using the REST update subscription call:

                * One-time charge type
                * Discount-Fixed Amount charge model
                * Discount-Percentage charge model
              format: date
              type: string
            triggerEvent:
              description: |
                Specifies when to start billing the customer for the charge.

                Values:

                * `UCE`
                * `USA`
                * `UCA`
                * `USD`

                This is the date when charge changes in the REST request become effective.

                `triggerEvent` cannot be updated for the following using the REST update subscription call:

                * One-time charge type
                * Discount-Fixed Amount charge model
                * Discount-Percentage charge model
              type: string
          required:
            - ratePlanChargeId
          type: object
        - $ref: "#/components/schemas/RatePlanChargeObjectCustomFields"
      title: chargeUpdateDetails
    PUTScheduleRIDetailType:
      example:
        revenueItems:
          - accountingPeriodName: Oct'2014
          - accountingPeriodName: Nov'2014
      properties:
        revenueItems:
          description: |
            Revenue items are listed in ascending order by the accounting period start date.

            Include at least one custom field.
          items:
            $ref: "#/components/schemas/RevenueScheduleItemType"
          type: array
      required:
        - revenueItems
      type: object
    PUTSendUserAccessRequestResponseType:
      properties:
        success:
          description: |
            Returns `true` if the request is successful.
          type: boolean
      type: object
    PUTSendUserAccessRequestType:
      example:
        targetEntityIds:
          - 8a80825555a3c7a10155b46120d058e7
          - 8a80825556ff28a4015708b93df82ba7
      properties:
        targetEntityIds:
          description: |
            The ID of the entities that the user wants to access.
          items:
            title: Entity IDs
            type: string
          type: array
      required:
        - targetEntityIds
      type: object
    PUTSequenceSetRequest:
      description: ""
      example:
        creditMemo:
          prefix: FR-CM
        invoice:
          startNumber: 100
        name: FR
        payment:
          prefix: FR-P-
      properties:
        creditMemo:
          $ref: "#/components/schemas/CreditMemoEntityPrefix"
        debitMemo:
          $ref: "#/components/schemas/DebitMemoEntityPrefix"
        invoice:
          $ref: "#/components/schemas/InvoiceEntityPrefix"
        name:
          description: |
            The name of the sequence set configured for billing documents, payments, and refunds.
          type: string
        payment:
          $ref: "#/components/schemas/PaymentEntityPrefix"
        refund:
          $ref: "#/components/schemas/RefundEntityPrefix"
      type: object
    PUTSequenceSetResponse:
      description: ""
      properties:
        success:
          description: |
            Indicates whether the call succeeded.
          type: boolean
      type: object
    PUTSpecificDateAllocationType:
      allOf:
        - properties:
            amount:
              description: |
                The revenue schedule amount, which is the sum of all revenue items. This field cannot be null and must be formatted based on the currency, such as `JPY 30` or `USD 30.15`. Test out the currency to ensure you are using the proper formatting otherwise, the response will fail and this error message is returned: `Allocation amount with wrong decimal places.`
              format: decimal
              type: string
            distributeOn:
              description: |
                The recognition date on which to distribute revenue for milestone-based recognition.

                Type: date in `yyyy-mm-dd` format.
              format: date
              type: string
            distributionType:
              description: "How to distribute the revenue for milestone-based recognition. "
              enum:
                - specific date (delta fixed amount)
                - specific date (delta percent total)
                - specific date (delta percent undistributed)
              type: string
            eventType:
              description: |
                Label of the revenue event type. Revenue event type labels can be duplicated. You can configure your revenue event type labels by navigating to **Settings > Finance > Configure Revenue Event Types** in the Zuora UI.

                Note that `Credit Memo Posted` and `Debit Memo Posted` are only available if you enable the Invoice Settlement feature.
              enum:
                - Invoice Posted
                - Invoice Item Adjustment Created
                - Invoice Canceled
                - Invoice Item Adjustment Canceled
                - Revenue Distributed
                - Credit Memo Posted
                - Debit Memo Posted
              type: string
            eventTypeSystemId:
              description: |
                System ID of the revenue event type. Each eventType has a unique system ID. You can configure your revenue event type system IDs by navigating to **Settings > Finance > Configure Revenue Event Types** in the Zuora UI.
              type: string
            notes:
              description: |
                Additional information about this record.
              type: string
            percentage:
              description: |
                Percentage of the total recognition amount or total undistributed to distribute.

                Required if distributionType is either:
                * specific date (delta percent total)
                * specific date (delta percent undistributed)
              format: decimal
              type: string
          required:
            - distributionType
            - distributeOn
          type: object
        - $ref: "#/components/schemas/RevenueEventObjectCustomFields"
      example:
        amount: "1000.00"
        distributeOn: 2016-02-03
        distributionType: specific date (delta fixed amount)
        eventType: Revenue Distributed
        eventTypeSystemId: RevenueDistributed__z
        notes: service delivered and accepted by customer
    PUTSrpAddType:
      allOf:
        - properties:
            chargeOverrides:
              description: |
                This optional container is used to override the quantity of one or more product rate plan charges for this subscription.
              items:
                $ref: "#/components/schemas/PUTScAddType"
              type: array
            contractEffectiveDate:
              description: |
                The date when the amendment changes take effect. The format of the date is yyyy-mm-dd.

                If there is already a future-dated Update Product amendment on the subscription, the `specificUpdateDate` field will be used instead of this field to specify when the Update Product amendment takes effect.
              format: date
              type: string
            customerAcceptanceDate:
              description: |
                The date when the customer accepts the contract in yyyy-mm-dd format.

                If this field is not set:

                * If the `serviceActivationDate` field is not set, the value of this field is set to be the contract effective date.
                * If the `serviceActivationDate` field is set, the value of this field is set to be the service activation date.

                The billing trigger dates must follow this rule:

                contractEffectiveDate <= serviceActivationDate <= contractAcceptanceDate
              format: date
              type: string
            productRatePlanId:
              description: |
                ID of a product rate plan for this subscription
              type: string
            serviceActivationDate:
              description: |
                The date when the new product in the subscription is activated in yyyy-mm-dd format.

                You must specify a Service Activation date if the Customer Acceptance date is set. If the Customer Acceptance date is not set, the value of the `serviceActivationDate` field defaults to be the Contract Effective Date.

                The billing trigger dates must follow this rule:

                contractEffectiveDate <= serviceActivationDate <= contractAcceptanceDate
              format: date
              type: string
          required:
            - productRatePlanId
            - contractEffectiveDate
          type: object
        - $ref: "#/components/schemas/RatePlanObjectCustomFields"
      title: add
    PUTSrpRemoveType:
      properties:
        contractEffectiveDate:
          description: |
            Effective date of the new subscription, as yyyy-mm-dd.
          format: date
          type: string
        customerAcceptanceDate:
          description: |
            The date when the customer accepts the contract in yyyy-mm-dd format.

            If this field is not set:

            * If the `serviceActivationDate` field is not set, the value of this field is set to be the contract effective date.
            * If the `serviceActivationDate` field is set, the value of this field is set to be the service activation date.

            The billing trigger dates must follow this rule:

            contractEffectiveDate <= serviceActivationDate <= contractAcceptanceDate
          format: date
          type: string
        ratePlanId:
          description: |
            ID of a rate plan for this subscription.
          type: string
        serviceActivationDate:
          description: |
            The date when the remove amendment is activated in yyyy-mm-dd format.

            You must specify a Service Activation date if the Customer Acceptance date is set. If the Customer Acceptance date is not set, the value of the `serviceActivationDate` field defaults to be the Contract Effective Date.

            The billing trigger dates must follow this rule:

            contractEffectiveDate <= serviceActivationDate <= contractAcceptanceDate
          format: date
          type: string
      required:
        - contractEffectiveDate
        - ratePlanId
      title: remove
      type: object
    PUTSrpUpdateType:
      allOf:
        - properties:
            chargeUpdateDetails:
              description: |
                Container for one or more product rate plan charges. 
              items:
                $ref: "#/components/schemas/PUTScUpdateType"
              type: array
            contractEffectiveDate:
              description: |
                The date when the amendment changes take effect. The format of the date is yyyy-mm-dd.

                If there is already a future-dated Update Product amendment on the subscription, the `specificUpdateDate` field will be used instead of this field to specify when the Update Product amendment takes effect.
              format: date
              type: string
            customerAcceptanceDate:
              description: |
                The date when the customer accepts the contract in yyyy-mm-dd format.

                If this field is not set:

                * If the `serviceActivationDate` field is not set, the value of this field is set to be the contract effective date.
                * If the `serviceActivationDate` field is set, the value of this field is set to be the service activation date.

                The billing trigger dates must follow this rule:

                contractEffectiveDate <= serviceActivationDate <= contractAcceptanceDate
              format: date
              type: string
            ratePlanId:
              description: |
                ID of a rate plan for this subscription.
              type: string
            serviceActivationDate:
              description: |
                The date when the update amendment is activated in yyyy-mm-dd format.

                You must specify a Service Activation date if the Customer Acceptance date is set. If the Customer Acceptance date is not set, the value of the `serviceActivationDate` field defaults to be the Contract Effective Date.

                The billing trigger dates must follow this rule:

                contractEffectiveDate <= serviceActivationDate <= contractAcceptanceDate
              format: date
              type: string
            specificUpdateDate:
              description: |
                The date when the Update Product amendment takes effect. This field is only applicable if there is already a future-dated Update Product amendment on the subscription. The format of the date is yyyy-mm-dd.

                Required only for Update Product amendments if there is already a future-dated Update Product amendment on the subscription.
              format: date
              type: string
          required:
            - ratePlanId
            - contractEffectiveDate
          type: object
        - $ref: "#/components/schemas/RatePlanObjectCustomFields"
      title: update
    PUTSubscriptionPatchRequestType:
      example:
        customFields:
          sub_cf__c: subscription custom field
        ratePlans:
          - charges:
              - chargeNumber: C-00000016
                customFields:
                  sub_rpc__c: rate plan charge custom field
            customFields:
              sub_rate_plan__c: rate plan custom field
            ratePlanId: 8a8081085d834928015da220da08207f
      properties:
        customFields:
          $ref: "#/components/schemas/SubscriptionObjectCustomFields"
        ratePlans:
          items:
            properties:
              charges:
                items:
                  properties:
                    chargeId:
                      description: |
                        Use either this field or the `chargeNumber` field to specify the charge for which you will be updating the custom fields. By using this field you actually specify a specific charge segment of a charge. See [Segmented rate plan charges](https://knowledgecenter.zuora.com/Central_Platform/API/G_SOAP_API/E1_SOAP_API_Object_Reference/RatePlanCharge#Segmented_rate_plan_charges) for more information about charge segments.
                      type: string
                    chargeNumber:
                      description: |
                        Use either this field or the `chargeId` field to specify the charge for which you will be updating the custom fields. By using this field you actually specify the last charge segment of a charge. See [Segmented rate plan charges](https://knowledgecenter.zuora.com/Central_Platform/API/G_SOAP_API/E1_SOAP_API_Object_Reference/RatePlanCharge#Segmented_rate_plan_charges) for more information about charge segments.
                      type: string
                    customFields:
                      $ref: "#/components/schemas/RatePlanChargeObjectCustomFields"
                  type: object
                type: array
              customFields:
                $ref: "#/components/schemas/RatePlanObjectCustomFields"
              ratePlanId:
                description: The rate plan id in any version of the subscription. This will be linked to the only one rate plan in the current version.
                type: string
            required:
              - ratePlanId
            type: object
          type: array
      type: object
    PUTSubscriptionPreviewInvoiceItemsType:
      properties:
        chargeAmount:
          description: |
            The amount of the charge. This amount doesn't include taxes unless the charge's tax mode is inclusive.
          type: number
        chargeDescription:
          description: |
            Description of the charge.
          type: string
        chargeName:
          description: |
            Name of the charge
          type: string
        productName:
          description: |
            Name of the product associated with this item.
          type: string
        productRatePlanChargeId:
          description: ""
          type: string
        quantity:
          description: |
            Quantity of this item.
          type: number
        serviceEndDate:
          description: |
            End date of the service period for this item, i.e., the last day of the period, as yyyy-mm-dd.
          format: date
          type: string
        serviceStartDate:
          description: |
            Service start date as yyyy-mm-dd. If the charge is a one-time fee, this is the date of that charge.
          format: date
          type: string
        unitOfMeasure:
          description: ""
          type: string
      title: invoiceItems
      type: object
    PUTSubscriptionResponseType:
      properties:
        amount:
          description: |
            Invoice amount. Preview mode only.
          type: number
        amountWithoutTax:
          description: |
            Invoice amount minus tax. Preview mode only.
          type: number
        chargeMetrics:
          description: |
            Container for charge metrics.
          properties:
            dmrr:
              description: |
                Change in total contract value.
              type: string
            dtcv:
              description: |
                Change in monthly recurring revenue.
              type: string
            mrr:
              description: |
                Monthly recurring revenue.
              type: string
            number:
              description: |
                The charge number of the subscription. Only available for update subscription.
              type: string
            originRatePlanId:
              description: |
                The origin rate plan ID. Only available for update subscription.
              type: string
            originalId:
              description: |
                The original rate plan charge ID. Only available for update subscription.
              type: string
            productRatePlanChargeId:
              description: ""
              type: string
            productRatePlanId:
              description: ""
              type: string
            tcv:
              description: |
                Total contract value.
              type: string
          type: object
        creditMemo:
          description: |
            Container for credit memos.

            **Note:** This container is only available if you set the Zuora REST API minor version to 207.0 or later in the request header, and you have  [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 
          properties:
            amount:
              description: Credit memo amount.
              format: double
              type: number
            amountWithoutTax:
              description: Credit memo amount minus tax.
              format: double
              type: number
            creditMemoItems:
              description: ""
              items:
                $ref: "#/components/schemas/POSTSubscriptionPreviewCreditMemoItemsType"
              type: array
            taxAmount:
              description: Tax amount on the credit memo.
              format: double
              type: number
          type: object
        creditMemoId:
          description: |
            The credit memo ID, if a credit memo is generated during the subscription process.

            **Note:** This container is only available if you set the Zuora REST API minor version to 207.0 or later in the request header, and you have  [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
          type: string
        invoice:
          description: |
            Container for invoices.


             **Note:** This field is only available if you set the Zuora REST API minor version to 207.0 or later in the request header. Also, the response structure is changed and the following invoice related response fields are moved to this **invoice** container:
              
               * amount
               * amountWithoutTax
               * taxAmount
               * invoiceItems
               * targetDate
               * chargeMetrics
          type: object
        invoiceId:
          description: |
            Invoice ID, if an invoice is generated during the update.
          type: string
        invoiceItems:
          description: |
            Container for invoice items.
          items:
            $ref: "#/components/schemas/PUTSubscriptionPreviewInvoiceItemsType"
          type: array
        invoiceTargetDate:
          description: |
            Date through which charges are calculated on the invoice, as yyyy-mm-dd. Preview mode only.

            **Note:** This field is only available if you do not specify the Zuora REST API minor version or specify the minor version to 186.0, 187.0, 188.0, 189.0, and 196.0. See [Zuora REST API Versions](https://www.zuora.com/developer/api-reference/#section/API-Versions) for more information.
          format: date
          type: string
        paidAmount:
          description: |
            Payment amount, if a payment is collected
          type: number
        paymentId:
          description: |
            Payment ID, if a payment is collected.
          type: string
        subscriptionId:
          description: |
            The ID of the resulting new subscription.
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
        targetDate:
          description: |
            Date through which to calculate charges if an invoice is generated, as yyyy-mm-dd. Default is current date.

            **Note:** This field is only available if you set the Zuora REST API minor version to 207.0 or later in the request header. See [Zuora REST API Versions](https://www.zuora.com/developer/api-reference/#section/API-Versions) for more information.
          format: date
          type: string
        taxAmount:
          description: |
            Tax amount on the invoice.
          type: number
        totalDeltaMrr:
          description: |
            Change in the subscription monthly recurring revenue as a result of the update.
          type: number
        totalDeltaTcv:
          description: |
            Change in the total contracted value of the subscription as a result of the update.
          type: number
      type: object
    PUTSubscriptionResumeResponseType:
      properties:
        creditMemoId:
          description: |
            The credit memo ID, if a credit memo is generated during the subscription process.

            **Note:** This container is only available if you set the Zuora REST API minor version to 207.0 or later in the request header, and you have  [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
          type: string
        invoiceId:
          description: |
            Invoice ID, if an invoice is generated during the subscription process.
          type: string
        paidAmount:
          description: |
            Payment amount, if a payment is collected.
          type: number
        paymentId:
          description: |
            Payment ID, if a payment is collected.
          type: string
        resumeDate:
          description: |
            The date when subscription resumption takes effect, as yyyy-mm-dd.
          format: date
          type: string
        subscriptionId:
          description: |
            The subscription ID.
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
        termEndDate:
          description: |
            The date when the new subscription term ends, as yyyy-mm-dd.
          format: date
          type: string
        totalDeltaTcv:
          description: |
            Change in the total contracted value of the subscription as a result of the update.
          type: number
      type: object
    PUTSubscriptionResumeType:
      example:
        collect: false
        contractEffectiveDate: 2019-02-01
        extendsTerm: true
        resumePolicy: SpecificDate
        resumeSpecificDate: 2019-10-01
        runBilling: true
      properties:
        applicationOrder:
          description: |
            The priority order to apply credit memos and/or unapplied payments to an invoice. Possible item values are: `CreditMemo`, `UnappliedPayment`.

            **Note:**
              - This field is valid only if the `applyCredit` field is set to `true`.
              - If no value is specified for this field, the default priority order is used, ["CreditMemo", "UnappliedPayment"], to apply credit memos first and then apply unapplied payments.
              - If only one item is specified, only the items of the spedified type are applied to invoices. For example, if the value is `["CreditMemo"]`, only credit memos are used to apply to invoices.
          items:
            type: string
          type: array
        applyCredit:
          description: |
            Whether to automatically apply credit memos or unapplied payments, or both to an invoice.

            If the value is `true`, the credit memo or unapplied payment, or both will be automatically applied to the invoice. If no value is specified or the value is `false`, no action is taken.

            **Note:** This field is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
          type: boolean
        applyCreditBalance:
          description: |
            Whether to automatically apply a credit balance to an invoice.

            If the value is `true`, the credit balance is applied to the invoice. If the value is `false`, no action is taken.


            To view the credit balance adjustment, retrieve the details of the invoice using the Get Invoices method.

            Prerequisite: `invoice` must be `true`. 

            **Note:** 
              - If you are using the field `invoiceCollect` rather than the field `invoice`, the `invoiceCollect` value must be `true`.
              - This field is deprecated if you have the Invoice Settlement feature enabled.
          type: boolean
        collect:
          default: false
          description: |
            Collects an automatic payment for a subscription. The collection generated in this operation is only for this subscription, not for the entire customer account.

            If the value is `true`, the automatic payment is collected. If the value is `false`, no action is taken.

            Prerequisite: The `invoice` or `runBilling` field must be `true`. 

            **Note**: This field is only available if you set the `zuora-version` request header to `196.0` or later.
          type: boolean
        contractEffectiveDate:
          description: |
            The date when the customer notifies you that they want to resume their subscription.
          format: date
          type: string
        documentDate:
          description: |
            The date of the billing document, in `yyyy-mm-dd` format. It represents the invoice date for invoices, credit memo date for credit memos, and debit memo date for debit memos.

            - If this field is specified, the specified date is used as the billing document date. 
            - If this field is not specified, the date specified in the `targetDate` is used as the billing document date.
          format: date
          type: string
        extendsTerm:
          description: |
            Whether to extend the subscription term by the length of time the suspension is in effect.

            Values: `true`, `false`.
          type: boolean
        invoice:
          description: |
            **Note:** This field has been replaced by the `runBilling` field. The
            `invoice` field is only available for backward compatibility.


            Creates an invoice for a subscription. The invoice generated in this
            operation is only for this subscription, not for the entire customer
            account.


            If the value is `true`, an invoice is created. If the value is
            `false`, no action is taken. The default value is `false`.


            This field is in Zuora REST API version control. Supported minor
            versions are `196.0` and `207.0`. To use this field in the method, you
            must set the `zuora-version` parameter to the minor version number in
            the request header. 
          type: boolean
        invoiceCollect:
          default: false
          description: |
            **Note:** This field has been replaced by the `invoice` field
            and the `collect` field. `invoiceCollect` is available only for backward
            compatibility.


            If `true`, an invoice is generated and payment collected automatically during
            the subscription process. If `false`, no invoicing or payment
            takes place.  The invoice generated in this operation is only for this subscription,
            not for the entire customer account.


            **Note**: This field is only available if you set the `zuora-version` request header to `186.0`, `187.0`, `188.0`, or `189.0`.
          type: boolean
        invoiceTargetDate:
          description: |
            **Note:** This field has been replaced by the `targetDate` field. The
            `invoiceTargetDate` field is only available for backward
            compatibility.


            Date through which to calculate charges if an invoice is generated, as
            yyyy-mm-dd. Default is current date.


            This field is in Zuora REST API version control. Supported minor
            versions are `207.0` and earlier.  
          format: date
          type: string
        resumePeriods:
          description: |
            The length of the period used to specify when the subscription is resumed. The subscription resumption takes effect after a specified period based on the suspend date or today's date. You must use this field together with the `resumePeriodsType` field to specify the period.

            **Note:** This field is only applicable when the `suspendPolicy` field is set to `FixedPeriodsFromToday` or `FixedPeriodsFromSuspendDate`.
          type: string
        resumePeriodsType:
          description: |
            The period type used to define when the subscription resumption takes effect. The subscription resumption takes effect after a specified period based on the suspend date or today's date. You must use this field together with the `resumePeriods` field to specify the period.

            Values: `Day`, `Week`, `Month`, `Year`

            **Note:** This field is only applicable when the `suspendPolicy` field is set to `FixedPeriodsFromToday` or `FixedPeriodsFromSuspendDate`.
          type: string
        resumePolicy:
          description: |
            Resume methods. Specify a way to resume a subscription.

            Values:

            * `Today`: The subscription resumption takes effect on today's date.

            * `FixedPeriodsFromSuspendDate`: The subscription resumption takes effect after a specified period based on the suspend date. You must specify the `resumePeriods` and `resumePeriodsType` fields to define the period.

            * `SpecificDate`: The subscription resumption takes effect on a specific date. You must define the specific date in the `resumeSpecificDate` field.

            * `FixedPeriodsFromToday`: The subscription resumption takes effect after a specified period based on the today's date. You must specify the `resumePeriods` and `resumePeriodsType` fields to define the period.
          type: string
        resumeSpecificDate:
          description: |
            A specific date when the subscription resumption takes effect, in the format yyyy-mm-dd.

            **Note:** This field is only applicable only when the `resumePolicy` field is set to `SpecificDate`.

            The value should not be earlier than the subscription suspension date.
          format: date
          type: string
        runBilling:
          default: false
          description: |
            Creates an invoice for a subscription. If you have the Invoice Settlement feature enabled, a credit memo might also be created based on the [invoice and credit memo generation rule](https://knowledgecenter.zuora.com/CB_Billing/Invoice_Settlement/Credit_and_Debit_Memos/Rules_for_Generating_Invoices_and_Credit_Memos).  


            The billing documents generated
            in this operation is only for this subscription, not for the entire
            customer account.


            Possible values:

            - `true`: An invoice is created. If you have the Invoice Settlement feature enabled, a credit memo might also be created.


            - `false`: No invoice is created.


            **Note:** This field is in Zuora REST API version control. Supported
            minor versions are `211.0` or later. To use this field in the method,
            you must set the `zuora-version` parameter to the minor version number
            in the request header.
          enum:
            - true
            - false
          type: boolean
        targetDate:
          description: |
            Date through which to calculate charges if an invoice or a credit memo is generated, as
            yyyy-mm-dd. Default is current date.


            **Note:** The credit memo is only available if you have the Invoice Settlement feature enabled.


            This field is in Zuora REST API version control. Supported minor
            versions are `211.0` and later. To use this field in the method, you
            must set the  `zuora-version` parameter to the minor version number in
            the request header.
          format: date
          type: string
      required:
        - resumePolicy
      type: object
    PUTSubscriptionSuspendResponseType:
      properties:
        creditMemoId:
          description: |
            The credit memo ID, if a credit memo is generated during the subscription process.

            **Note:** This container is only available if you set the Zuora REST API minor version to 207.0 or later in the request header, and you have  [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
          type: string
        invoiceId:
          description: |
            Invoice ID, if an invoice is generated during the subscription process.
          type: string
        paidAmount:
          description: |
            Payment amount, if a payment is collected.
          type: number
        paymentId:
          description: |
            Payment ID, if a payment is collected.
          type: string
        resumeDate:
          description: |
            The date when subscription resumption takes effect, in the format yyyy-mm-dd.
          format: date
          type: string
        subscriptionId:
          description: |
            The subscription ID.
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
        suspendDate:
          description: |
            The date when subscription suspension takes effect, in the format yyyy-mm-dd.
          format: date
          type: string
        termEndDate:
          description: |
            The date when the new subscription term ends, in the format yyyy-mm-dd.
          format: date
          type: string
        totalDeltaTcv:
          description: |
            Change in the total contracted value of the subscription as a result of the update.
          type: number
      type: object
    PUTSubscriptionSuspendType:
      example:
        collect: false
        contractEffectiveDate: 2019-02-01
        extendsTerm: true
        resume: true
        resumePolicy: SpecificDate
        resumeSpecificDate: 2019-06-01
        runBilling: true
        suspendPeriods: 10
        suspendPeriodsType: Day
        suspendPolicy: FixedPeriodsFromToday
      properties:
        applicationOrder:
          description: |
            The priority order to apply credit memos and/or unapplied payments to an invoice. Possible item values are: `CreditMemo`, `UnappliedPayment`.

            **Note:**
              - This field is valid only if the `applyCredit` field is set to `true`.
              - If no value is specified for this field, the default priority order is used, ["CreditMemo", "UnappliedPayment"], to apply credit memos first and then apply unapplied payments.
              - If only one item is specified, only the items of the spedified type are applied to invoices. For example, if the value is `["CreditMemo"]`, only credit memos are used to apply to invoices.
          items:
            type: string
          type: array
        applyCredit:
          description: |
            Whether to automatically apply credit memos or unapplied payments, or both to an invoice.

            If the value is `true`, the credit memo or unapplied payment, or both will be automatically applied to the invoice. If no value is specified or the value is `false`, no action is taken.

            **Note:** This field is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
          type: boolean
        applyCreditBalance:
          description: |
            Whether to automatically apply a credit balance to an invoice.

            If the value is `true`, the credit balance is applied to the invoice. If the value is `false`, no action is taken.


            To view the credit balance adjustment, retrieve the details of the invoice using the Get Invoices method.

            Prerequisite: `invoice` must be `true`. 

            **Note:** 
              - If you are using the field `invoiceCollect` rather than the field `invoice`, the `invoiceCollect` value must be `true`.
              - This field is deprecated if you have the Invoice Settlement feature enabled.
          type: boolean
        collect:
          default: false
          description: |
            Collects an automatic payment for a subscription. The collection generated in this operation is only for this subscription, not for the entire customer account.

            If the value is `true`, the automatic payment is collected. If the value is `false`, no action is taken.

            Prerequisite: The `invoice` or `runBilling` field must be `true`. 

            **Note**: This field is only available if you set the `zuora-version` request header to `196.0` or later.
          type: boolean
        contractEffectiveDate:
          description: |
            The date when the customer notifies you that they want to amend their subscription.
          format: date
          type: string
        documentDate:
          description: |
            The date of the billing document, in `yyyy-mm-dd` format. It represents the invoice date for invoices, credit memo date for credit memos, and debit memo date for debit memos.

            - If this field is specified, the specified date is used as the billing document date. 
            - If this field is not specified, the date specified in the `targetDate` is used as the billing document date.
          format: date
          type: string
        extendsTerm:
          description: |
            Whether to extend the subscription term by the length of time the suspension is in effect. Values: `true`, `false`.
          type: boolean
        invoice:
          description: |
            **Note:** This field has been replaced by the `runBilling` field. The
            `invoice` field is only available for backward compatibility.


            Creates an invoice for a subscription. The invoice generated in this
            operation is only for this subscription, not for the entire customer
            account.


            If the value is `true`, an invoice is created. If the value is
            `false`, no action is taken. The default value is `false`. 


            This field is in Zuora REST API version control. Supported minor
            versions are `196.0` and `207.0`. To use this field in the method, you
            must set the zuora-version parameter to the minor version number in
            the request header. 
          type: boolean
        invoiceCollect:
          description: |
            **Note:** This field has been replaced by the `invoice` field
            and the `collect` field. `invoiceCollect` is available only for backward
            compatibility.


            **Note**: This field is only available if you set the `zuora-version` request header to `186.0`, `187.0`, `188.0`, or `189.0`.
          type: boolean
        invoiceTargetDate:
          description: |
            **Note:** This field has been replaced by the `targetDate` field. The
            `invoiceTargetDate` field is only available for backward
            compatibility.


            Date through which to calculate charges if an invoice is generated, as
            yyyy-mm-dd. Default is current date.


            This field is in Zuora REST API version control. Supported minor
            versions are `207.0` and earlier.  
          format: date
          type: string
        resume:
          description: |
            Whether to set when to resume a subscription when creating a suspend amendment. Values: `true`, `false`.
          type: boolean
        resumePeriods:
          description: |
            The length of the period used to specify when the subscription is resumed. The subscription resumption takes effect after a specified period based on the suspend date or today's date. You must use this field together with the `resumePeriodsType` field to specify the period.

            **Note:** This field is only applicable when the `suspendPolicy` field is set to `FixedPeriodsFromToday` or `FixedPeriodsFromSuspendDate`.
          type: string
        resumePeriodsType:
          description: |
            The period type used to define when the subscription resumption takes effect. The subscription resumption takes effect after a specified period based on the suspend date or today's date. You must use this field together with the resumePeriods field to specify the period.

            Values: `Day`, `Week`, `Month`, `Year`

            **Note:** This field is only applicable when the `suspendPolicy` field is set to `FixedPeriodsFromToday` or `FixedPeriodsFromSuspendDate`.
          type: string
        resumePolicy:
          description: |
            Resume methods. Specify a way to resume a subscription. Values:

            * `Today`: The subscription resumption takes effect on today's date.

            * `FixedPeriodsFromSuspendDate`: The subscription resumption takes effect after a specified period based on the suspend date. You must specify the `resumePeriods` and `resumePeriodsType` fields to define the period.

            * `SpecificDate`: The subscription resumption takes effect on a specific date. You must define the specific date in the `resumeSpecificDate` field.

            * `FixedPeriodsFromToday`: The subscription resumption takes effect after a specified period based on the today's date. You must specify the `resumePeriods` and `resumePeriodsType` fields to define the period.
          type: string
        resumeSpecificDate:
          description: |
            A specific date when the subscription resumption takes effect, in the format yyyy-mm-dd.

            **Note:** This field is only applicable only when the `resumePolicy` field is set to `SpecificDate`.

            The value should not be earlier than the subscription suspension date.
          format: date
          type: string
        runBilling:
          default: false
          description: |
            Creates an invoice for a subscription. If you have the Invoice Settlement feature enabled, a credit memo might also be created based on the [invoice and credit memo generation rule](https://knowledgecenter.zuora.com/CB_Billing/Invoice_Settlement/Credit_and_Debit_Memos/Rules_for_Generating_Invoices_and_Credit_Memos).  


            The billing documents generated
            in this operation is only for this subscription, not for the entire
            customer account.


            Possible values:

            - `true`: An invoice is created. If you have the Invoice Settlement feature enabled, a credit memo might also be created.


            - `false`: No invoice is created.


            **Note:** This field is in Zuora REST API version control. Supported
            minor versions are `211.0` or later. To use this field in the method,
            you must set the `zuora-version` parameter to the minor version number
            in the request header.
          enum:
            - true
            - false
          type: boolean
        suspendPeriods:
          description: |
            The length of the period used to specify when the subscription suspension takes effect. The subscription suspension takes effect after a specified period based on today's date. You must use this field together with the `suspendPeriodsType` field to specify the period.

            **Note:** This field is only applicable only when the suspendPolicy field is set to FixedPeriodsFromToday.
          type: string
        suspendPeriodsType:
          description: |
            The period type used to define when the subscription suspension takes effect. The subscription suspension takes effect after a specified period based on today's date. You must use this field together with the suspendPeriods field to specify the period.

            Type: string (enum)

            Values: `Day`, `Week`, `Month`, `Year`

            **Note:** This field is only applicable only when the suspendPolicy field is set to FixedPeriodsFromToday.
          type: string
        suspendPolicy:
          description: |
            Suspend methods. Specify a way to suspend a subscription. 

            Value:

            * `Today`: The subscription suspension takes effect on today's date.
            * `EndOfLastInvoicePeriod`: The subscription suspension takes effect at the end of the last invoice period. The suspend date defaults to a date that is one day after the last invoiced period. You can choose this option to avoid any negative invoices (credits) issued back to the customer after the subscription suspension. 
            * `SpecificDate`: The subscription suspension takes effect on a specific date. You must define the specific date in the `suspendSpecificDate` field.
            * `FixedPeriodsFromToday`: The subscription suspension takes effect after a specified period based on today's date. You must specify the `suspendPeriods` and `suspendPeriodsType` fields to define the period.
          type: string
        suspendSpecificDate:
          description: |
            A specific date when the subscription suspension takes effect, in the format yyyy-mm-dd.

            **Note:** This field is only applicable only when the suspendPolicy field is set to SpecificDate.

            The value should not be earlier than the subscription contract effective date, later than the subscription term end date, or within a period for which the customer has been invoiced.
          format: date
          type: string
        targetDate:
          description: |
            Date through which to calculate charges if an invoice or a credit memo is generated, as
            yyyy-mm-dd. Default is current date.


            **Note:** The credit memo is only available if you have the Invoice Settlement feature enabled.


            This field is in Zuora REST API version control. Supported minor
            versions are `211.0` and later. To use this field in the method, you
            must set the  `zuora-version` parameter to the minor version number in
            the request header.
          format: date
          type: string
      required:
        - suspendPolicy
      type: object
    PUTSubscriptionType:
      allOf:
        - properties:
            add:
              description: |
                Container for adding one or more rate plans.
              items:
                $ref: "#/components/schemas/PUTSrpAddType"
              type: array
            applicationOrder:
              description: |
                The priority order to apply credit memos and/or unapplied payments to an invoice. Possible item values are: `CreditMemo`, `UnappliedPayment`.

                **Note:**
                  - This field is valid only if the `applyCredit` field is set to `true`.
                  - If no value is specified for this field, the default priority order is used, ["CreditMemo", "UnappliedPayment"], to apply credit memos first and then apply unapplied payments.
                  - If only one item is specified, only the items of the spedified type are applied to invoices. For example, if the value is `["CreditMemo"]`, only credit memos are used to apply to invoices.
              items:
                type: string
              type: array
            applyCredit:
              description: |
                Whether to automatically apply credit memos or unapplied payments, or both to an invoice.

                If the value is `true`, the credit memo or unapplied payment, or both will be automatically applied to the invoice. If no value is specified or the value is `false`, no action is taken.

                **Note:** This field is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
              type: boolean
            applyCreditBalance:
              description: |
                Whether to automatically apply a credit balance to an invoice.

                If the value is `true`, the credit balance is applied to the invoice. If the value is `false`, no action is taken.


                To view the credit balance adjustment, retrieve the details of the invoice using the Get Invoices method.

                Prerequisite: `invoice` must be `true`. 

                **Note:** 
                  - If you are using the field `invoiceCollect` rather than the field `invoice`, the `invoiceCollect` value must be `true`.
                  - This field is deprecated if you have the Invoice Settlement feature enabled.
              type: boolean
            autoRenew:
              description: |
                If `true`, this subscription automatically renews at the end of the subscription term. Default is `false`.
              type: boolean
            collect:
              default: false
              description: |
                Collects an automatic payment for a subscription. The collection generated in this operation is only for this subscription, not for the entire customer account.

                If the value is `true`, the automatic payment is collected. If the value is `false`, no action is taken.

                Prerequisite: The `invoice` or `runBilling` field must be `true`. 

                **Note**: This field is only available if you set the `zuora-version` request header to `196.0` or later.
              type: boolean
            currentTerm:
              description: |
                The length of the period for the current subscription term. If `termType` is `TERMED`, this field is required and must be greater than `0`. If `termType` is `EVERGREEN`, this value is ignored.
              format: int64
              type: integer
            currentTermPeriodType:
              description: |
                The period type for the current subscription term.

                This field is used with the `CurrentTerm` field to specify the current subscription term.

                Values are:

                * `Month` (default)
                * `Year`
                * `Day`
                * `Week`
              type: string
            documentDate:
              description: |
                The date of the billing document, in `yyyy-mm-dd` format. It represents the invoice date for invoices, credit memo date for credit memos, and debit memo date for debit memos.

                - If this field is specified, the specified date is used as the billing document date. 
                - If this field is not specified, the date specified in the `targetDate` is used as the billing document date.
              format: date
              type: string
            includeExistingDraftDocItems:
              description: |
                Specifies whether to include draft invoice items in subscription previews.
                Values are:

                * `true` (default). Includes draft invoice items in the preview result.
                * `false`. Excludes draft invoice items in the preview result.

                **Note:** This field is in Zuora REST API version control. Supported minor versions are 207.0 or later. To use this field in the method, you must set the **zuora-version** parameter to the minor version number in the request header. See [Zuora REST API Versions](https://www.zuora.com/developer/api-reference/#section/API-Versions) for more information.
              type: boolean
            includeExistingDraftInvoiceItems:
              description: |
                Specifies whether to include draft invoice items in subscription previews.
                Values are:

                * `true` (default). Includes draft invoice items in the preview result.
                * `false`. Excludes draft invoice items in the preview result.

                **Note:** This field is in Zuora REST API version control. Supported minor versions are 186.0, 187.0, 188.0, 189.0, and 196.0. See [Zuora REST API Versions](https://www.zuora.com/developer/api-reference/#section/API-Versions) for more information.
              type: boolean
            invoice:
              description: |
                **Note:** This field has been replaced by the `runBilling` field. The
                `invoice` field is only available for backward compatibility.


                Creates an invoice for a subscription. The invoice generated in this
                operation is only for this subscription, not for the entire customer
                account.


                If the value is `true`, an invoice is created. If the value is
                `false`, no action is taken. The default value is `false`. 


                This field is in Zuora REST API version control. Supported minor
                versions are `196.0` and `207.0`. To use this field in the method, you
                must set the zuora-version parameter to the minor version number in
                the request header. 
              type: boolean
            invoiceCollect:
              default: false
              description: |
                **Note:** This field has been replaced by the `invoice` field
                and the `collect` field. `invoiceCollect` is available only for backward
                compatibility.


                If `true`, an invoice is generated and payment collected automatically during
                the subscription process. If `false`, no invoicing or payment
                takes place.  The invoice generated in this operation is only for this subscription,
                not for the entire customer account.

                **Note**: This field is only available if you set the `zuora-version` request header to `186.0`, `187.0`, `188.0`, or `189.0`.
              type: boolean
            invoiceSeparately:
              description: |
                Separates a single subscription from other subscriptions and invoices the charge independently. 

                If the value is `true`, the subscription is billed separately from other subscriptions. If the value is `false`, the subscription is included with other subscriptions in the account invoice.

                The default value is `false`.
                Prerequisite: The default subscription setting Enable Subscriptions to be Invoiced Separately must be set to Yes.
              type: boolean
            invoiceTargetDate:
              description: |
                **Note:** This field has been replaced by the `targetDate` field. The
                `invoiceTargetDate` field is only available for backward
                compatibility.


                Date through which to calculate charges if an invoice is generated, as
                yyyy-mm-dd. Default is current date.


                This field is in Zuora REST API version control. Supported minor
                versions are `207.0` and earlier.  
              format: date
              type: string
            notes:
              description: |
                String of up to 500 characters.
              type: string
            preview:
              description: |
                If `true` the update is made in preview mode. The default setting is `false`.
              type: boolean
            previewType:
              description: |
                The type of preview you will receive. 

                This field is in Zuora REST API version control. The supported values of this field depend on the REST API minor version you specified in the request header.


                * If you do not specify the REST API minor version or specify the minor version number to one of following values in the request header:

                  * 186.0
                  * 187.0
                  * 188.0
                  * 189.0
                  * 196.0 

                  The following values are supported in the **previewType** field:

                  * InvoiceItem
                  * ChargeMetrics
                  * InvoiceItemChargeMetrics

                  The default value is InvoiceItem.

                * If you specify the REST API minor version to 207.0 or later in the request header, the following values are supported in the **previewType** field:

                  - LegalDoc
                  - ChargeMetrics
                  - LegalDocChargeMetrics

                  The default value is LegalDoc.

                See [Zuora REST API Versions](https://www.zuora.com/developer/api-reference/#section/API-Versions) for more information.
              type: string
            remove:
              description: |
                Container for removing one or more rate plans.
              items:
                $ref: "#/components/schemas/PUTSrpRemoveType"
              type: array
            renewalSetting:
              description: |
                Specifies whether a termed subscription will remain `TERMED` or change to `EVERGREEN` when it is renewed. 

                Values are:

                * `RENEW_WITH_SPECIFIC_TERM` (default)
                * `RENEW_TO_EVERGREEN`
              type: string
            renewalTerm:
              description: |
                The length of the period for the subscription renewal term. Default is `0`.
              format: int64
              type: integer
            renewalTermPeriodType:
              description: |
                
                The period type for the subscription renewal term.

                This field is used with the `renewalTerm` field to specify the subscription renewal term.

                Values are:

                * `Month` (default)
                * `Year`
                * `Day`
                * `Week`
              type: string
            runBilling:
              default: false
              description: |
                Creates an invoice for a subscription. If you have the Invoice Settlement feature enabled, a credit memo might also be created based on the [invoice and credit memo generation rule](https://knowledgecenter.zuora.com/CB_Billing/Invoice_Settlement/Credit_and_Debit_Memos/Rules_for_Generating_Invoices_and_Credit_Memos).  


                The billing documents generated
                in this operation is only for this subscription, not for the entire
                customer account.


                Possible values:

                - `true`: An invoice is created. If you have the Invoice Settlement feature enabled, a credit memo might also be created.


                - `false`: No invoice is created.


                **Note:** This field is in Zuora REST API version control. Supported
                minor versions are `211.0` or later. To use this field in the method,
                you must set the `zuora-version` parameter to the minor version number
                in the request header.
              enum:
                - true
                - false
              type: boolean
            targetDate:
              description: |
                Date through which to calculate charges if an invoice or a credit memo is generated, as
                yyyy-mm-dd. Default is current date.


                **Note:** The credit memo is only available if you have the Invoice Settlement feature enabled.


                This field is in Zuora REST API version control. Supported minor
                versions are `211.0` and later. To use this field in the method, you
                must set the  `zuora-version` parameter to the minor version number in
                the request header.
              format: date
              type: string
            termStartDate:
              description: |
                Date the subscription term begins, as yyyy-mm-dd. If this is a renewal subscription, this date is different from the subscription start date. 
              format: date
              type: string
            termType:
              description: |
                Possible values are: `TERMED`, `EVERGREEN`.
              type: string
            update:
              description: |
                Container for updating one or more rate plans.
              items:
                $ref: "#/components/schemas/PUTSrpUpdateType"
              type: array
          type: object
        - $ref: "#/components/schemas/SubscriptionObjectQTFields"
        - $ref: "#/components/schemas/SubscriptionObjectNSFields"
        - $ref: "#/components/schemas/SubscriptionObjectCustomFields"
      example:
        autoRenew: false
        collect: false
        currentTerm: "10"
        currentTermPeriodType: Month
        notes: Test UPDATE subscription from z-ruby-sdk
        renewalSetting: RENEW_WITH_SPECIFIC_TERM
        renewalTerm: "4"
        renewalTermPeriodType: Month
        runBilling: true
        termType: TERMED
        update:
          - chargeUpdateDetails:
              - quantity: 12
                ratePlanChargeId: 2c92c8f83dcbd8b1013dcce0eb510075
            contractEffectiveDate: 2013-04-28
            ratePlanId: 2c92c8f83dcbd8b1013dcce0ea7e006f
    PUTTaxationItemType:
      allOf:
        - properties:
            exemptAmount:
              description: |
                The calculated tax amount excluded due to the exemption.
              format: double
              type: number
            financeInformation:
              description: |
                Container for the finance information related to the taxation item.
              properties:
                onAccountAccountingCode:
                  description: |
                    The accounting code that maps to an on account in your accounting system.
                  maxLength: 100
                  minLength: 0
                  type: string
                salesTaxPayableAccountingCode:
                  description: |
                    The accounting code for the sales taxes payable.
                  maxLength: 100
                  minLength: 0
                  type: string
              type: object
            jurisdiction:
              description: |
                The jurisdiction that applies the tax or VAT. This value is typically a state, province, county, or city.
              type: string
            locationCode:
              description: |
                The identifier for the location based on the value of the `taxCode` field. 
              type: string
            name:
              description: |
                The name of the taxation item to be updated.
              type: string
            taxAmount:
              description: |
                The amount of the tax applied to the credit or debit memo.
              format: double
              type: number
            taxCode:
              description: |
                The tax code identifies which tax rules and tax rates to apply to a specific credit or debit memo.
              type: string
            taxCodeDescription:
              description: |
                The description of the tax code.
              type: string
            taxDate:
              description: |
                The date when the tax is applied to the credit or debit memo.
              format: date
              type: string
            taxRate:
              description: |
                The tax rate applied to the credit or debit memo.
              format: double
              type: number
            taxRateDescription:
              description: |
                The description of the tax rate. 
              type: string
            taxRateType:
              description: |
                The type of the tax rate applied to the credit or debit memo.
              enum:
                - Percentage
                - FlatFee
              type: string
          type: object
        - $ref: "#/components/schemas/TaxationItemObjectCustomFields"
      example:
        exemptAmount: 0
        financeInformation:
          onAccountAccountingCode: Check
          salesTaxPayableAccountingCode: ""
        jurisdiction: CALIFORNIA
        locationCode: "06"
        name: STATE TAX
        taxAmount: 1
        taxCode: ServiceTaxCode
        taxCodeDescription: This is tax code description!
        taxDate: 2016-06-05
        taxRate: 0.0625
        taxRateDescription: This is tax rate description!
        taxRateType: Percentage
    PUTVerifyPaymentMethodResponseType:
      properties:
        paymentMethodId:
          description: |
            The ID of the verified payment method.
          type: string
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    PUTVerifyPaymentMethodType:
      example:
        gatewayOptions:
          Comments: test
          IPAddress: 192.168.1.1
        paymentGatewayName: Adyen
        securityCode: "737"
      properties:
        currencyCode:
          description: |
            The currency used for payment method authorization. 
          type: string
        gatewayOptions:
          description: |
            The field used to pass gateway-specific parameters and parameter values.
          properties:
            key:
              description: |
                The name of a gateway-specific parameter.
              type: string
            value:
              description: |
                The value of the gateway-specific parameter.
              type: string
          type: object
        paymentGatewayName:
          description: |
            The name of the payment gateway instance. If no value is specified for this field, the default payment gateway of the customer account will be used.
          type: string
        securityCode:
          description: |
            The CVV or CVV2 security code for the credit card or debit card. To ensure PCI compliance, the value of this field is not stored and cannot be queried.
          type: string
      type: object
    PUTWriteOffInvoiceRequest:
      allOf:
        - properties:
            comment:
              description: |
                Comments about the write-off. The comment is used as the comment of the credit memo generated by writing off the specified invoice.
              maxLength: 255
              minLength: 0
              type: string
            items:
              description: |
                Container for items.
              items:
                $ref: "#/components/schemas/CreditMemoItemFromWriteOffInvoice"
              type: array
            memoDate:
              description: |
                The date when the credit memo was created, in `yyyy-mm-dd` format. The memo date must be later than or equal to the invoice date.

                The default value is the date when you write off the invoice.
              format: date
              type: string
            reasonCode:
              description: |
                A code identifying the reason for the transaction. The value must be an existing reason code or empty. If you do not specify a value, Zuora uses the default reason code `Write-off`.
              type: string
          type: object
        - $ref: "#/components/schemas/CreditMemoObjectCustomFields"
        - $ref: "#/components/schemas/CreditMemoObjectNSFields"
      example:
        memoDate: 2019-01-02
      type: object
    PUTWriteOffInvoiceResponse:
      properties:
        creditMemo:
          description: |
            Container for the credit memo that is automatically generated when writing off invoices.
          properties:
            id:
              description: |
                The ID of the credit memo that is created when the invoice is written off.
              type: string
          type: object
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    PUT_BasicSummaryJournalEntryType:
      allOf:
        - properties:
            journalEntryItems:
              description: |
                Key name that represents the list of journal entry items.
              items:
                $ref: "#/components/schemas/PUTJournalEntryItemType"
              type: array
            notes:
              description: |
                Additional information about this record.

                ***Character limit:*** 2,000
              type: string
            transferredToAccounting:
              description: |
                Status shows whether the journal entry has been transferred to an accounting system. 

                This field cannot be changed after the summary journal entry has been canceled.

                **Note:** The Zuora Finance ***Override Transferred to Accounting*** permission is required to change `transferredToAccounting` from `Yes` to any other value.
              enum:
                - No
                - Processing
                - Yes
                - Error
                - Ignore
              type: string
          type: object
        - $ref: "#/components/schemas/JournalEntryObjectCustomFields"
      example:
        journalEntryItems:
          - accountingCodeName: Accounts Receivable
            type: Credit
          - accountingCodeName: ""
            type: Debit
        notes: Transfer to accounting system
        transferredToAccounting: Yes
    PaymentCollectionResponseType:
      properties:
        nextPage:
          description: |
            URL to retrieve the next page of the response if it exists; otherwise absent.
          format: URL
          type: string
        payments:
          description: |
            Container for payments.
          items:
            $ref: "#/components/schemas/GETARPaymentTypewithSuccess"
          type: array
        success:
          description: Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    PaymentDebitMemoApplicationApplyRequestType:
      properties:
        amount:
          description: |
            The amount that is applied from the payment to the debit memo.
          format: double
          type: number
        debitMemoId:
          description: |
            The unique ID of the debit memo that the payment is applied to.
          type: string
        items:
          description: |
            Container for debit memo items. The maximum number of items is 1,000.

            **Note:** This field is only available if you have the [Invoice Item Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/C_Invoice_Item_Settlement) feature enabled. Invoice Item Settlement must be used together with other Invoice Settlement features (Unapplied Payments, and Credit and Debit memos).  If you wish to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
          items:
            $ref: "#/components/schemas/PaymentDebitMemoApplicationItemApplyRequestType"
          type: array
      required:
        - amount
      title: debitMemos
      type: object
    PaymentDebitMemoApplicationCreateRequestType:
      properties:
        amount:
          description: |
            The amount of the payment associated with the debit memo.
          format: double
          type: number
        debitMemoId:
          description: |
            The unique ID of the debit memo that the payment is created on.
          type: string
        items:
          description: |
            Container for debit memo items. The maximum number of items is 1,000.

            **Note:** This field is only available if you have the [Invoice Item Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/C_Invoice_Item_Settlement) feature enabled. Invoice Item Settlement must be used together with other Invoice Settlement features (Unapplied Payments, and Credit and Debit memos).  If you wish to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
          items:
            $ref: "#/components/schemas/PaymentDebitMemoApplicationItemCreateRequestType"
          type: array
      required:
        - amount
      title: debitMemos
      type: object
    PaymentDebitMemoApplicationItemApplyRequestType:
      properties:
        amount:
          description: |
            The amount of the payment that is applied to the specific debit memo or taxation item.
          format: double
          type: number
        debitMemoItemId:
          description: |
            The ID of the specific debit memo item.
          type: string
        taxItemId:
          description: |
            The ID of the specific taxation item.
          type: string
      required:
        - amount
      title: items
      type: object
    PaymentDebitMemoApplicationItemCreateRequestType:
      properties:
        amount:
          description: |
            The amount of the payment associated with the specific debit memo or taxation item.
          format: double
          type: number
        debitMemoItemId:
          description: |
            The ID of the specific debit memo item.
          type: string
        taxItemId:
          description: |
            The ID of the specific taxation item.
          type: string
      required:
        - amount
      title: items
      type: object
    PaymentDebitMemoApplicationItemUnapplyRequestType:
      properties:
        amount:
          description: |
            The amount of the payment that is unapplied from the specific debit mem or taxation item.
          format: double
          type: number
        debitMemoItemId:
          description: |
            The ID of the specific debit memo item.
          type: string
        taxItemId:
          description: |
            The ID of the specific taxation item.
          type: string
      required:
        - amount
      title: items
      type: object
    PaymentDebitMemoApplicationUnapplyRequestType:
      properties:
        amount:
          description: |
            The amount of the payment that is unapplied from the debit memo.
          format: double
          type: number
        debitMemoId:
          description: |
            The unique ID of the debit memo that the payment is unapplied from.
          type: string
        items:
          description: |
            Container for debit memo items. The maximum number of items is 1,000.

            **Note:** This field is only available if you have the [Invoice Item Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/C_Invoice_Item_Settlement) feature enabled. Invoice Item Settlement must be used together with other Invoice Settlement features (Unapplied Payments, and Credit and Debit memos).  If you wish to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
          items:
            $ref: "#/components/schemas/PaymentDebitMemoApplicationItemUnapplyRequestType"
          type: array
      required:
        - amount
      title: debitMemos
      type: object
    PaymentEntityPrefix:
      description: |
        Container for the prefix and starting number of payments.
      properties:
        prefix:
          description: |
            The prefix of payments.
          example: P-
          type: string
        startNumber:
          description: |
            The starting number of payments.
          example: 10
          type: integer
      title: payment
      type: object
    PaymentInvoiceApplicationApplyRequestType:
      properties:
        amount:
          description: |
            The amount that is applied from the payment to the invoice.
          format: double
          type: number
        invoiceId:
          description: |
            The unique ID of the invoice that the payment is applied to.
          type: string
        items:
          description: |
            Container for invoice items. The maximum number of items is 1,000.

            **Note:** This field is only available if you have the [Invoice Item Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/C_Invoice_Item_Settlement) feature enabled. Invoice Item Settlement must be used together with other Invoice Settlement features (Unapplied Payments, and Credit and Debit memos).  If you wish to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
          items:
            $ref: "#/components/schemas/PaymentInvoiceApplicationItemApplyRequestType"
          type: array
      required:
        - amount
      title: invoices
      type: object
    PaymentInvoiceApplicationCreateRequestType:
      properties:
        amount:
          description: |
            The amount of the payment associated with the invoice.
          format: double
          type: number
        invoiceId:
          description: |
            The unique ID of the invoice that the payment is created on.
          type: string
        items:
          description: |
            Container for invoice items. The maximum number of items is 1,000.

            **Note:** This field is only available if you have the [Invoice Item Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/C_Invoice_Item_Settlement) feature enabled. Invoice Item Settlement must be used together with other Invoice Settlement features (Unapplied Payments, and Credit and Debit memos).  If you wish to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
          items:
            $ref: "#/components/schemas/PaymentInvoiceApplicationItemCreateRequestType"
          type: array
      required:
        - amount
      title: invoices
      type: object
    PaymentInvoiceApplicationItemApplyRequestType:
      properties:
        amount:
          description: |
            The amount of the payment that is applied to the specific invoice or taxation item.
          format: double
          type: number
        invoiceItemId:
          description: |
            The ID of the specific invoice item.
          type: string
        taxItemId:
          description: |
            The ID of the specific taxation item.
          type: string
      required:
        - amount
      title: items
      type: object
    PaymentInvoiceApplicationItemCreateRequestType:
      properties:
        amount:
          description: |
            The amount of the payment associated with the specific invoice or taxation item.
          format: double
          type: number
        invoiceItemId:
          description: |
            The ID of the specific invoice item.
          type: string
        taxItemId:
          description: |
            The ID of the specific taxation item.
          type: string
      required:
        - amount
      title: items
      type: object
    PaymentInvoiceApplicationItemUnapplyRequestType:
      properties:
        amount:
          description: |
            The amount of the payment that is unapplied from the specific invoice or taxation item.
          format: double
          type: number
        invoiceItemId:
          description: |
            The ID of the specific invoice item.
          type: string
        taxItemId:
          description: |
            The ID of the specific taxation item.
          type: string
      required:
        - amount
      title: items
      type: object
    PaymentInvoiceApplicationUnapplyRequestType:
      properties:
        amount:
          description: |
            The amount of the payment that is unapplied from the invoice.
          format: double
          type: number
        invoiceId:
          description: |
            The unique ID of the invoice that the payment is unapplied from.
          type: string
        items:
          description: |
            Container for invoice items. The maximum number of items is 1,000.

            **Note:** This field is only available if you have the [Invoice Item Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/C_Invoice_Item_Settlement) feature enabled. Invoice Item Settlement must be used together with other Invoice Settlement features (Unapplied Payments, and Credit and Debit memos).  If you wish to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
          items:
            $ref: "#/components/schemas/PaymentInvoiceApplicationItemUnapplyRequestType"
          type: array
      required:
        - amount
      title: invoices
      type: object
    PaymentMethod:
      allOf:
        - properties:
            type:
              description: |
                Type of payment method. The following types of the payment method are supported:

                * `PayPalEC` - PayPal Express Checkout payment method. Use this type if you are using a [PayPal Payflow Pro Gateway](https://knowledgecenter.zuora.com/CB_Billing/M_Payment_Gateways/Supported_Payment_Gateways/PayPal_Payflow_Pro%2C_Website_Payments_Payflow_Edition%2C_Website_Pro_Payment_Gateway) instance.
                * `PayPalNativeEC` - PayPal Native Express Checkout payment method. Use this type if you are using a [PayPal Express Checkout Gateway](https://knowledgecenter.zuora.com/CB_Billing/M_Payment_Gateways/Supported_Payment_Gateways/PayPal_Express_Checkout_Gateway) instance.
                * `PayPalAdaptive` - PayPal Adaptive payment method. Use this type if you are using a [PayPal Adaptive Payment Gateway](https://knowledgecenter.zuora.com/CB_Billing/M_Payment_Gateways/Supported_Payment_Gateways/PayPal_Adaptive_Payments_Gateway) instance.
                * `CreditCard` - Credit card payment method.
                * `ACH` - ACH payment method.
                * `SEPA` - Single Euro Payments Area.
                * `Betalingsservice` - Direct Debit DK.
                * `Autogiro` - Direct Debit SE.
                * `Bacs` - Direct Debit UK.
                * You can also specify a custom payment method type. This type is only available if the Universal Payment Connector and Open Payment Method services are enabled. See [Set up custom payment gateways and payment methods](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/MB_Set_up_custom_payment_gateways_and_payment_methods) for details.
              type: string
          required:
            - type
          type: object
        - $ref: "#/components/schemas/CreatePMPayPalECPayPalNativeEC"
        - $ref: "#/components/schemas/CreatePaymentMethodPayPalAdaptive"
        - $ref: "#/components/schemas/CreatePaymentMethodCreditCard"
        - $ref: "#/components/schemas/CreatePaymentMethodACH"
        - $ref: "#/components/schemas/CreatePaymentMethodCommon"
        - $ref: "#/components/schemas/PaymentMethodObjectCustomFields"
        - $ref: "#/components/schemas/CreatePaymentMethodBankTransfer"
      description: |
        Payment method to create for this new account. Supports all the payment methods that are supported in the "Create payment method" operation. See for more information about how to use this field in [Create payment method](https://www.zuora.com/developer/api-reference/#operation/POST_PaymentMethods).
    PaymentMethodObjectCustomFields:
      additionalProperties:
        description: |
          Custom fields of the payment method. The name of each custom field has the form <code>*customField*__c</code>. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
      description: |
        Container for custom fields of a payment method object.
      title: paymentMethodFieldsCustom
      type: object
    PaymentObjectCustomFields:
      additionalProperties:
        description: |
          Custom fields of the Payment object. The name of each custom field has the form <code>*customField*__c</code>. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
      description: |
        Container for custom fields of a Payment object.
      title: paymentFieldsCustom
      type: object
    PaymentObjectNSFields:
      description: |
        Container for Payment fields provided by the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
      properties:
        IntegrationId__NS:
          description: |
            ID of the corresponding object in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        IntegrationStatus__NS:
          description: |
            Status of the payment's synchronization with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        Origin__NS:
          description: |
            Origin of the corresponding object in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        SyncDate__NS:
          description: |
            Date when the payment was synchronized with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        Transaction__NS:
          description: |
            Related transaction in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
      title: paymentFieldsNS
      type: object
    PostBillingPreviewParam:
      example:
        accountId: 402890b75972406c0159724cd4d00011
        assumeRenewal: None
        chargeTypeToExclude: ""
        includingEvergreenSubscription: "true"
        targetDate: 2017-05-10
      properties:
        accountId:
          description: |
            ID of the customer account to which the billing preview applies.
          maxLength: 255
          type: string
        assumeRenewal:
          description: |
            Indicates whether to generate a preview of future invoice items and credit memo items with the assumption that the subscriptions are renewed.

            Set one of the following values in this field to decide how the assumption is applied in the billing preview.

              * **All:** The assumption is applied to all the subscriptions. Zuora generates preview invoice item data and credit memo item data from the first day of the customer's next billing period to the target date.
              
              * **None:** (Default) The assumption is not applied to the subscriptions. Zuora generates preview invoice item data and credit memo item data based on the current term end date and the target date.
              
                * If the target date is later than the current term end date, Zuora generates preview invoice item data and credit memo item data from the first day of the customer's next billing period to the current term end date.

                * If the target date is earlier than the current term end date, Zuora generates preview invoice item data and credit memo item data from the first day of the customer's next billing period to the target date.

              * **Autorenew:** The assumption is applied to the subscriptions that have auto-renew enabled. Zuora generates preview invoice item data and credit memo item data from the first day of the customer's next billing period to the target date.

            **Note:** 
              - This field can only be used if the subscription renewal term is not set to 0.  
              
              
              - The credit memo item data is only available if you have Invoice Settlement feature enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
          type: string
        chargeTypeToExclude:
          description: |
            The charge types to exclude from the billing preview.

            **Possible values:** OneTime, Recurring, Usage, and any combination of these values.
          type: string
        includingEvergreenSubscription:
          description: |
            Indicates if evergreen subscriptions are included in the billingPreview call.
          type: boolean
        targetDate:
          description: |
            The target date for the billingPreview call. The billingPreview call generates preview invoice item data and credit memo item data from the first day of the customer's next billing period to the TargetDate. 

            If the TargetDate is later than the subscription current term end date, the preview invoice item data and credit memo item data is generated from the first day of the customer's next billing period to the current term end date. If you want to generate preview invoice item data and credit memo item data past the end of the subscription current term, specify the `AssumeRenewal` field in the request.


            **Note:** The credit memo item data is only available if you have Invoice Settlement feature enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
          format: date
          type: string
      required:
        - accountId
        - targetDate
      type: object
    PostBillingPreviewRunParam:
      example:
        assumeRenewal: None
        batch: ""
        chargeTypeToExclude: ""
        includingEvergreenSubscription: "true"
        targetDate: 2017-01-10
      properties:
        assumeRenewal:
          description: |+
            Indicates whether to generate a preview of future invoice items and credit memo items with the assumption that the subscriptions are renewed.

            Set one of the following values in this field to decide how the assumption is applied in the billing preview.

              * **All:** The assumption is applied to all the subscriptions. Zuora generates preview invoice item data and credit memo item data from the first day of the customer's next billing period to the target date.
              
              * **None:** (Default) The assumption is not applied to the subscriptions. Zuora generates preview invoice item data and credit memo item data based on the current term end date and the target date.
              
                * If the target date is later than the current term end date, Zuora generates preview invoice item data and credit memo item data from the first day of the customer's next billing period to the current term end date.

                * If the target date is earlier than the current term end date, Zuora generates preview invoice item data and credit memeo item data from the first day of the customer's next billing period to the target date.

              * **Autorenew:** The assumption is applied to the subscriptions that have auto-renew enabled. Zuora generates preview invoice item data and credit memo item data from the first day of the customer's next billing period to the target date.
              
            **Note:** 
              - This field can only be used if the subscription renewal term is not set to 0.  
              
              
              - The credit memo item data is only available if you have Invoice Settlement feature enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 
              
          type: string
        batch:
          description: |
            The customer batch to include in the billing preview run. If not specified, all customer batches are included.
          maxLength: 255
          type: string
        chargeTypeToExclude:
          description: |
            The charge types to exclude from the forecast run.

            **Possible values:** OneTime, Recurring, Usage, and any comma-separated combination of these values.
          type: string
        includingEvergreenSubscription:
          description: |
            Indicates if evergreen subscriptions are included in the billing preview run. By default, evergreen subscriptions are not included.
          type: boolean
        targetDate:
          description: |
            The target date for the billing preview run. The billing preview run generates preview invoice item data and credit memo item data from the first day of the customer's next billing period to the TargetDate. 

            If the TargetDate is later than the subscription current term end date, the preview invoice item data and credit memo item data is generated from the first day of the customer's next billing period to the current term end date. If you want to generate preview invoice item data and credit memo item data past the end of the subscription current term, specify the AssumeRenewal field in the request.

            **Note:** The credit memo item data is only available if you have Invoice Settlement feature enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
          format: date
          type: string
      required:
        - targetDate
      type: object
    PostCreditMemoEmailRequestType:
      example:
        emailAddresses: contact1@example.com,contact2@example.com
        includeAdditionalEmailAddresses: false
        useEmailTemplateSetting: false
      properties:
        emailAddresses:
          description: |
            The valid email addresses you want to email a credit memo to. Use commas to separate email addresses.

            **Note:** This field is only applicable if you set the `useEmailTemplateSetting` field to `false`.
          type: string
        includeAdditionalEmailAddresses:
          default: false
          description: |
            Indicates whether to send a credit memo to the additional email addresses of the memo account. 


            You can set the additional email addresses in the **Additional Email Addresses** field on the account detail page from the Zuora UI. See [Create a Customer Account](https://knowledgecenter.zuora.com/BC_Subscription_Management/Customer_Accounts/B_Create_a_Customer_Account#section_2) for more information.
          enum:
            - true
            - false
          type: boolean
        useEmailTemplateSetting:
          default: false
          description: |
            Indicates whether to email a credit memo based on the email template setting. 

            If you set this field to `true`, the credit memo is sent to the email addresses specified in the **To Email** field of the email template. The email template is the one you set in the **Delivery Options** panel of the **Edit notification** dialog from the Zuora UI. See [Edit Email Templates](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/Notifications/Create_Email_Templates) for more information about how to edit the **To Email** field in the email template.
          enum:
            - true
            - false
          type: boolean
      type: object
    PostCustomObjectDefinitionFieldDefinitionRequest:
      properties:
        format:
          description: The data format of the custom field
          type: string
        label:
          description: The UI label of the custom field
          type: string
        type:
          description: The data type of the custom field
          type: string
      required:
        - type
        - label
      title: customObjectCustomFieldDefinition
      type: object
    PostCustomObjectDefinitionFieldsDefinitionRequest:
      additionalProperties:
        $ref: "#/components/schemas/PostCustomObjectDefinitionFieldDefinitionRequest"
      title: customObjectCustomFieldDefinitions
      type: object
    PostCustomObjectDefinitionsRequest:
      example:
        definitions:
          Delivery:
            description: Delivery schedule for shipping products based on customer's subscription.
            filterable:
              - Quantity__c
              - ProductName__c
              - Cancelled__c
              - ShippingStatus__c
            label: Delivery
            object: Delivery
            properties:
              CancellationTime__c:
                description: The time at which customer cancelled this particular shipment.
                format: date-time
                label: Cancellation Time
                type: string
              Cancelled__c:
                default: false
                description: Indicator is true when the customer has cancelled this particular shipment.
                label: Shipment Cancelled
                type: boolean
              ContactEmail__c:
                description: The customer's email address.
                label: Customer Email
                maxLength: 128
                type: string
              ContactId__c:
                description: The customer contact who will receive the shipment.
                format: uuid
                label: Ship To Customer
                type: string
              ProductName__c:
                description: The name of the product that is being shipped to customer.
                label: Product Name
                type: string
              Quantity__c:
                description: The quantity of product that is being shipped to customer.
                label: Quantity
                maximum: 20
                minimum: 1
                type: integer
              ShippingDate__c:
                description: The date the product will be sent to shipping vendor for delivery.
                format: date
                label: Shipping Date
                type: string
              ShippingStatus__c:
                default: Pending
                description: The status of the shipment - e.g. Pending, Preparing shipment, Waiting for tracking information, or Shipped.
                enum:
                  - Pending
                  - Preparing shipment
                  - Waiting for tracking information
                  - Shipped
                label: Shipping Status
                type: string
              SubscriptionId__c:
                description: The subscription that is associated with the shipment record.
                format: uuid
                label: Subscription
                type: string
              TotalWeight__c:
                description: The total weight of the product and packaging that is being shipped to customer.
                label: Total Weight (lbs.)
                minimum: 0
                type: number
            relationships:
              - cardinality: manyToOne
                fields:
                  SubscriptionId__c: Id
                namespace: com_zuora
                object: subscription
                recordConstraints:
                  create:
                    enforceValidMapping: false
              - cardinality: manyToOne
                fields:
                  ContactId__c: Id
                namespace: com_zuora
                object: contact
                recordConstraints:
                  create:
                    enforceValidMapping: false
            required:
              - SubscriptionId__c
              - ContactId__c
              - ProductName__c
              - Quantity__c
              - ShippingDate__c
          birth_place_custom_object:
            filterable:
              - city__c
            label: Birth Place Custom Object
            object: birth_place_custom_object
            properties:
              ContactId__c:
                format: uuid
                label: Contact
                type: string
              city__c:
                label: city label
                type: string
              country__c:
                label: country label
                type: string
              state__c:
                label: state label
                type: string
            relationships:
              - cardinality: manyToOne
                fields:
                  ContactId__c: Id
                namespace: com_zuora
                object: contact
                recordConstraints:
                  create:
                    enforceValidMapping: false
            required:
              - city__c
              - state__c
              - country__c
            type: object
      properties:
        definitions:
          $ref: "#/components/schemas/PostCustomObjectDefinitionsRequestDefinitions"
      type: object
    PostCustomObjectDefinitionsRequestDefinition:
      properties:
        filterable:
          description: The set of fields that are allowed to be queried on. Queries on non-filterable fields will be rejected. You can not change a non-filterable field to filterable.
          items:
            type: string
          type: array
        label:
          description: A UI label for the custom object
          type: string
        object:
          description: The API name of the custom object
          type: string
        properties:
          $ref: "#/components/schemas/PostCustomObjectDefinitionFieldsDefinitionRequest"
        relationships:
          description: An array of relationships with Zuora objects or other custom objects. You can add at most 2 `manyToOne` relationships when creating a custom field definition.
          items:
            additionalProperties: false
            properties:
              cardinality:
                description: |
                  The cardinality of the relationship from this object to another object.

                  Only the `manyToOne` cardinality can be used when creating relationships.  A relationship with `oneToMany` cardinality is created implicitly when a `manyToOne` relationship is created.

                  A custom object definition can have a maximum of 2 `manyToOne` relationships.
                enum:
                  - manyToOne
                type: string
              fields:
                $ref: "#/components/schemas/FieldsAdditionalPropertiesForPostDefinition"
              namespace:
                description: The namespace where the related object is located
                type: string
              object:
                description: The API name of the related object
                type: string
              recordConstraints:
                description: |
                  Specifies contraints to apply to custom object records.
                properties:
                  create:
                    properties:
                      enforceValidMapping:
                        default: true
                        description: |
                          Specifies whether Zuora validates the values of mapped fields
                          in custom object records.

                          By default, Zuora validates the values of mapped fields
                          in custom object records. For example, if the
                          custom object definition has a field called `AccountId__c`
                          that is mapped to the `Id` field of the `account` object,
                          Zuora verifies that the value of `AccountId__c` is a valid
                          account ID when a custom object record is created.
                          If the value of `AccountId__c` is not a valid account ID,
                          the operation fails.
                        type: boolean
                    type: object
                type: object
            required:
              - namespace
              - object
              - fields
            type: object
          type: array
        required:
          description: The required fields of the custom object. You can change required fields to optional. However, you can only change optional fields to required on the custom objects with no records.
          items:
            type: string
          type: array
      required:
        - object
        - label
      title: customObjectDefinition
      type: object
    PostCustomObjectDefinitionsRequestDefinitions:
      additionalProperties:
        $ref: "#/components/schemas/PostCustomObjectDefinitionsRequestDefinition"
      description: |
        The custom object definitions. This object maps types to custom object definitions.
      title: customObjectDefinitions
      type: object
    PostCustomObjectRecordsRequest:
      example:
        allowPartialSuccess: true
        records:
          - GrossAmount__c: 123
            ItemName__c: test
            ItemNumber__c: "1"
            ItemState__c: PendingCreation
            ItemType__c: Product
            OrderId__c: c086028c-5df8-427d-a3c8-7a7fb5d32d3d
          - GrossAmount__c: "123"
            ItemName__c: test
            ItemNumber__c: "1"
            ItemState__c: PendingCreation
            ItemType__c: Product
            OrderId__c: c086028c-5df8-427d-a3c8-7a7fb5d32d3d
      properties:
        allowPartialSuccess:
          default: false
          description: Indicates whether the records that pass the schema validation should be created when not all records in the request pass the schema validation.
          example: true
          type: boolean
        records:
          description: A list of custom object records to be created
          items:
            $ref: "#/components/schemas/CustomObjectRecordWithOnlyCustomFields"
          type: array
      required:
        - records
      type: object
    PostCustomObjectRecordsResponse:
      example:
        error:
          code: 71012520
          details:
            - code: 71012524
              message: "Json input does not match schema. Error: Field [GrossAmount] should be number type but received string."
              record:
                GrossAmount__c: "123"
                Id: ca0b22f3-7bea-4a19-b4fc-7712c24c6516
                ItemName__c: test
                ItemNumber__c: "1"
                ItemState__c: PendingCreation
                ItemType__c: Product
                OrderId__c: c086028c-5df8-427d-a3c8-7a7fb5d32d3d
          message: Request contains invalid record that failed validation against the object schema.
        records:
          - CreatedById: 11e65ead-0ead-4025-bd2d-002590fc20f6
            CreatedDate: 2021-05-11T17:55:17.854Z
            GrossAmount__c: 123
            Id: 46b79af2-9892-4937-80a0-6f5841a85f19
            ItemName__c: test
            ItemNumber__c: "1"
            ItemState__c: PendingCreation
            ItemType__c: Product
            OrderId__c: c086028c-5df8-427d-a3c8-7a7fb5d32d3d
            UpdatedById: 11e65ead-0ead-4025-bd2d-002590fc20f6
            UpdatedDate: 2021-05-11T17:55:17.854Z
            type: OrderLineItem
      properties:
        error:
          $ref: "#/components/schemas/CustomObjectRecordsErrorResponse"
        records:
          description: The custom object records that are succesfully created and stored
          items:
            $ref: "#/components/schemas/CustomObjectRecordWithAllFields"
          type: array
      type: object
    PostDebitMemoEmailType:
      example:
        emailAddresses: contact1@example.com,contact2@example.com
        includeAdditionalEmailAddresses: false
        useEmailTemplateSetting: false
      properties:
        emailAddresses:
          description: |
            The valid email addresses you want to email a debit memo to. Use commas to separate email addresses.

            **Note:** This field is only applicable if you set the `useEmailTemplateSetting` field to `false`.
          type: string
        includeAdditionalEmailAddresses:
          default: false
          description: |
            Indicates whether to send a debit memo to the additional email addresses of the memo account. 


            You can set the additional email addresses in the **Additional Email Addresses** field on the account detail page from the Zuora UI. See [Create a Customer Account](https://knowledgecenter.zuora.com/BC_Subscription_Management/Customer_Accounts/B_Create_a_Customer_Account#section_2) for more information.
          enum:
            - true
            - false
          type: boolean
        useEmailTemplateSetting:
          default: false
          description: |
            Indicates whether to email a debit memo based on the email template setting. 

            If you set this field to `true`, the debit memo is sent to the email addresses specified in the **To Email** field of the email template. The email template is the one you set in the **Delivery Options** panel of the **Edit notification** dialog from the Zuora UI. See [Edit Email Templates](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/Notifications/Create_Email_Templates) for more information about how to edit the **To Email** field in the email template.
          enum:
            - true
            - false
          type: boolean
      type: object
    PostEventTriggerRequest:
      example:
        active: true
        baseObject: Invoice
        condition: changeType == 'UPDATE' && Invoice.Status == 'Posted' && Invoice.Status_old != 'Posted' && Invoice.Amount > 1000
        description: Trigger an event when an invoice is posted with amount over 1000
        eventType:
          description: An invoice is posted with amount over 1000
          displayName: Large Invoice Posted
          name: LargeInvoicePosted
      properties:
        active:
          description: The status of the event trigger.
          type: boolean
        baseObject:
          description: "The base object that the trigger rule is defined upon. Should be specified in the pattern: ^[A-Z][\\\\w\\\\-]*$"
          maxLength: 100
          minLength: 1
          type: string
        condition:
          description: The JEXL expression to be evaluated against object changes. See above for more information and an example.
          maxLength: 5000
          minLength: 1
          type: string
        description:
          description: The description of the event trigger.
          maxLength: 1000
          type: string
        eventType:
          $ref: "#/components/schemas/EventType"
      required:
        - baseObject
        - condition
        - eventType
        - active
      type: object
    PostGenerateBillingDocumentType:
      example:
        autoPost: false
        effectiveDate: 2017-05-23
        subscriptionIds:
          - 4028905558b483220158b48983dd0015
          - 6028905558b483220158b68983dd0016
        targetDate: 2017-08-23
      properties:
        autoPost:
          default: false
          description: |
            Whether to automatically post the billing documents after the draft billing documents are generated. 

            If an error occurs during posting billing documents, the draft billing documents are not generated too.
          enum:
            - true
            - false
          type: boolean
        autoRenew:
          default: false
          description: |
            Whether to automatically renew the subscriptions with **Auto Renew** set to **Yes**. 
          enum:
            - true
            - false
          type: boolean
        chargeTypeToExclude:
          description: |
            The types of the charges to be excluded from the generation of billing documents. The field values are case insensitive. Supported values include `onetime`, `recurring`, and `usage`. 
          items:
            type: string
          type: array
        effectiveDate:
          description: |
            The date on which to generate the billing documents, in `yyyy-mm-dd` format.
          format: date
          type: string
        subscriptionIds:
          description: |
            The IDs of the subscriptions that you want to create the billing documents for. 
          items:
            type: string
          type: array
        targetDate:
          description: |
            The date used to determine which charges are to be billed, in `yyyy-mm-dd` format.
          format: date
          type: string
      type: object
    PostInvoiceEmailRequestType:
      example:
        emailAddresses: contact1@example.com,contact2@example.com
        includeAdditionalEmailAddresses: false
        useEmailTemplateSetting: false
      properties:
        emailAddresses:
          description: |
            The valid email addresses you want to email an invoice to. Use commas to separate email addresses.

            **Note:** This field is only applicable if you set the `useEmailTemplateSetting` field to `false`.
          type: string
        includeAdditionalEmailAddresses:
          default: false
          description: |
            Indicates whether to send an invoice to the additional email addresses of the invoice account. 


            You can set the additional email addresses in the **Additional Email Addresses** field on the account detail page from the Zuora UI. See [Create a Customer Account](https://knowledgecenter.zuora.com/BC_Subscription_Management/Customer_Accounts/B_Create_a_Customer_Account#section_2) for more information.
          enum:
            - true
            - false
          type: boolean
        useEmailTemplateSetting:
          default: false
          description: |
            Indicates whether to email an invoice based on the email template setting. 

            If you set this field to `true`, the invoice is sent to the email addresses specified in the **To Email** field of the email template. The email template is the one you set in the **Delivery Options** panel of the **Edit notification** dialog from the Zuora UI. See [Edit Email Templates](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/Notifications/Create_Email_Templates) for more information about how to edit the **To Email** field in the email template.
          enum:
            - true
            - false
          type: boolean
      type: object
    PostInvoiceItemType:
      allOf:
        - properties:
            accountingCode:
              description: |
                The accounting code associated with the invoice item.
              type: string
            amount:
              description: |
                The amount of the invoice item. 

                - For tax-inclusive invoice items, the amount indicates the invoice item amount including tax. 
                - For tax-exclusive invoice items, the amount indicates the invoice item amount excluding tax.
              format: number
              type: string
            bookingReference:
              description: |
                The booking reference of the invoice item.
              type: string
            chargeDate:
              description: |
                The date when the invoice item is charged.
              format: date-time
              type: string
            chargeName:
              description: |
                The name of the charge associated with the invoice item. 

                This field is required if the `productRatePlanChargeId` field is not specified in the request.
              type: string
            deferredRevenueAccountingCode:
              description: |
                The accounting code for the deferred revenue, such as Monthly Recurring Liability.

                **Note:** This field is only available if you have Zuora Finance enabled.
              type: string
            description:
              description: |
                The description of the invoice item.
              type: string
            itemType:
              description: |
                The type of the invoice item.
              type: string
            productRatePlanChargeId:
              description: |
                The ID of the product rate plan charge that the invoice item is created from.

                If you specify a value for the `productRatePlanChargeId` field in the request, Zuora directly copies the values of the following fields from the corresponding product rate plan charge, regardless of the values specified in the request body:
                - `chargeName`
                - `sku`
                - `uom`
                - `taxCode`
                - `taxMode`
                - `accountingCode`
                - `deferredRevenueAccountingCode` 
                - `recognizedRevenueAccountingCode`
              type: string
            purchaseOrderNumber:
              description: |
                The purchase order number associated with the invoice item.
              type: string
            quantity:
              default: "0"
              description: |
                The number of units for the invoice item.
              format: number
              type: string
            recognizedRevenueAccountingCode:
              description: |
                The accounting code for the recognized revenue, such as Monthly Recurring Charges or Overage Charges.

                **Note:** This field is only available if you have Zuora Finance enabled.
              type: string
            revRecCode:
              description: |
                The revenue recognition code.
              type: string
            revRecTriggerCondition:
              description: |
                The date when revenue recognition is triggered.
              enum:
                - ContractEffectiveDate
                - ServiceActivationDate
                - CustomerAcceptanceDate
              type: string
            revenueRecognitionRuleName:
              description: |
                The name of the revenue recognition rule governing the revenue schedule.

                **Note:** This field is only available if you have Zuora Finance enabled.
              type: string
            serviceEndDate:
              description: |
                The service end date of the invoice item.
              format: date
              type: string
            serviceStartDate:
              description: |
                The service start date of the invoice item.
              format: date
              type: string
            sku:
              description: |
                The SKU of the invoice item.
              type: string
            taxCode:
              description: |
                The tax code identifies which tax rules and tax rates to apply to the invoice item.

                **Note** This field is only available only when Taxation enabled.
              type: string
            taxItems:
              description: |
                Container for taxation items. The maximum number of taxation items is 5.
              items:
                $ref: "#/components/schemas/PostTaxationItemType"
              type: array
            taxMode:
              description: |
                The tax mode of the invoice item, indicating whether the amount of the invoice item includes tax.

                **Note** This field is only available only when Taxation enabled.
              enum:
                - TaxInclusive
                - TaxExclusive
              type: string
            unitPrice:
              description: |
                The per-unit price of the invoice item.
              format: number
              type: string
            uom:
              description: |
                The unit of measure.
              type: string
          required:
            - amount
            - serviceStartDate
          type: object
        - $ref: "#/components/schemas/InvoiceItemObjectNSFields"
        - $ref: "#/components/schemas/InvoiceItemObjectCustomFields"
    PostInvoiceResponse:
      allOf:
        - properties:
            accountId:
              description: |
                The ID of the customer account associated with the invoice.
              type: string
            amount:
              description: |
                The total amount of the invoice.
              format: number
              type: string
            amountWithoutTax:
              description: |
                The invoice amount excluding tax.
              format: number
              type: string
            autoPay:
              description: |
                Whether invoices are automatically picked up for processing in the corresponding payment run.
              type: boolean
            comments:
              description: |
                Comments about the invoice.
              type: string
            dueDate:
              description: |
                The date by which the payment for this invoice is due.
              format: date
              type: string
            id:
              description: |
                The unique ID of the invoice.
              type: string
            invoiceDate:
              description: |
                The date that appears on the invoice being created.
              format: date
              type: string
            invoiceNumber:
              description: |
                The unique identification number of the invoice.
              type: string
            status:
              description: |
                The status of the invoice.
              enum:
                - Draft
                - Posted
              type: string
            taxAmount:
              description: |
                The amount of taxation.
              format: number
              type: string
            taxExemptAmount:
              description: |
                The total amount of taxes or VAT for which the customer has an exemption.
              format: number
              type: string
            transferredToAccounting:
              description: |
                Whether the invoice was transferred to an external accounting system.
              enum:
                - Processing
                - Error
                - Ignore
                - true
                - false
              type: string
          type: object
        - $ref: "#/components/schemas/InvoiceObjectNSFields"
        - $ref: "#/components/schemas/InvoiceObjectCustomFields"
    PostInvoiceType:
      allOf:
        - properties:
            accountId:
              description: |
                The ID of the account associated with the invoice.
              type: string
            autoPay:
              default: false
              description: |
                Whether invoices are automatically picked up for processing in the corresponding payment run.
              type: boolean
            comments:
              description: |
                Comments about the invoice.
              type: string
            dueDate:
              description: |
                The date by which the payment for this invoice is due, in `yyyy-mm-dd` format.
              format: date
              type: string
            invoiceDate:
              description: |
                The date that appears on the invoice being created, in `yyyy-mm-dd` format. The value cannot fall in a closed accounting period.
              format: date
              type: string
            invoiceItems:
              description: |
                Container for invoice items. The maximum number of invoice items is 1,000.
              items:
                $ref: "#/components/schemas/PostInvoiceItemType"
              type: array
            status:
              default: Draft
              description: |
                The status of invoice. By default, the invoice status is Draft.

                When creating an invoice, if you set this field to `Posted`, the invoice is created and posted directly.
              enum:
                - Draft
                - Posted
              type: string
            transferredToAccounting:
              enum:
                - Processing
                - Error
                - Ignore
                - true
                - false
              type: string
          required:
            - accountId
            - invoiceDate
          type: object
        - $ref: "#/components/schemas/InvoiceObjectNSFields"
        - $ref: "#/components/schemas/InvoiceObjectCustomFields"
      example:
        accountId: 2c9890207863df710178642433c407a5
        autoPay: false
        comments: comments
        invoiceDate: 2020-02-01
        invoiceItems:
          - amount: 300
            bookingReference: bookingReference
            chargeDate: 1580544000000
            chargeName: charge with tax amount 9
            description: description
            quantity: 2
            serviceEndDate: 2020-02-10
            serviceStartDate: 2020-02-01
            taxItems:
              - exemptAmount: 0
                jurisdiction: juristiction
                locationCode: locationCode
                name: country tax
                taxAmount: 9
                taxCode: tax code
                taxCodeDescription: tax code description
                taxDate: 2020-02-01
                taxMode: TaxExclusive
                taxRate: 0.03
                taxRateDescription: tax rate description
                taxRateType: Percentage
    PostNonRefRefundType:
      allOf:
        - properties:
            comment:
              description: |
                Comments about the refund.
              maxLength: 255
              minLength: 0
              type: string
            financeInformation:
              description: |
                Container for the finance information related to the refund.
              properties:
                bankAccountAccountingCode:
                  description: |
                    The accounting code that maps to a bank account in your accounting system.
                  maxLength: 100
                  minLength: 0
                  type: string
                onAccountAccountingCode:
                  description: |
                    The accounting code that maps to an on account in your accounting system.
                  maxLength: 100
                  minLength: 0
                  type: string
                transferredToAccounting:
                  description: |
                    Whether the refund was transferred to an external accounting system. Use this field for integration with accounting systems, such as NetSuite. 
                  enum:
                    - Processing
                    - Yes
                    - No
                    - Error
                    - Ignore
                  type: string
                unappliedPaymentAccountingCode:
                  description: |
                    The accounting code for the unapplied payment.
                  maxLength: 100
                  minLength: 0
                  type: string
              type: object
            gatewayId:
              description: |
                The ID of the gateway instance that processes the refund. This field can be specified only for electronic refunds. The ID must be a valid gateway instance ID, and this gateway must support the specific payment method. 

                If no gateway ID is specified, the default gateway in the billing account configuration will be used. If no gateway is specified in the billing account, the default gateway of the corresponding tenant will be used.
              type: string
            gatewayOptions:
              description: |
                The field used to pass gateway-specific parameters and parameter values.
              properties:
                key:
                  description: |
                    The name of a gateway-specific parameter.
                  type: string
                value:
                  description: |
                    The value of the gateway-specific parameter.
                  type: string
              type: object
            items:
              description: |
                Container for credit memo items. The maximum number of items is 1,000.

                **Note:** This field is only available if you have the [Invoice Item Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/C_Invoice_Item_Settlement) feature enabled. Invoice Item Settlement must be used together with other Invoice Settlement features (Unapplied Payments, and Credit and Debit memos).  If you wish to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
              items:
                $ref: "#/components/schemas/RefundCreditMemoItemType"
              type: array
            methodType:
              description: |
                How an external refund was issued to a customer. This field is required for an external refund and must be left empty for an electronic refund. You can issue an external refund on a credit memo.
              enum:
                - ACH
                - Cash
                - Check
                - CreditCard
                - PayPal
                - WireTransfer
                - DebitCard
                - CreditCardReferenceTransaction
                - BankTransfer
                - Other
              type: string
            paymentMethodId:
              description: |
                The ID of the payment method used for the refund. This field is required for an electronic refund, and the value must be an electronic payment method ID. This field must be left empty for an external refund. 
              type: string
            reasonCode:
              description: |
                A code identifying the reason for the transaction. The value must be an existing reason code or empty. If you do not specify a value, Zuora uses the default reason code.
              type: string
            referenceId:
              description: |
                The transaction ID returned by the payment gateway for an electronic refund. Use this field to reconcile refunds between your gateway and Zuora Payments.
              maxLength: 100
              minLength: 0
              type: string
            refundDate:
              description: |
                The date when the refund takes effect, in `yyyy-mm-dd` format. The date of the refund cannot be before the credit memo date. Specify this field only for external refunds. Zuora automatically generates this field for electronic refunds.
              format: date
              type: string
            secondRefundReferenceId:
              description: |
                The transaction ID returned by the payment gateway if there is an additional transaction for the refund. Use this field to reconcile payments between your gateway and Zuora Payments.
              maxLength: 100
              minLength: 0
              type: string
            softDescriptor:
              description: A payment gateway-specific field that maps to Zuora for the gateways, Orbital, Vantiv and Verifi.
              maxLength: 35
              type: string
            softDescriptorPhone:
              description: A payment gateway-specific field that maps to Zuora for the gateways, Orbital, Vantiv and Verifi.
              maxLength: 20
              type: string
            totalAmount:
              description: |
                The total amount of the refund. The amount cannot exceed the unapplied amount of the associated credit memo. If the original credit memo was applied to one or more invoices or debit memos, you have to unapply a full or partial credit memo from the invoices or debit memos, and then refund the full or partial unapplied credit memo to your customers.
              format: double
              type: number
            type:
              description: |
                The type of the refund.
              enum:
                - External
                - Electronic
              type: string
          required:
            - totalAmount
            - type
          type: object
        - $ref: "#/components/schemas/RefundObjectNSFields"
        - $ref: "#/components/schemas/RefundObjectCustomFields"
      example:
        gatewayOptions:
          Comments: test
          IPAddress: 192.168.1.1
        items:
          - amount: 7
            creditMemoItemId: 4028905f5a890526015a8d73f74b0016
          - amount: 0.1
            creditTaxItemId: 4028905f5a890526015a8d73f90c0018
        methodType: CreditCard
        refundDate: 2017-03-02
        totalAmount: 7.1
        type: External
    PostOrderLineItemUpdateType:
      allOf:
        - properties:
            id:
              description: |
                The sytem generated Id for the Order Line Item(OLI). Use this field to specify which OLI to update.
              format: UUID
              type: string
          required:
            - id
          type: object
        - $ref: "#/components/schemas/OrderLineItemCommon"
    PostOrderLineItemsRequestType:
      properties:
        orderLineItems:
          items:
            $ref: "#/components/schemas/PostOrderLineItemUpdateType"
          type: array
        processingOptions:
          $ref: "#/components/schemas/ProcessingOptions"
      type: object
    PostOrderPreviewResponseType:
      allOf:
        - $ref: "#/components/schemas/CommonResponseType"
        - properties:
            previewResult:
              $ref: "#/components/schemas/PreviewResult"
          type: object
    PostOrderResponseType:
      allOf:
        - $ref: "#/components/schemas/CommonResponseType"
        - properties:
            accountId:
              description: The account ID for the order. This field is returned instead of the `accountNumber` field if the `returnIds` query parameter is set to `true`.
              type: string
            accountNumber:
              description: The account number for the order.
              type: string
            creditMemoIds:
              description: An array of the credit memo IDs generated in this order request. The credit memo is only available if you have the Invoice Settlement feature enabled. This field is returned instead of the `creditMemoNumbers` field if the `returnIds` query parameter is set to `true`.
              items:
                type: string
              type: array
            creditMemoNumbers:
              description: An array of the credit memo numbers generated in this order request. The credit memo is only available if you have the Invoice Settlement feature enabled.
              items:
                type: string
              type: array
            invoiceIds:
              description: An array of the invoice IDs generated in this order request. Normally it includes one invoice ID only, but can include multiple items when a subscription was tagged as invoice separately. This field is returned instead of the `invoiceNumbers` field if the `returnIds` query parameter is set to `true`.
              items:
                type: string
              type: array
            invoiceNumbers:
              description: An array of the invoice numbers generated in this order request. Normally it includes one invoice number only, but can include multiple items when a subscription was tagged as invoice separately.
              items:
                type: string
              type: array
            orderId:
              description: The ID of the order created. This field is returned instead of the `orderNumber` field if the `returnIds` query parameter is set to `true`.
              type: string
            orderLineItems:
              items:
                properties:
                  id:
                    description: The sytem generated Id for the Order Line Item.
                    format: UUID
                    type: string
                  itemNumber:
                    description: The number for the Order Line Item.
                    format: UUID
                    type: string
                type: object
              type: array
            orderNumber:
              description: The order number of the order created.
              type: string
            paidAmount:
              description: The total amount collected in this order request.
              type: string
            paymentId:
              description: The payment Id that is collected in this order request. This field is returned instead of the `paymentNumber` field if the `returnIds` query parameter is set to `true`.
              type: string
            paymentNumber:
              description: The payment number that is collected in this order request.
              type: string
            ramps:
              description: |
                **Note**: This field is only available if you have the Ramps feature enabled. The [Orders](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/AA_Overview_of_Orders) feature must be enabled before you can access the [Ramps](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Ramps_and_Ramp_Metrics/A_Overview_of_Ramps_and_Ramp_Metrics) feature. The Ramps feature is available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information coming October 2020.

                The ramp definitions created by this order request.
              items:
                properties:
                  rampNumber:
                    description: The number of the ramp definition.
                    type: string
                  subscriptionNumber:
                    description: The number of the subscription that this ramp deal definition is applied to.
                    type: string
                type: object
              type: array
            status:
              description: Status of the order. `Pending` is only applicable for an order that contains a `CreateSubscription` order action.
              enum:
                - Completed
                - Pending
              type: string
            subscriptionIds:
              description: |
                **Note:** This field is in Zuora REST API version control. Supported minor versions are 222.4 or earlier. To use this field in the method, you must set the `zuora-version` parameter to the minor version number in the request header.

                Container for the subscription IDs of the subscriptions in an order. This field is returned instead of the `subscriptionNumbers` field if the `returnIds` query parameter is set to `true`.
              items:
                type: string
              type: array
            subscriptionNumbers:
              description: |
                **Note:** This field is in Zuora REST API version control. Supported minor versions are 222.4 or earlier. To use this field in the method, you must set the `zuora-version` parameter to the minor version number in the request header.

                Container for the subscription numbers of the subscriptions in an order.
              items:
                type: string
              type: array
            subscriptions:
              description: |
                **Note:** This field is in Zuora REST API version control. Supported minor versions are 223.0 or later. To use this field in the method, you must set the `zuora-version` parameter to the minor version number in the request header.

                Container for the subscription numbers and statuses in an order.
              items:
                properties:
                  status:
                    description: Status of the subscription. `Pending Activation` and `Pending Acceptance` are only applicable for an order that contains a `CreateSubscription` order action.
                    enum:
                      - Active
                      - Pending Activation
                      - Pending Acceptance
                      - Cancelled
                      - Suspended
                    type: string
                  subscriptionId:
                    description: Subscription ID of the subscription included in this order. This field is returned instead of the `subscriptionNumber` field if the `returnIds` query parameter is set to `true`.
                    type: string
                  subscriptionNumber:
                    description: Subscription number of the subscription included in this order.
                    type: string
                type: object
              type: array
          type: object
    PostRefundType:
      allOf:
        - properties:
            comment:
              description: |
                Comments about the refund.
              maxLength: 255
              minLength: 0
              type: string
            financeInformation:
              description: |
                Container for the finance information related to the refund.
              properties:
                bankAccountAccountingCode:
                  description: |
                    The accounting code that maps to a bank account in your accounting system.
                  maxLength: 100
                  minLength: 0
                  type: string
                transferredToAccounting:
                  description: |
                    Whether the refund was transferred to an external accounting system. Use this field for integration with accounting systems, such as NetSuite. 
                  enum:
                    - Processing
                    - Yes
                    - No
                    - Error
                    - Ignore
                  type: string
                unappliedPaymentAccountingCode:
                  description: |
                    The accounting code for the unapplied payment.
                  maxLength: 100
                  minLength: 0
                  type: string
              type: object
            gatewayOptions:
              description: |
                The field used to pass gateway-specific parameters and parameter values.
              properties:
                key:
                  description: |
                    The name of a gateway-specific parameter.
                  type: string
                value:
                  description: |
                    The value of the gateway-specific parameter.
                  type: string
              type: object
            methodType:
              description: |
                How an external refund was issued to a customer. This field is required for an external refund and must be left empty for an electronic refund. You can issue an external refund on an electronic payment.
              enum:
                - ACH
                - Cash
                - Check
                - CreditCard
                - PayPal
                - WireTransfer
                - DebitCard
                - CreditCardReferenceTransaction
                - BankTransfer
                - Other
              type: string
            reasonCode:
              description: |
                A code identifying the reason for the transaction. The value must be an existing reason code or empty. If you do not specify a value, Zuora uses the default reason code.
              type: string
            referenceId:
              description: |
                The transaction ID returned by the payment gateway for an electronic refund. Use this field to reconcile refunds between your gateway and Zuora Payments.
              maxLength: 100
              minLength: 0
              type: string
            refundDate:
              description: |
                The date when the refund takes effect, in `yyyy-mm-dd` format. The date of the refund cannot be before the payment date. Specify this field only for external refunds. Zuora automatically generates this field for electronic refunds.
              format: date
              type: string
            secondRefundReferenceId:
              description: |
                The transaction ID returned by the payment gateway if there is an additional transaction for the refund. Use this field to reconcile payments between your gateway and Zuora Payments.
              maxLength: 100
              minLength: 0
              type: string
            softDescriptor:
              description: A payment gateway-specific field that maps to Zuora for the gateways, Orbital, Vantiv and Verifi.
              maxLength: 35
              type: string
            softDescriptorPhone:
              description: A payment gateway-specific field that maps to Zuora for the gateways, Orbital, Vantiv and Verifi.
              maxLength: 20
              type: string
            totalAmount:
              description: |
                The total amount of the refund. The amount cannot exceed the unapplied amount of the associated payment. If the original payment was applied to one or more invoices or debit memos, you have to unapply a full or partial payment from the invoices or debit memos, and then refund the full or partial unapplied payment to your customers. 
              format: double
              type: number
            type:
              description: |
                The type of the refund.
              enum:
                - External
                - Electronic
              type: string
          required:
            - totalAmount
            - type
          type: object
        - $ref: "#/components/schemas/RefundObjectNSFields"
        - $ref: "#/components/schemas/RefundObjectCustomFields"
      example:
        comment: Create a refund for unapplied payment.
        gatewayOptions:
          Comments: test
          IPAddress: 192.168.1.1
        methodType: CreditCard
        reasonCode: Standard Refund
        refundDate: 2017-03-01
        totalAmount: 4
        type: External
    PostTaxationItemType:
      allOf:
        - properties:
            exemptAmount:
              description: |
                The amount of taxes or VAT, for which your customer has an exemption.
              format: number
              type: string
            jurisdiction:
              description: |
                The jurisdiction that applies the tax or VAT. This value is typically a state, province, county, or city.
              type: string
            locationCode:
              description: |
                The identifier for the location based on the value of the `taxCode` field.
              type: string
            name:
              description: |
                The name of taxation.
              type: string
            taxAmount:
              description: |
                The amount of the taxation item in the invoice item.
              format: number
              type: string
            taxCode:
              description: |
                The tax code identifies which tax rules and tax rates to apply to a specific invoice item.
              type: string
            taxCodeDescription:
              description: |
                The description of the tax code.
              type: string
            taxDate:
              description: |
                The date that the tax is applied to the invoice item, in `yyyy-mm-dd` format.
              format: date
              type: string
            taxMode:
              description: |
                The tax mode of the invoice item, indicating whether the amount of the invoice item includes tax.
              enum:
                - TaxInclusive
                - TaxExclusive
              type: string
            taxRate:
              description: |
                The tax rate applied to the invoice item.
              format: number
              type: string
            taxRateDescription:
              description: |
                The description of the tax rate.
              type: string
            taxRateType:
              description: |
                The type of the tax rate applied to the invoice item.
              enum:
                - Percentage
                - FlatFee
              type: string
          required:
            - name
            - taxAmount
            - taxCode
            - taxDate
            - taxMode
            - taxRate
            - taxRateType
          type: object
        - $ref: "#/components/schemas/TaxationItemObjectCustomFields"
    PreviewAccountInfo:
      description: |
        Information about the account that will own the order.
      properties:
        billCycleDay:
          description: Day of the month that the account prefers billing periods to begin on. If set to 0, the bill cycle day will be set as "AutoSet".
          maximum: 31
          minimum: 0
          type: integer
        currency:
          description: |
            ISO 3-letter currency code (uppercase). For example, USD.
          maxLength: 3
          type: string
        customFields:
          $ref: "#/components/schemas/AccountObjectCustomFields"
        soldToContact:
          $ref: "#/components/schemas/PreviewContactInfo"
        taxInfo:
          $ref: "#/components/schemas/TaxInfo"
      required:
        - currency
        - billCycleDay
      title: previewAccountInfo
      type: object
    PreviewContactInfo:
      properties:
        city:
          maxLength: 40
          type: string
        country:
          description: Country; must be a valid country name or abbreviation. If using Zuora Tax, you must specify a country to calculate tax.
          maxLength: 64
          type: string
        county:
          maxLength: 32
          type: string
        postalCode:
          maxLength: 20
          type: string
        state:
          maxLength: 40
          type: string
        taxRegion:
          maxLength: 32
          type: string
      type: object
    PreviewOptions:
      properties:
        previewNumberOfPeriods:
          description: The number of periods to preview when the value of the `previewThroughType` field is set to `NumberOfPeriods`.
          minLength: 1
          type: integer
        previewThruType:
          description: |
            The options on how the preview through date is calculated. Available for preview only. The 'TermEnd' option is invalid when any subscription included in this order is evergreen. 

            If set the value of this field to `SpecificDate`, you must specify a specific date in the 'specificPreviewThruDate' field.

            If set the value of this field to `NumberOfPeriods`, you must use the `previewNumberOfPeriods` field to specify how many periods you want to preview.
          enum:
            - SpecificDate
            - TermEnd
            - NumberOfPeriods
          type: string
        previewTypes:
          description: |
            One or more types of the preview. It can include:

            * ChargeMetrics: charge level metrics will be returned in the response, including: `cmrr`, `tcv`, `tcb`, and `tax`.
            * BillingDocs: `invoices` and `creditMemos` will be returned in the response. Note `creditMemos` is only available if the Invoice Settlement feature is enabled.
            * OrderDeltaMetrics: order delta metrics will be returned in the response, including: `orderDeltaMrr`, `orderDeltaTcb` and  `orderDeltaTcv`.
            * OrderMetrics: order metrics will be returned in the response, including: `quantity`, `mrr`, `tcb`, `tcv`, and `elp`. **Note:** As of Zuora Billing Release 306, Zuora has upgraded the methodologies for calculating metrics in [Orders](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders). The new methodologies are reflected in the OrderDeltaMetrics. It is recommended that all customers use the [Order Delta Metrics](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Delta_Metrics/AA_Overview_of_Order_Delta_Metrics). If you are an existing [Order Metrics](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/AA_Overview_of_Orders/Key_Metrics_for_Orders) customer and want to migrate to Order Delta Metrics, submit a request at [Zuora Global Support](https://support.zuora.com/). Whereas new customers, and existing customers not currently on [Order Metrics](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/AA_Overview_of_Orders/Key_Metrics_for_Orders), will no longer have access to Order Metrics, existing customers currently using Order Metrics will continue to be supported.
            * RampMetrics: ramp metrics will be returned in the response, including: `quantity`, `mrr`, `tcb`, `tcv` metrics for each charge and each ramp interval.
            * RampDeltaMetrics: ramp metrics changes will be returned in the response, including: `deltaQuantity`, `deltaMrr`, `deltaTcb`, `deltaTcv` metrics for each charge and each ramp interval.
          items:
            enum:
              - ChargeMetrics
              - BillingDocs
              - OrderDeltaMetrics
              - OrderMetrics
              - RampMetrics
              - RampDeltaMetrics
            type: string
          type: array
        specificPreviewThruDate:
          description: |
            The end date of the order preview. You can preview the invoice charges through the preview through date. (Invoice preview only)


            **Note:** This field is only applicable if the 'previewThruType' field is set to 'SpecificDate'.
          format: date
          type: string
      type: object
    PreviewOrderChargeOverride:
      description: |
        Charge associated with a rate plan.
      properties:
        billing:
          description: |
            Billing information about the charge.
          properties:
            billCycleDay:
              description: |
                Day of the month that each billing period begins on. Only applicable if the value of the `billCycleType` field is `SpecificDayofMonth`.
              maximum: 31
              minimum: 0
              type: integer
            billCycleType:
              description: |
                Specifies how Zuora determines the day that each billing period begins on.

                  * `DefaultFromCustomer` - Each billing period begins on the bill cycle day of the account that owns the subscription.
                  * `SpecificDayofMonth` - Use the `billCycleDay` field to specify the day of the month that each billing period begins on.
                  * `SubscriptionStartDay` - Each billing period begins on the same day of the month as the start date of the subscription.
                  * `ChargeTriggerDay` - Each billing period begins on the same day of the month as the date when the charge becomes active.
                  * `SpecificDayofWeek` - Use the `weeklyBillCycleDay` field to specify the day of the week that each billing period begins on.
              enum:
                - DefaultFromCustomer
                - SpecificDayofMonth
                - SubscriptionStartDay
                - ChargeTriggerDay
                - SpecificDayofWeek
              type: string
            billingPeriod:
              description: |
                Billing frequency of the charge. The value of this field controls the duration of each billing period.

                If the value of this field is `Specific_Months` or `Specific_Weeks`, use the `specificBillingPeriod` field to specify the duration of each billing period.
              enum:
                - Month
                - Quarter
                - Semi_Annual
                - Annual
                - Eighteen_Months
                - Two_Years
                - Three_Years
                - Five_Years
                - Specific_Months
                - Subscription_Term
                - Week
                - Specific_Weeks
              type: string
            billingPeriodAlignment:
              description: |
                Specifies how Zuora determines when to start new billing periods. You can use this field to align the billing periods of different charges.

                * `AlignToCharge` - Zuora starts a new billing period on the first billing day that falls on or after the date when the charge becomes active.
                * `AlignToSubscriptionStart` - Zuora starts a new billing period on the first billing day that falls on or after the start date of the subscription.
                * `AlignToTermStart` - For each term of the subscription, Zuora starts a new billing period on the first billing day that falls on or after the start date of the term.

                See the `billCycleType` field for information about how Zuora determines the billing day.
              enum:
                - AlignToCharge
                - AlignToSubscriptionStart
                - AlignToTermStart
              type: string
            billingTiming:
              description: |
                Specifies whether to invoice for a billing period on the first day of the billing period (billing in advance) or the first day of the next billing period (billing in arrears).
              enum:
                - IN_ADVANCE
                - IN_ARREARS
              type: string
            specificBillingPeriod:
              description: |
                Duration of each billing period in months or weeks, depending on the value of the `billingPeriod` field. Only applicable if the value of the `billingPeriod` field is `Specific_Months` or `Specific_Weeks`.
              type: integer
            weeklyBillCycleDay:
              description: |
                Day of the week that each billing period begins on. Only applicable if the value of the `billCycleType` field is `SpecificDayofWeek`.
              enum:
                - Sunday
                - Monday
                - Tuesday
                - Wednesday
                - Thursday
                - Friday
                - Saturday
              type: string
          type: object
        chargeNumber:
          description: |
            Charge number of the charge. For example, C-00000307.

            If you do not set this field, Zuora will generate the charge number.
          maxLength: 50
          type: string
        customFields:
          $ref: "#/components/schemas/RatePlanChargeObjectCustomFields"
        description:
          description: |
            Description of the charge.
          maxLength: 500
          type: string
        endDate:
          $ref: "#/components/schemas/EndConditions"
        pricing:
          description: |
            Pricing information about the charge.
          properties:
            chargeModelData:
              $ref: "#/components/schemas/ChargeModelDataOverride"
            discount:
              $ref: "#/components/schemas/DiscountPricingOverride"
            oneTimeFlatFee:
              $ref: "#/components/schemas/OneTimeFlatFeePricingOverride"
            oneTimePerUnit:
              $ref: "#/components/schemas/OneTimePerUnitPricingOverride"
            oneTimeTiered:
              $ref: "#/components/schemas/OneTimeTieredPricingOverride"
            oneTimeVolume:
              $ref: "#/components/schemas/OneTimeVolumePricingOverride"
            recurringFlatFee:
              $ref: "#/components/schemas/RecurringFlatFeePricingOverride"
            recurringPerUnit:
              $ref: "#/components/schemas/RecurringPerUnitPricingOverride"
            recurringTiered:
              $ref: "#/components/schemas/RecurringTieredPricingOverride"
            recurringVolume:
              $ref: "#/components/schemas/RecurringVolumePricingOverride"
            usageFlatFee:
              $ref: "#/components/schemas/UsageFlatFeePricingOverride"
            usageOverage:
              $ref: "#/components/schemas/UsageOveragePricingOverride"
            usagePerUnit:
              $ref: "#/components/schemas/UsagePerUnitPricingOverride"
            usageTiered:
              $ref: "#/components/schemas/UsageTieredPricingOverride"
            usageTieredWithOverage:
              $ref: "#/components/schemas/UsageTieredWithOveragePricingOverride"
            usageVolume:
              $ref: "#/components/schemas/UsageVolumePricingOverride"
          type: object
        productRatePlanChargeId:
          description: |
            Internal identifier of the product rate plan charge that the charge is based on.
          type: string
        revRecCode:
          description: |
            Revenue Recognition Code
          maxLength: 70
          type: string
        revRecTriggerCondition:
          description: |
            Specifies the revenue recognition trigger condition.

              * `Contract Effective Date` 
              * `Service Activation Date`
              * `Customer Acceptance Date`
          enum:
            - Contract Effective Date
            - Service Activation Date
            - Customer Acceptance Date
          type: string
        revenueRecognitionRuleName:
          description: |
            Specifies the revenue recognition rule.

              * `Recognize upon invoicing` 
              * `Recognize daily over time`
          enum:
            - Recognize upon invoicing
            - Recognize daily over time
          type: string
        startDate:
          $ref: "#/components/schemas/PreviewOrderTriggerParams"
        uniqueToken:
          description: |
            Unique identifier for the charge. This identifier enables you to refer to the charge before the charge has an internal identifier in Zuora.

            For instance, suppose that you want to use a single order to add a product to a subscription and later update the same product. When you add the product, you can set a unique identifier for the charge. Then when you update the product, you can use the same unique identifier to specify which charge to modify.
          maxLength: 50
          type: string
      required:
        - productRatePlanChargeId
      title: charge
      type: object
    PreviewOrderChargeUpdate:
      properties:
        billing:
          $ref: "#/components/schemas/BillingUpdate"
        chargeNumber:
          description: |
            Read only. Identifies the charge to be updated.
          type: string
        customFields:
          $ref: "#/components/schemas/RatePlanChargeObjectCustomFields"
        description:
          type: string
        effectiveDate:
          $ref: "#/components/schemas/PreviewOrderTriggerParams"
        pricing:
          $ref: "#/components/schemas/PreviewOrderPricingUpdate"
        uniqueToken:
          description: |
            A unique string to represent the rate plan charge in the order. The unique token is used to perform multiple actions against a newly added rate plan. For example, if you want to add and update a product in the same order, you would assign a unique token to the product rate plan when added and use that token in future order actions.
          type: string
      type: object
    PreviewOrderCreateSubscription:
      description: |
        Information about an order action of type `CreateSubscription`.
      properties:
        invoiceSeparately:
          description: |
            Specifies whether the subscription appears on a separate invoice when Zuora generates invoices.
          type: boolean
        newSubscriptionOwnerAccount:
          description: |
            Information about a new account that will own the subscription. Only available if you have enabled the Owner Transfer feature.

            **Note:** The Owner Transfer feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).

            If you do not set this field or the `subscriptionOwnerAccountNumber` field, the account that owns the order will also own the subscription. Zuora will return an error if you set this field and the `subscriptionOwnerAccountNumber` field.
          properties:
            accountNumber:
              description: |
                Account number. For example, A00000001.
              maxLength: 70
              type: string
            additionalEmailAddresses:
              description: |
                List of additional email addresses to receive emailed invoices. Values should be a comma-separated list of email addresses.
              maxLength: 1200
              type: string
            allowInvoiceEdit:
              description: |
                Indicates if associated invoices can be edited.
                Values are: 

                * `true`
                * `false` (default)
              type: boolean
            autoPay:
              description: |
                Specifies whether future payments are automatically billed when they are due.
              type: boolean
            batch:
              description: |
                Name of the billing batch that the account belongs to. For example, Batch1.
              type: string
            billCycleDay:
              description: |
                Day of the month that the account prefers billing periods to begin on. If set to 0, the bill cycle day will be set as "AutoSet".
              maximum: 31
              minimum: 0
              type: integer
            billToContact:
              $ref: "#/components/schemas/BillToContactPostOrder"
            communicationProfileId:
              description: |
                Internal identifier of the communication profile that Zuora uses when sending notifications to the account's contacts.
              type: string
            creditCard:
              $ref: "#/components/schemas/creditCard"
            creditMemoTemplateId:
              description: |
                **Note:** This field is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

                The unique ID of the credit memo template, configured in **Billing Settings** > **Manage Billing Document Configuration** through the Zuora UI. For example, 2c92c08a6246fdf101626b1b3fe0144b.
              type: string
            crmId:
              description: |
                External identifier of the account in a CRM system.
              maxLength: 100
              type: string
            currency:
              description: |
                ISO 3-letter currency code (uppercase). For example, USD.
              type: string
            customFields:
              $ref: "#/components/schemas/AccountObjectCustomFields"
            customerServiceRepName:
              description: |
                Name of the account's customer service representative, if applicable.
              maxLength: 50
              type: string
            debitMemoTemplateId:
              description: |
                **Note:** This field is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.

                The unique ID of the debit memo template, configured in **Billing Settings** > **Manage Billing Document Configuration** through the Zuora UI. For example, 2c92c08d62470a8501626b19d24f19e2.
              type: string
            hpmCreditCardPaymentMethodId:
              description: |
                The ID of the payment method associated with this account. The payment method specified for this field will be set as the default payment method of the account.

                If the `autoPay` field is set to `true`, you must provide the credit card payment method ID for either this field or the `creditCard` field,
                but not both.     
              type: string
            invoiceDeliveryPrefsEmail:
              description: |
                Specifies whether to turn on the invoice delivery method 'Email' for the new account. 
                Values are: 

                * `true` (default). Turn on the invoice delivery method 'Email' for the new account.
                * `false`. Turn off the invoice delivery method 'Email' for the new account.         
              type: boolean
            invoiceDeliveryPrefsPrint:
              description: |
                Specifies whether to turn on the invoice delivery method 'Print' for the new account.
                Values are: 

                * `true`. Turn on the invoice delivery method 'Print' for the new account.
                * `false` (default). Turn off the invoice delivery method 'Print' for the new account.
              type: boolean
            invoiceTemplateId:
              description: |
                Internal identifier of the invoice template that Zuora uses when generating invoices for the account.
              type: string
            name:
              description: |
                Account name.
              maxLength: 255
              type: string
            notes:
              description: |
                Notes about the account. These notes are only visible to Zuora users.
              maxLength: 65535
              type: string
            parentId:
              description: Identifier of the parent customer account for this Account object. Use this field if you have customer hierarchy enabled.
              type: string
            paymentGateway:
              description: |
                The payment gateway that Zuora uses when processing electronic payments and refunds for the account. If you do not specify this field or if the value of this field is null, Zuora uses your default payment gateway.
              maxLength: 40
              type: string
            paymentMethod:
              $ref: "#/components/schemas/PaymentMethod"
            paymentTerm:
              description: |
                Name of the payment term associated with the account. For example, "Net 30". The payment term determines the due dates of invoices.
              type: string
            purchaseOrderNumber:
              description: |
                The number of the purchase order associated with this account. Purchase order information generally comes from customers.
              maxLength: 100
              type: string
            salesRep:
              description: |
                The name of the sales representative associated with this account, if applicable.
              maxLength: 50
              type: string
            soldToContact:
              $ref: "#/components/schemas/SoldToContactPostOrder"
            taxInfo:
              $ref: "#/components/schemas/TaxInfo"
          required:
            - name
            - currency
            - billCycleDay
            - billToContact
          type: object
        notes:
          description: |
            Notes about the subscription. These notes are only visible to Zuora users.
          maxLength: 500
          type: string
        subscribeToRatePlans:
          description: |
            List of rate plans associated with the subscription.
          items:
            $ref: "#/components/schemas/PreviewOrderRatePlanOverride"
          type: array
        subscriptionNumber:
          description: |
            Subscription number of the subscription. For example, A-S00000001.

            If you do not set this field, Zuora will generate the subscription number.
          maxLength: 100
          type: string
        subscriptionOwnerAccountNumber:
          description: |
            Account number of an existing account that will own the subscription. For example, A00000001.

            If you do not set this field or the `newSubscriptionOwnerAccount` field, the account that owns the order will also own the subscription. Zuora will return an error if you set this field and the `newSubscriptionOwnerAccount` field.
          maxLength: 70
          type: string
        terms:
          description: |
            Container for the terms and renewal settings of the subscription.
          properties:
            autoRenew:
              description: |
                Specifies whether the subscription automatically renews at the end of the each term. Only applicable if the type of the first term is `TERMED`.
              type: boolean
            initialTerm:
              description: |
                Information about the first term of the subscription.
              properties:
                period:
                  description: |
                    Duration of the first term in months, years, days, or weeks, depending on the value of the `periodType` field. Only applicable if the value of the `termType` field is `TERMED`.
                  type: integer
                periodType:
                  description: |
                    Unit of time that the first term is measured in. Only applicable if the value of the `termType` field is `TERMED`.
                  enum:
                    - Month
                    - Year
                    - Day
                    - Week
                  type: string
                startDate:
                  description: |
                    Start date of the first term, in YYYY-MM-DD format.
                  format: date
                  type: string
                termType:
                  description: |
                    Type of the first term. If the value of this field is `TERMED`, the first term has a predefined duration based on the value of the `period` field. If the value of this field is `EVERGREEN`, the first term does not have a predefined duration.
                  enum:
                    - TERMED
                    - EVERGREEN
                  type: string
              required:
                - termType
              type: object
            renewalSetting:
              description: |
                Specifies the type of the terms that follow the first term if the subscription is renewed. Only applicable if the type of the first term is `TERMED`.

                * `RENEW_WITH_SPECIFIC_TERM` - Each renewal term has a predefined duration. The first entry in `renewalTerms` specifies the duration of the second term of the subscription, the second entry in `renewalTerms` specifies the duration of the third term of the subscription, and so on. The last entry in `renewalTerms` specifies the ultimate duration of each renewal term.
                * `RENEW_TO_EVERGREEN` - The second term of the subscription does not have a predefined duration.
              enum:
                - RENEW_WITH_SPECIFIC_TERM
                - RENEW_TO_EVERGREEN
              type: string
            renewalTerms:
              description: |
                List of renewal terms of the subscription. Only applicable if the type of the first term is `TERMED` and the value of the `renewalSetting` field is `RENEW_WITH_SPECIFIC_TERM`.
              items:
                $ref: "#/components/schemas/RenewalTerm"
              type: array
          required:
            - initialTerm
          type: object
      title: createSubscription
      type: object
    PreviewOrderOrderAction:
      properties:
        addProduct:
          $ref: "#/components/schemas/PreviewOrderRatePlanOverride"
        cancelSubscription:
          $ref: "#/components/schemas/CancelSubscription"
        createSubscription:
          $ref: "#/components/schemas/PreviewOrderCreateSubscription"
        customFields:
          $ref: "#/components/schemas/OrderActionObjectCustomFields"
        ownerTransfer:
          $ref: "#/components/schemas/OwnerTransfer"
        removeProduct:
          $ref: "#/components/schemas/RemoveProduct"
        resume:
          $ref: "#/components/schemas/CreateOrderResume"
        suspend:
          $ref: "#/components/schemas/CreateOrderSuspend"
        termsAndConditions:
          $ref: "#/components/schemas/CreateOrderTermsAndConditions"
        triggerDates:
          description: |
            Container for the contract effective, service activation, and customer acceptance dates of the order action. 

            If the service activation date is set as a required field in Default Subscription Settings, skipping this field in a `CreateSubscription` order action of your JSON request will result in a `Pending` order and a `Pending Activation` subscription.

            If the customer acceptance date is set as a required field in Default Subscription Settings, skipping this field in a `CreateSubscription` order action of your JSON request will result in a `Pending` order and a `Pending Acceptance` subscription. If the service activation date field is at the same time required and skipped (or set as null), it will be a `Pending Activation` subscription.
          items:
            $ref: "#/components/schemas/TriggerDate"
          type: array
        type:
          description: |
            Type of order action.

            Unless the type of order action is `RenewSubscription`, you must use the corresponding field to provide information about the order action. For example, if the type of order action is `AddProduct`, you must set the `addProduct` field.

            Zuora returns an error if you set a field that corresponds to a different type of order action. For example, if the type of order action is `AddProduct`, Zuora returns an error if you set the `updateProduct` field.
          enum:
            - CreateSubscription
            - TermsAndConditions
            - AddProduct
            - UpdateProduct
            - RemoveProduct
            - RenewSubscription
            - CancelSubscription
            - OwnerTransfer
            - Suspend
            - Resume
          type: string
        updateProduct:
          $ref: "#/components/schemas/PreviewOrderRatePlanUpdate"
      required:
        - type
      type: object
    PreviewOrderPricingUpdate:
      properties:
        chargeModelData:
          $ref: "#/components/schemas/ChargeModelDataOverride"
        discount:
          $ref: "#/components/schemas/DiscountPricingUpdate"
        recurringFlatFee:
          $ref: "#/components/schemas/RecurringFlatFeePricingUpdate"
        recurringPerUnit:
          $ref: "#/components/schemas/RecurringPerUnitPricingUpdate"
        recurringTiered:
          $ref: "#/components/schemas/RecurringTieredPricingUpdate"
        recurringVolume:
          $ref: "#/components/schemas/RecurringVolumePricingUpdate"
        usageFlatFee:
          $ref: "#/components/schemas/UsageFlatFeePricingUpdate"
        usageOverage:
          $ref: "#/components/schemas/UsageOveragePricingUpdate"
        usagePerUnit:
          $ref: "#/components/schemas/UsagePerUnitPricingUpdate"
        usageTiered:
          $ref: "#/components/schemas/UsageTieredPricingUpdate"
        usageTieredWithOverage:
          $ref: "#/components/schemas/UsageTieredWithOveragePricingUpdate"
        usageVolume:
          $ref: "#/components/schemas/UsageVolumePricingUpdate"
      type: object
    PreviewOrderRatePlanOverride:
      description: |
        Rate plan associated with a subscription.
      properties:
        chargeOverrides:
          description: |
            List of charges associated with the rate plan.
          items:
            $ref: "#/components/schemas/PreviewOrderChargeOverride"
          type: array
        customFields:
          $ref: "#/components/schemas/RatePlanObjectCustomFields"
        productRatePlanId:
          description: |
            Internal identifier of the product rate plan that the rate plan is based on.
          type: string
        uniqueToken:
          description: |
            Unique identifier for the rate plan. This identifier enables you to refer to the rate plan before the rate plan has an internal identifier in Zuora.

            For instance, suppose that you want to use a single order to add a product to a subscription and later update the same product. When you add the product, you can set a unique identifier for the rate plan. Then when you update the product, you can use the same unique identifier to specify which rate plan to modify.
          maxLength: 50
          type: string
      required:
        - productRatePlanId
      title: ratePlan
      type: object
    PreviewOrderRatePlanUpdate:
      description: |
        Information about an order action of type `UpdateProduct`.
      properties:
        chargeUpdates:
          description: |
            Array of the JSON objects containing the information for a charge update in the `updateProduct` type of order action.

            When previewing an `updateProduct` order action, either the `chargeNumber` or `uniqueToken` field is required to specify the charge to update.
          items:
            $ref: "#/components/schemas/PreviewOrderChargeUpdate"
          type: array
        customFields:
          $ref: "#/components/schemas/RatePlanObjectCustomFields"
        ratePlanId:
          description: |
            The id of the rate plan to be updated. It can be the latest version or any history version id.
          type: string
        specificUpdateDate:
          description: |
            
            The date when the Update Product order action takes effect. This field is only applicable if there is already a future-dated Update Product order action on the subscription. The format of the date is yyyy-mm-dd.

            See [Update a Product on Subscription with Future-dated Updates](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AC_Orders_Tutorials/C_Update_a_Product_in_a_Subscription/Update_a_Product_on_Subscription_with_Future-dated_Updates) for more information about this feature.
          format: date
          type: string
        uniqueToken:
          description: |
            A unique string to represent the rate plan charge in the order. The unique token is used to perform multiple actions against a newly added rate plan. For example, if you want to add and update a product in the same order, you would assign a unique token to the product rate plan when added and use that token in future order actions.
          type: string
      title: updateProduct
      type: object
    PreviewOrderTriggerParams:
      description: |
        Specifies when a charge becomes active.
      properties:
        specificTriggerDate:
          description: |
            Date in YYYY-MM-DD format. Only applicable if the value of the `triggerEvent` field is `SpecificDate`. 

            While this field is applicable, if this field is not set, your `CreateSubscription` order action creates a `Pending` order and a `Pending Acceptance` subscription. If at the same time the service activation date is required and not set, a `Pending Activation` subscription is created.
          format: date
          type: string
        triggerEvent:
          description: |
            Condition for the charge to become active.

            If the value of this field is `SpecificDate`, use the `specificTriggerDate` field to specify the date when the charge becomes active.
          enum:
            - ContractEffective
            - ServiceActivation
            - CustomerAcceptance
            - SpecificDate
          type: string
      title: startDate
      type: object
    PreviewResult:
      description: The result of each type of preview. Returned only when the current request is preview call.
      properties:
        chargeMetrics:
          items:
            properties:
              charges:
                items:
                  $ref: "#/components/schemas/ChargePreviewMetrics"
                type: array
              subscriptionNumber:
                description: The number of the subscription that has been affected by this order. When creating a subscription, this value will not show if the subscription number was not specified in the request.
                type: string
            type: object
          type: array
        creditMemos:
          description: This field is only available if you have the Invoice Settlement feature enabled.
          items:
            properties:
              amount:
                type: number
              amountWithoutTax:
                type: number
              creditMemoItems:
                items:
                  $ref: "#/components/schemas/InvoiceItemPreviewResult"
                type: array
              targetDate:
                format: date
                type: string
              taxAmount:
                type: number
            type: object
          type: array
        invoices:
          items:
            properties:
              amount:
                type: number
              amountWithoutTax:
                type: number
              invoiceItems:
                items:
                  $ref: "#/components/schemas/InvoiceItemPreviewResult"
                type: array
              targetDate:
                format: date
                type: string
              taxAmount:
                type: number
            type: object
          type: array
        orderDeltaMetrics:
          description: |
            **Note:** As of Zuora Billing Release 306, Zuora has upgraded the methodologies for calculating metrics in [Orders](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders). The new methodologies are reflected in the following Order Delta Metrics objects. 
            * [Order Delta Mrr](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Delta_Metrics/Order_Delta_Mrr)
            * [Order Delta Tcv](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Delta_Metrics/Order_Delta_Tcv)
            * [Order Delta Tcb](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Delta_Metrics/Order_Delta_Tcb)

            It is recommended that all customers use the new [Order Delta Metrics](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Delta_Metrics/AA_Overview_of_Order_Delta_Metrics). If you are an existing [Order Metrics](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/AA_Overview_of_Orders/Key_Metrics_for_Orders) customer and want to migrate to Order Delta Metrics, submit a request at [Zuora Global Support](https://support.zuora.com/).
          properties:
            orderDeltaMrr:
              items:
                $ref: "#/components/schemas/OrderDeltaMrr"
              type: array
            orderDeltaTcb:
              items:
                $ref: "#/components/schemas/OrderDeltaTcb"
              type: array
            orderDeltaTcv:
              items:
                $ref: "#/components/schemas/OrderDeltaTcv"
              type: array
          type: object
        orderMetrics:
          description: |
            **Note:** As of Zuora Billing Release 306, Zuora has upgraded the methodologies for calculating metrics in [Orders](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders). The new methodologies are reflected in the following Order Delta Metrics objects.  
            * [Order Delta Mrr](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Delta_Metrics/Order_Delta_Mrr) 
            * [Order Delta Tcv](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Delta_Metrics/Order_Delta_Tcv) 
            * [Order Delta Tcb](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Delta_Metrics/Order_Delta_Tcb) 

            It is recommended that all customers use the new [Order Delta Metrics](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Order_Delta_Metrics/AA_Overview_of_Order_Delta_Metrics). If you are an existing [Order Metrics](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/AA_Overview_of_Orders/Key_Metrics_for_Orders) customer and want to migrate to Order Delta Metrics, submit a request at [Zuora Global Support](https://support.zuora.com/). 

            Whereas new customers, and existing customers not currently on [Order Metrics](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/AA_Overview_of_Orders/Key_Metrics_for_Orders), will no longer have access to Order Metrics, existing customers currently using Order Metrics will continue to be supported.
          items:
            properties:
              orderActions:
                items:
                  properties:
                    orderItems:
                      description: |
                        The `orderItems` nested field is only available to existing Orders customers who already have access to the field.

                        **Note:** The following Order Metrics have been deprecated. Any new customers who onboard on [Orders](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/AA_Overview_of_Orders) or [Orders Harmonization](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Orders_Harmonization/Orders_Harmonization) will not get these metrics.
                        * The Order ELP and Order Item objects 
                        * The "Generated Reason" and "Order Item ID" fields in the Order MRR, Order TCB, Order TCV, and Order Quantity objects

                        Existing Orders customers who have these metrics will continue to be supported.
                      items:
                        $ref: "#/components/schemas/OrderItem"
                      type: array
                    orderMetrics:
                      description: |
                        The container for order metrics.

                        **Note:** The following Order Metrics have been deprecated. Any new customers who onboard on [Orders](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/AA_Overview_of_Orders) or [Orders Harmonization](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Orders_Harmonization/Orders_Harmonization) will not get these metrics.
                        * The Order ELP and Order Item objects 
                        * The "Generated Reason" and "Order Item ID" fields in the Order MRR, Order TCB, Order TCV, and Order Quantity objects

                        Existing Orders customers who have these metrics will continue to be supported.
                      items:
                        $ref: "#/components/schemas/orderMetric"
                      type: array
                    sequence:
                      type: string
                    type:
                      type: string
                  type: object
                type: array
              subscriptionNumber:
                type: string
            type: object
          type: array
        rampMetrics:
          description: |
            **Note**: This field is only available if you have the Ramps feature enabled. The [Orders](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/AA_Overview_of_Orders) feature must be enabled before you can access the [Ramps](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Ramps_and_Ramp_Metrics/A_Overview_of_Ramps_and_Ramp_Metrics) feature. The Ramps feature is available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information coming October 2020.

            The ramp metrics.
          items:
            $ref: "#/components/schemas/OrderRampMetrics"
          type: array
      type: object
    PriceChangeParams:
      properties:
        priceChangeOption:
          description: |
            Specifies how Zuora changes the price of the charge each time the subscription renews.

            If the value of this field is `SpecificPercentageValue`, use the `priceIncreasePercentage` field to specify how much the price of the charge should change.
          enum:
            - NoChange
            - SpecificPercentageValue
            - UseLatestProductCatalogPricing
          type: string
        priceIncreasePercentage:
          description: |
            Specifies the percentage by which the price of the charge should change each time the subscription renews. Only applicable if the value of the `priceChangeOption` field is `SpecificPercentageValue`.
          minimum: -100
          type: number
      type: object
    PricingUpdate:
      properties:
        chargeModelData:
          $ref: "#/components/schemas/ChargeModelDataOverride"
        discount:
          $ref: "#/components/schemas/DiscountPricingUpdate"
        recurringFlatFee:
          $ref: "#/components/schemas/RecurringFlatFeePricingUpdate"
        recurringPerUnit:
          $ref: "#/components/schemas/RecurringPerUnitPricingUpdate"
        recurringTiered:
          $ref: "#/components/schemas/RecurringTieredPricingUpdate"
        recurringVolume:
          $ref: "#/components/schemas/RecurringVolumePricingUpdate"
        usageFlatFee:
          $ref: "#/components/schemas/UsageFlatFeePricingUpdate"
        usageOverage:
          $ref: "#/components/schemas/UsageOveragePricingUpdate"
        usagePerUnit:
          $ref: "#/components/schemas/UsagePerUnitPricingUpdate"
        usageTiered:
          $ref: "#/components/schemas/UsageTieredPricingUpdate"
        usageTieredWithOverage:
          $ref: "#/components/schemas/UsageTieredWithOveragePricingUpdate"
        usageVolume:
          $ref: "#/components/schemas/UsageVolumePricingUpdate"
      type: object
    PricingUpdateForEvergreen:
      properties:
        chargeModelData:
          $ref: "#/components/schemas/ChargeModelDataOverride"
        discount:
          $ref: "#/components/schemas/DiscountPricingUpdate"
        recurringFlatFee:
          $ref: "#/components/schemas/RecurringFlatFeePricingUpdate"
        recurringPerUnit:
          $ref: "#/components/schemas/RecurringPerUnitPricingUpdate"
        recurringTiered:
          $ref: "#/components/schemas/RecurringTieredPricingUpdate"
        recurringVolume:
          $ref: "#/components/schemas/RecurringVolumePricingUpdate"
        usageFlatFee:
          $ref: "#/components/schemas/UsageFlatFeePricingUpdate"
        usageOverage:
          $ref: "#/components/schemas/UsageOveragePricingUpdate"
        usagePerUnit:
          $ref: "#/components/schemas/UsagePerUnitPricingUpdate"
        usageTiered:
          $ref: "#/components/schemas/UsageTieredPricingUpdate"
        usageTieredWithOverage:
          $ref: "#/components/schemas/UsageTieredWithOveragePricingUpdate"
        usageVolume:
          $ref: "#/components/schemas/UsageVolumePricingUpdate"
      type: object
    ProcessingOptions:
      description: Invoice or Payment.
      properties:
        applicationOrder:
          description: |
            The priority order to apply credit memos and/or unapplied payments to an invoice. Possible item values are: `CreditMemo`, `UnappliedPayment`.

            **Note:**
              - This field is valid only if the `applyCredit` field is set to `true`.
              - If no value is specified for this field, the default priority order is used, ["CreditMemo", "UnappliedPayment"], to apply credit memos first and then apply unapplied payments.
              - If only one item is specified, only the items of the spedified type are applied to invoices. For example, if the value is `["CreditMemo"]`, only credit memos are used to apply to invoices.
          items:
            type: string
          type: array
        applyCredit:
          description: |
            Whether to automatically apply credit memos or unapplied payments, or both to an invoice.

            If the value is `true`, the credit memo or unapplied payment, or both will be automatically applied to the invoice. If no value is specified or the value is `false`, no action is taken.

            **Note:** This field is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information.
          type: boolean
        applyCreditBalance:
          description: Indicates if any credit balance on a customer's account is automatically applied to invoices. If no value is specified then this field defaults to false. This feature is not available if you have enabled the Invoice Settlement feature.
          type: boolean
        billingOptions:
          $ref: "#/components/schemas/BillingOptions"
        collectPayment:
          description: Indicates if the current request needs to collect payments. This value can not be 'true' when 'runBilling' flag is 'false'.
          type: boolean
        electronicPaymentOptions:
          description: Container for the electronic payment options.
          properties:
            paymentMethodId:
              description: Specifies an electronic payment method. It can be one that has already been associated with an invoice owner, or an orphan payment method, which is not associated with any invoice owner. For an orphan payment method, this operation will then associate it with the account that this order will be created under.
              type: string
          type: object
        runBilling:
          description: Indicates if the current request needs to generate an invoice. The invoice will be generated against all subscriptions included in this order.
          type: boolean
      type: object
    ProductFeatureObjectCustomFields:
      additionalProperties:
        description: |
          Custom fields of the Product Feature object. The name of each custom field has the form <code>*customField*__c</code>. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
      description: |
        Container for custom fields of a Product Feature object.
      title: productFeatureFieldsCustom
      type: object
    ProductObjectCustomFields:
      additionalProperties:
        description: |
          Custom fields of the Product object. The name of each custom field has the form <code>*customField*__c</code>. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
      description: |
        Container for custom fields of a Product object.
      title: productFieldsCustom
      type: object
    ProductObjectNSFields:
      description: |
        Container for Product fields provided by the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
      properties:
        IntegrationId__NS:
          description: |
            ID of the corresponding object in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        IntegrationStatus__NS:
          description: |
            Status of the product's synchronization with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        ItemType__NS:
          description: |
            Type of item that is created in NetSuite for the product. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          enum:
            - Inventory
            - Non Inventory
            - Service
          type: string
        SyncDate__NS:
          description: |
            Date when the product was synchronized with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
      title: productFieldsNS
      type: object
    ProductRatePlanChargeObjectCustomFields:
      additionalProperties:
        description: |
          Custom fields of the Product Rate Plan Charge object. The name of each custom field has the form <code>*customField*__c</code>. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
      description: |
        Container for custom fields of a Product Rate Plan Charge object.
      title: productRatePlanChargeFieldsCustom
      type: object
    ProductRatePlanChargeObjectNSFields:
      description: |
        Container for Product Rate Plan Charge fields provided by the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
      properties:
        Class__NS:
          description: |
            Class associated with the corresponding item in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        DeferredRevAccount__NS:
          description: |
            Deferrred revenue account associated with the corresponding item in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        Department__NS:
          description: |
            Department associated with the corresponding item in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        IncludeChildren__NS:
          description: |
            Specifies whether the corresponding item in NetSuite is visible under child subsidiaries. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          enum:
            - Yes
            - No
          type: string
        IntegrationId__NS:
          description: |
            ID of the corresponding object in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        IntegrationStatus__NS:
          description: |
            Status of the product rate plan charge's synchronization with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        ItemType__NS:
          description: |
            Type of item that is created in NetSuite for the product rate plan charge. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          enum:
            - Inventory
            - Non Inventory
            - Service
          type: string
        Location__NS:
          description: |
            Location associated with the corresponding item in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        RecognizedRevAccount__NS:
          description: |
            Recognized revenue account associated with the corresponding item in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        RevRecEnd__NS:
          description: |
            End date condition of the corresponding item in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          enum:
            - Charge Period Start
            - Rev Rec Trigger Date
            - Use NetSuite Rev Rec Template
          type: string
        RevRecStart__NS:
          description: |
            Start date condition of the corresponding item in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          enum:
            - Charge Period Start
            - Rev Rec Trigger Date
            - Use NetSuite Rev Rec Template
          type: string
        RevRecTemplateType__NS:
          description: |
            Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        Subsidiary__NS:
          description: |
            Subsidiary associated with the corresponding item in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        SyncDate__NS:
          description: |
            Date when the product rate plan charge was synchronized with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
      title: productRatePlanChargeFieldsNS
      type: object
    ProductRatePlanObjectCustomFields:
      additionalProperties:
        description: |
          Custom fields of the Product Rate Plan object. The name of each custom field has the form <code>*customField*__c</code>. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
      description: |
        Container for custom fields of a Product Rate Plan object.
      title: productRatePlanFieldsCustom
      type: object
    ProductRatePlanObjectNSFields:
      description: |
        Container for Product Rate Plan fields provided by the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
      properties:
        BillingPeriod__NS:
          description: |
            Billing period associated with the corresponding item in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          enum:
            - Monthly
            - Quarterly
            - Annual
            - Semi-Annual
          type: string
        Class__NS:
          description: |
            Class associated with the corresponding item in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        Department__NS:
          description: |
            Department associated with the corresponding item in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        IncludeChildren__NS:
          description: |
            Specifies whether the corresponding item in NetSuite is visible under child subsidiaries. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          enum:
            - Yes
            - No
          type: string
        IntegrationId__NS:
          description: |
            ID of the corresponding object in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        IntegrationStatus__NS:
          description: |
            Status of the product rate plan's synchronization with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        ItemType__NS:
          description: |
            Type of item that is created in NetSuite for the product rate plan. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          enum:
            - Inventory
            - Non Inventory
            - Service
          type: string
        Location__NS:
          description: |
            Location associated with the corresponding item in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        MultiCurrencyPrice__NS:
          description: |
            Multi-currency price associated with the corresponding item in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        Price__NS:
          description: |
            Price associated with the corresponding item in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        Subsidiary__NS:
          description: |
            Subsidiary associated with the corresponding item in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        SyncDate__NS:
          description: |
            Date when the product rate plan was synchronized with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
      title: productRatePlanFieldsNS
      type: object
    ProvisionEntityResponseType:
      properties:
        success:
          description: Returns `true` if the request is successful.
          type: boolean
      type: object
    ProxyActionamendRequest:
      example:
        requests:
          - Amendments:
              - ContractEffectiveDate: 2018-07-20
                Description: 100 seats of product and flat fee for phone support
                Name: Add premium product
                RatePlanData:
                  RatePlan:
                    ProductRatePlanId: 2c92c0f957034698015707751d7e20b9
                  RatePlanChargeData:
                    - RatePlanCharge:
                        ProductRatePlanChargeId: 2c92c0f957034698015707751dff20ce
                        Quantity: 100
                    - RatePlanCharge:
                        ProductRatePlanChargeId: 2c92c0f857033a46015707a16c9e0274
                Status: Completed
                SubscriptionId: 2c92c0f9647e2f5001647e51728d7995
                Type: NewProduct
            PreviewOptions:
              EnablePreviewMode: false
      properties:
        requests:
          description: |
            The value of this field must be an array that contains a single AmendRequest object. To specify multiple Amendment objects, use the `Amendments` field of the AmendRequest object.
          items:
            $ref: "#/components/schemas/AmendRequest"
          type: array
      type: object
    ProxyActionamendResponse:
      properties:
        results:
          description: ""
          items:
            $ref: "#/components/schemas/AmendResult"
          type: array
      type: object
    ProxyActioncreateRequest:
      example:
        objects:
          - AccountingCode: Accounts Receivable
            AdjustmentDate: 2016-10-20
            Amount: 1.2
            Comment: this is comments
            InvoiceId: 2c93808457d787030157e03248c75142
            InvoiceNumber: INV00000001
            ReferenceId: refid-1476935174845
            SourceId: 2c93808457d787030157e03248c95144
            SourceType: InvoiceDetail
            Type: Credit
        type: InvoiceItemAdjustment
      properties:
        objects:
          description: ""
          items:
            $ref: "#/components/schemas/zObject"
          type: array
        type:
          description: ""
          type: string
      required:
        - objects
        - type
      type: object
    ProxyActiondeleteRequest:
      example:
        ids:
          - 2c93808457d787030157e031fcd34e19
        type: ProductRatePlanCharge
      properties:
        ids:
          description: |
            A list of one or more IDs for the objects you want to delete.
          items:
            type: string
          type: array
        type:
          description: |
            The type of object that you are deleting.
          type: string
      required:
        - type
        - ids
      type: object
    ProxyActionexecuteRequest:
      example:
        ids:
          - 2c93808457d787030157e031d5844c53
        synchronous: false
        type: InvoiceSplit
      properties:
        ids:
          description: |
            The ID of the object. **Values:** a valid InvoiceSplit object ID.
          items:
            type: string
          type: array
        synchronous:
          description: |
            Indicates if the call is synchronous or asynchronous. **Values:** `false`
          type: boolean
        type:
          description: |
            Specifies the type of executed item. 
          enum:
            - InvoiceSplit
          type: string
      required:
        - type
        - ids
        - synchronous
      type: object
    ProxyActiongenerateRequest:
      example:
        objects:
          - AccountId: 2c93808457d787030157e0306be53a75
            InvoiceDate: 2016-10-20
            TargetDate: 2016-10-20
        type: Invoice
      properties:
        objects:
          description: ""
          items:
            $ref: "#/components/schemas/zObject"
          type: array
        type:
          description: ""
          enum:
            - Invoice
          type: string
      required:
        - objects
        - type
      type: object
    ProxyActionqueryMoreRequest:
      example:
        queryLocator: 2c92c0f9602fb240016049ac7e0b47e7-2000
      properties:
        queryLocator:
          description: ""
          type: string
      required:
        - queryLocator
      type: object
    ProxyActionqueryMoreResponse:
      properties:
        done:
          description: ""
          type: boolean
        queryLocator:
          description: ""
          type: string
        records:
          description: ""
          items:
            $ref: "#/components/schemas/zObject"
          type: array
        size:
          description: ""
          format: int32
          type: integer
      type: object
    ProxyActionqueryRequest:
      example:
        queryString: select AccountId, AccountingCode, AdjustmentDate, AdjustmentNumber, Amount, CancelledById, CancelledDate, Comment, CreatedById, CreatedDate, InvoiceId, InvoiceItemName, InvoiceNumber, ReferenceId, ServiceEndDate, ServiceStartDate, SourceId, SourceType, Status, TransferredToAccounting, Type, UpdatedById, UpdatedDate, ReasonCode from InvoiceItemAdjustment where Id = '2c93808457d787030157e0324aea5158'
      properties:
        conf:
          description: ""
          properties:
            batchSize:
              description: |
                Defines the batch size of the query result. The range is 1 - 2000 (inclusive). If a value higher than 2000 is submitted, only 2000 results are returned.
              type: integer
          type: object
        queryString:
          description: |
            [ZOQL](https://knowledgecenter.zuora.com/DC_Developers/K_Zuora_Object_Query_Language) expression that specifies the object to query, the fields to retrieve, and any filters.

            **Note:** When querying one time charges from ProductRatePlanCharge, you need to specify the `ChargeType` value as `One-Time` rather than `OneTime`.
          type: string
      required:
        - queryString
      type: object
    ProxyActionqueryResponse:
      properties:
        done:
          description: ""
          type: boolean
        queryLocator:
          description: ""
          type: string
        records:
          description: ""
          items:
            $ref: "#/components/schemas/zObject"
          type: array
        size:
          description: ""
          format: int32
          type: integer
      type: object
    ProxyActionsubscribeRequest:
      example:
        subscribes:
          - Account:
              AccountNumber: A00000085
              AutoPay: false
              Batch: Batch1
              BillCycleDay: 1
              Currency: USD
              Name: West Corporation
              PaymentTerm: Due Upon Receipt
            BillToContact:
              Address1: 312 2nd Ave W
              City: Seattle
              Country: United States
              FirstName: Sarah
              LastName: Smith
              PostalCode: "98119"
              State: Washington
              WorkEmail: sarah@example.com
            PaymentMethod:
              CreditCardAddress1: 312 2nd Ave W
              CreditCardCity: Seattle
              CreditCardCountry: United States
              CreditCardExpirationMonth: 12
              CreditCardExpirationYear: 2020
              CreditCardHolderName: Ms Sarah Smith
              CreditCardNumber: "4111111111111111"
              CreditCardPostalCode: "98119"
              CreditCardState: Washington
              CreditCardType: Visa
              Type: CreditCard
            SubscribeOptions:
              GenerateInvoice: true
              ProcessPayments: false
            SubscriptionData:
              RatePlanData:
                - RatePlan:
                    ProductRatePlanId: 2c92c0f966537bf001666218919620cc
                  RatePlanChargeData:
                    - RatePlanCharge:
                        ChargeModel: Discount-Percentage
                        DiscountPercentage: "6.75"
                        ProductRatePlanChargeId: 2c92c0f866536da301666222643809b4
                        Quantity: 200
              Subscription:
                AutoRenew: true
                ContractAcceptanceDate: 2019-02-15
                ContractEffectiveDate: 2019-02-15
                InitialTerm: 12
                RenewalTerm: 6
                ServiceActivationDate: 2019-02-15
                TermType: TERMED
      properties:
        subscribes:
          description: ""
          items:
            $ref: "#/components/schemas/SubscribeRequest"
          type: array
      required:
        - subscribes
      type: object
    ProxyActionupdateRequest:
      example:
        objects:
          - AccountNumber: AN_1476935163869
            AutoPay: true
            Batch: Batch1
            BillCycleDay: 1
            BillToId: 2c93808457d787030157e03220684fac
            CrmId: crmid
            Currency: USD
            DefaultPaymentMethodId: 2c93808457d787030157e03220ec4fad
            Id: 2c93808457d787030157e0321fdf4fab
            InvoiceTemplateId: 2c93808457d787030157e03208864f97
            Name: AC_1476935163869
            Notes: this is notes
            PaymentTerm: Due Upon Receipt
            SoldToId: 2c93808457d787030157e03220684fac
            Status: Active
        type: Account
      properties:
        objects:
          description: ""
          items:
            $ref: "#/components/schemas/zObject_update"
          type: array
        type:
          description: ""
          type: string
      required:
        - objects
        - type
      type: object
    ProxyBadRequestResponse:
      properties:
        Errors:
          items:
            properties:
              Code:
                description: ""
                type: string
              Message:
                description: ""
                type: string
            type: object
          type: array
        Success:
          description: ""
          type: boolean
      type: object
    ProxyCreateAccount:
      allOf:
        - properties:
            AccountNumber:
              description: |
                Unique account number assigned to the account. **Character limit**: 50 **Values**: one of the following:

                - null to auto-generate
                - a string of 50 characters or fewer that doesn't begin with the default account number prefix
              type: string
            AdditionalEmailAddresses:
              description: "List of additional email addresses to receive emailed invoices. **Character limit**: 120 **Values**: comma-separated list of email addresses "
              type: string
            AllowInvoiceEdit:
              description: |2-
                 Indicates if associated invoices can be edited.
                **Character limit**: 5 **Values**: `true`, `false` (default if left null) 
              type: boolean
            AutoPay:
              description: |2-
                 Indicates if future payments are automatically collected when they're due during a Payment Run.
                **Character limit**: 5 **Values**: `true`, `false` (default) 
              type: boolean
            Batch:
              description: |2-
                 Organizes your customer accounts into groups to optimize your billing and payment operations. Required if use the Subscribe call.
                **Character limit**: 20 **Values**:any system-defined batch (`Batch1` - `Batch50 `or by name). 
              type: string
            BcdSettingOption:
              description: "Billing cycle day setting option. **Character limit**: 9 **Values**: `AutoSet`, `ManualSet` "
              type: string
            BillCycleDay:
              description: "Billing cycle day (BCD) on which bill runs generate invoices for the account. **Character limit**: 2 **Values**: any activated system-defined bill cycle day (`1` - `31`) "
              format: int32
              type: integer
            BillToId:
              description: "ID of the person to bill for the account. This field is only required if the `Status` field is set to `Active`. **Character limit**: 32 **Values**: a valid contact ID for the account "
              type: string
            CrmId:
              description: "CRM account ID for the account. A CRM is a customer relationship management system, such as Salesforce.com. **Character limit**: 100 **Values**: a string of 100 characters or fewer "
              type: string
            Currency:
              description: " Currency that the customer is billed in. "
              type: string
            CustomerServiceRepName:
              description: "Name of the account's customer service representative, if applicable. **Character limit**: 50 **Values**: a string of 50 characters or fewer "
              type: string
            DefaultPaymentMethodId:
              description: "ID of the default payment method for the account. This field is only required if the `AutoPay` field is set to `true`. **Character limit**: 32 **Values**: a valid ID for an existing payment method "
              type: string
            InvoiceDeliveryPrefsEmail:
              description: "Indicates if the customer wants to receive invoices through email.  **Character limit**: 5 **Values**: `true`, `false` (default if left null) "
              type: boolean
            InvoiceDeliveryPrefsPrint:
              description: "Indicates if the customer wants to receive printed invoices, such as through postal mail. **Character limit**: 5 **Values**: `true`, `false` (default if left null) "
              type: boolean
            InvoiceTemplateId:
              description: "The ID of the invoice template. Each customer account can use a specific invoice template for invoice generation. **Character limit**: 32 **Values**: a valid template ID configured in Zuora Billing Settings "
              type: string
            Name:
              description: "Name of the account as displayed in the Zuora UI. **Character limit**: 255 **Values**: a string of 255 characters or fewer "
              type: string
            Notes:
              description: " Comments about the account. **Character limit**: 65,535 **Values**: a string of 65,535 characters "
              type: string
            ParentId:
              description: "Identifier of the parent customer account for this Account object. Use this field if you have customer hierarchy enabled. **Character limit**: 32 **Values**: a valid account ID "
              type: string
            PaymentGateway:
              description: |
                Gateway used for processing electronic payments and refunds. This field is only required if there is no default payment gateway is defined in the tenant. **Character limit**: 40 **Values**: one of the following:

                - a valid configured gateway name
                - Null to inherit the default value set in Zuora Payment Settings
              type: string
            PaymentTerm:
              description: "Indicates when the customer pays for subscriptions. **Character limit**: 100 **Values**: a valid, active payment term defined in the web-based UI administrative settings "
              type: string
            PurchaseOrderNumber:
              description: "The number of the purchase order associated with this account. Purchase order information generally comes from customers. **Character limit**: 100 **Values**: a string of 100 characters or fewer "
              type: string
            SalesRepName:
              description: "The name of the sales representative associated with this account, if applicable. **Character limit**: 50 **Values**: a string of 50 characters or fewer "
              type: string
            SoldToId:
              description: "ID of the person who bought the subscription associated with the account. This field is only required if the `Status` field is set to `Active`. **Character limit**: 32 **Values**: a valid contact ID for the account "
              type: string
            Status:
              description: |
                Status of the account in the system.
              enum:
                - Draft
                - Active
                - Canceled
              maxLength: 8
              type: string
            TaxCompanyCode:
              description: |2-
                 Unique code that identifies a company account in Avalara. Use this field to calculate taxes based on origin and sold-to addresses in Avalara.
                This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).

                **Character limit**: 50 **Values**: a valid company code 
              type: string
            TaxExemptCertificateID:
              description: "ID of your customer's tax exemption certificate. **Character limit**: 32 **Values**: a string of 32 characters or fewer "
              type: string
            TaxExemptCertificateType:
              description: "Type of the tax exemption certificate that your customer holds.  **Character limit**: 32 **Values**: a string of 32 characters or fewer "
              type: string
            TaxExemptDescription:
              description: "Description of the tax exemption certificate that your customer holds. **Character limit**: 500 **Values**: a string of 500 characters or fewer "
              type: string
            TaxExemptEffectiveDate:
              description: "Date when the the customer's tax exemption starts. **Character limit**: 29 **Version notes**: requires Zuora Tax "
              format: date
              type: string
            TaxExemptExpirationDate:
              description: "Date when the customer's tax exemption certificate expires  **Character limit**: 29 **Version notes**: requires Zuora Tax "
              format: date
              type: string
            TaxExemptIssuingJurisdiction:
              description: "Indicates the jurisdiction in which the customer's tax exemption certificate was issued. **Character limit**: 32 **Values**: a string of 32 characters or fewer "
              type: string
            TaxExemptStatus:
              description: |2
                 Status of the account's tax exemption. This field is only required if you use Zuora Tax. This field is not available if you do not use Zuora Tax.
                **Character limit**: 19 **Values**: one of the following:

                - `Yes`
                - `No`
                - `PendingVerification`
              type: string
            VATId:
              description: |2-
                 EU Value Added Tax ID.
                This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).

                **Character limit**: 25 **Values**: a valid Value Added Tax ID 
              type: string
            communicationProfileId:
              description: "Associates the account with a specified communication profile. **Character limit**: 32 **Values**: a valid communication profile ID "
              type: string
          required:
            - BillCycleDay
            - Currency
            - Name
            - Status
          type: object
        - $ref: "#/components/schemas/AccountObjectNSFields"
        - $ref: "#/components/schemas/AccountObjectCustomFields"
      example:
        AccountNumber: AN_1476935163869
        AutoPay: false
        Batch: Batch1
        BillCycleDay: 1
        CrmId: crmid
        Currency: USD
        InvoiceTemplateId: 2c93808457d787030157e03208864f97
        Name: AC_1476935163869
        Notes: this is notes
        PaymentTerm: Due Upon Receipt
        Status: Draft
    ProxyCreateBillRun:
      example:
        AutoEmail: "false"
        AutoPost: "false"
        AutoRenewal: "false"
        Batch: Batch1
        BillCycleDay: "2"
        ChargeTypeToExclude: OneTime, Usage
        InvoiceDate: 2017-02-04
        NoEmailForZeroAmountInvoice: "false"
        TargetDate: 2017-02-04
      properties:
        AccountId:
          description: |
            ID of the account used for single account bill run.

            This field is only required if you create ad hoc bill run for a single customer account.

            **Character limit:** 32
          type: string
        AutoEmail:
          default: false
          description: |
            Determines whether to auto send email or not by this bill run once the bill run completes.

            **Note:** You must enable the [Support Bill Run Auto-Post Billing](https://knowledgecenter.zuora.com/CB_Billing/Billing_Settings/Define_Billing_Rules) rule to pass this field.
          type: boolean
        AutoPost:
          default: false
          description: |
            Determines whether to auto post bill run or not once the bill run completes.

            **Note:** You must enable the [Support Bill Run Auto-Post Billing](https://knowledgecenter.zuora.com/CB_Billing/Billing_Settings/Define_Billing_Rules) rule to pass this field.
          type: boolean
        AutoRenewal:
          default: false
          description: |
            Determines whether to auto renew subscription or not by this bill run once the bill run completes.
          type: boolean
        Batch:
          description: |
            Batch of accounts for this bill run. 

            When creating ad hoc bill run for multiple customer accounts, this field is only required if the `BillCycleDay`
             field is not specified.

            **Character limit:** 20

            **Values:** AllBatches or Batchn where n is a number between 1 and 50.
          type: string
        BillCycleDay:
          description: |
            The day of the bill cycle.

            When creating ad hoc bill run for multiple customer accounts, this field is only required if the `Batch` field is not specified.

            **Character limit:** 32

            **Values:** `AllBillCycleDays` or 01 - 31.
          type: string
        ChargeTypeToExclude:
          description: |
            Charge type or types to be excluded, separated with comma.

            **Possible Values:** `OneTime`, `Recurring`, `Usage`, or a combination of these values. 

            **Character limit:** 50
          type: string
        InvoiceDate:
          description: |
            Invoice date for this bill run.

            **Character limit:** 29
          format: date
          type: string
        NoEmailForZeroAmountInvoice:
          default: false
          description: |
            Determines whether to suppress email for invoices with zero total or not for this bill run once the bill run completes. (Do not email invoices with 0 Invoice Total).
          type: boolean
        TargetDate:
          description: |
            Target date for this bill run. See [Create Bill Run](https://knowledgecenter.zuora.com/CB_Billing/J_Billing_Operations/G_Bill_Runs/Creating_Bill_Runs) for more information.

            **Character limit:** 29
          format: date
          type: string
      required:
        - InvoiceDate
        - TargetDate
      type: object
    ProxyCreateContact:
      allOf:
        - properties:
            AccountId:
              description: |2-
                 The Zuora account ID associated with this contact. This field is not required when you use the Subscribe call. This field is required for all other calls.
                **Character limit: **32 **Values: **a valid account ID 
              type: string
            Address1:
              description: |2-
                 The first line of the contact's address, which is often a street address or business name.
                **Character limit**: 255 **Values**: a string of 255 characters or fewer 
              type: string
            Address2:
              description: |2-
                 The second line of the contact's address.
                **Character limit**: 255 **Values**: a string of 255 characters or fewer 
              type: string
            City:
              description: |2-
                 The city of the contact's address.
                **Character limit**: 40 **Values: **a string of 40 characters or fewer 
              type: string
            Country:
              description: " The country of the contact's address. "
              type: string
            County:
              description: |2-
                 The county. May optionally be used by Zuora Tax to calculate county tax.
                **Character limit**: 32 **Values**: a string of 32 characters or fewer 
              type: string
            Description:
              description: |2-
                 A description for the contact.
                **Character limit**: 100 **Values**: a string of 100 characters or fewer 
              type: string
            Fax:
              description: |2-
                 The contact's fax number.
                **Character limit**: 40 **Values**: a string of 40 characters or fewer 
              type: string
            FirstName:
              description: |2-
                 The contact's first name.
                **Character limit**: 100 **Values**: a string of the contact's first name 
              type: string
            HomePhone:
              description: |2-
                 The contact's home phone number.
                **Character limit**: 40 **Values**: a string of 40 characters or fewer 
              type: string
            LastName:
              description: |2-
                 The contact's last name.
                **Character limit**: 100 **Values**: a string of 100 characters or fewer 
              type: string
            MobilePhone:
              description: |2-
                 The contact's mobile phone number.
                **Character limit**: 40 **Values**: a string of 40 characters or fewer 
              type: string
            NickName:
              description: |2-
                 A nickname for the contact.
                **Character limit**: 100 **Values**: a string of 100 characters or fewer 
              type: string
            OtherPhone:
              description: |2-
                 An additional phone number for the contact.
                **Character limit**: 40 **Values**: a string of 40 characters or fewer 
              type: string
            OtherPhoneType:
              description: "The type of the `OtherPhone`. **Character limit**: 20 **Values**: `Work`, `Mobile`, `Home`, `Other` "
              type: string
            PersonalEmail:
              description: |2-
                 The contact's personal email address.
                **Character limit**: 80 **Values**: a string of 80 characters or fewer 
              type: string
            PostalCode:
              description: |2-
                 The zip code for the contact's address.
                **Character limit:** 20 **Values: **a string of 20 characters or fewer 
              type: string
            State:
              description: " The state or province of the contact's address. "
              type: string
            TaxRegion:
              description: "If using Zuora Tax rules "
              type: string
            WorkEmail:
              description: |2-
                 The contact's business email address.
                **Character limit**: 80 **Values**: a string of 80 characters or fewer 
              type: string
            WorkPhone:
              description: |2-
                 The contact's business phone number.
                **Character limit**: 40 **notes**: -- **Values**: a string of 40 characters or fewer 
              type: string
          required:
            - AccountId
            - FirstName
            - LastName
          type: object
        - $ref: "#/components/schemas/ContactObjectCustomFields"
      example:
        AccountId: 2c93808457d787030157e0321fdf4fab
        Address1: 312 2nd Ave W
        City: Seattle
        Country: United States
        Description: desc
        Fax: "123456"
        FirstName: FN1476935164020
        HomePhone: "86123456789"
        LastName: LN1476935164020
        MobilePhone: "8613312345678"
        NickName: this is nick name
        OtherPhone: "11111111111111111"
        OtherPhoneType: Work
        PersonalEmail: home@example.com
        PostalCode: "98119"
        State: Washington
        TaxRegion: CA
        WorkEmail: work@example.com
    ProxyCreateCreditBalanceAdjustment:
      allOf:
        - properties:
            AccountingCode:
              description: |
                An active accounting code in your Zuora [Chart of Accounts](https://knowledgecenter.zuora.com/CB_Billing/W_Billing_and_Payments_Settings/V_Configure_Accounting_Codes/D_Set_Up_Chart_of_Accounts).

                The [accounting code](https://knowledgecenter.zuora.com/BC_Subscription_Management/Product_Catalog/A_Product_Catalog_Concepts/Accounting_Codes) for the credit balance adjustment. Typically, an accounting code for a credit balance adjustment maps to a bank account in your accounting system.
              maxLength: 100
              type: string
            AdjustmentDate:
              description: |
                The date when the credit balance adjustment is applied.

                With the Future Dated Credit Balance Adjustment feature enabled, you can use this field to specify when the credit balance adjustment is applied. If not specified, the value defaults to the latter date of the date when the API operation is called and the invoice date.

                With the Future Dated Credit Balance Adjustment feature disabled, if no value is specified for this field, the value defaults to the date when the API operation is called. If you specify a value for this field, the value must be the date when the API operation is called.
              format: date
              maxLength: 29
              minLength: 0
              type: string
            Amount:
              description: |
                The amount of the adjustment.
              format: double
              type: number
            Comment:
              description: |
                Your comments about the credit balance adjustment.
              maxLength: 255
              type: string
            ReasonCode:
              description: |
                A code identifying the reason for the transaction. Must be an existing [reason code](https://knowledgecenter.zuora.com/CB_Billing/K_Payment_Operations/Reason_Codes_for_Payment_Operations) or empty. If you do not specify a value, Zuora uses the default reason code.
              maxLength: 32
              type: string
            ReferenceId:
              description: |
                The ID of the payment that the credit balance adjustment is for.
              maxLength: 100
              type: string
            SourceTransactionId:
              description: |
                The ID of the object that the credit balance adjustment is applied to. You must specify a value for either the `SourceTransactionId` field or the `SourceTransactionNumber` field.

                The value of this field must be an invoice ID.
              maxLength: 32
              type: string
            SourceTransactionNumber:
              description: |
                The number of the object that the credit balance adjustment is applied to. You must specify a value for either the `SourceTransactionId` field or the `SourceTransactionNumber` field.

                The value of this field must be an invoice number.
              maxLength: 50
              type: string
            Type:
              description: |
                Whether the credit balance adjustment increases or decrease the amount of the credit balance.
              enum:
                - Decrease
                - Increase
              type: string
          required:
            - Amount
            - Type
          type: object
        - $ref: "#/components/schemas/CreditBalanceAdjustmentObjectNSFields"
        - $ref: "#/components/schemas/CreditBalanceAdjustmentObjectCustomFields"
      example:
        Amount: 60
        Comment: Transfer $60.00 from a negative invoice to the account balance
        SourceTransactionNumber: INV00000420
        Type: Increase
    ProxyCreateExport:
      example:
        Format: csv
        Name: test_Export_1476935164445
        Query: select * from account
        Status: Processing
        Zip: true
      properties:
        ConvertToCurrencies:
          description: |2-
             The currencies that you want to convert transaction amounts into. You can specify any number of currencies. Specify the currencies using their Foreign Currency Conversion enabled to use this field.
            **Character limit**: **Values**: a list of valid currency codes 
          type: string
        Encrypted:
          description: |2-
             Exports a secure version of encrypted data source fields. such as the AchAccountNumber field of the PaymentMethod object and the DefaultPaymentMethod data souce objects.
            **Character limit**: 5 **Values:** true, false 
          type: boolean
        FileId:
          description: |2-
             The ID of the file generated by an export query. This file is automatically generated when an Export object is created. Use this file ID with [Get files](https://www.zuora.com/developer/api-reference/#operation/GET_Files) to download the export file.
            **Character limit**: 32 **Values**: automatically generated 
          type: string
        Format:
          description: |2-
             The format that you want the export file to use.
            **Character limit**: 5 
          enum:
            - csv
            - html
            - Excel
          type: string
        Name:
          description: |2-
             The name of the export.
            **Character limit**: 255 **Values**: a string of 255 characters or fewer 
          type: string
        Query:
          description: |
            [Export ZOQL](https://knowledgecenter.zuora.com/DC_Developers/M_Export_ZOQL) query.
          type: string
        Size:
          description: |2-
             The number of records or rows exported. This field value is null until the export status is Completed.
            **Character limit**: **Values**: automatically generated 
          format: int32
          type: integer
        Status:
          description: |2
             The status of the export. Type: string (enum) **Character limit**: 10 **Values**: automatically generated to be one of the following values:

            - Pending
            - Processing
            - Completed
            - Canceled
            - Failed
          type: string
        StatusReason:
          description: |2-
             The reason for the given status. Use this information to help ascertain why an export failed.
            **Character limi**t: 255 **Values**: automatically generated 
          type: string
        Zip:
          description: |2-
             Indicates if you want the resulting export file to be compressed into a zip file.
            **Character limit**: **Values**: true, false (default) 
          type: boolean
      required:
        - Format
        - Query
      type: object
    ProxyCreateFeature:
      allOf:
        - properties:
            Description:
              description: |
                Description of the feature.
              maxLength: 1000
              type: string
            FeatureCode:
              description: |
                Unique code of the feature.
              maxLength: 255
              type: string
            Name:
              description: |
                Name of the feature.
              maxLength: 255
              type: string
            Status:
              default: Active
              description: |
                Status of the feature.
              enum:
                - Active
                - Inactive
              type: string
          required:
            - Name
            - FeatureCode
          type: object
        - $ref: "#/components/schemas/FeatureObjectCustomFields"
      example:
        Description: An experimental feature for early adopters
        FeatureApprover__c: sally@example.com
        FeatureCode: F017
        Name: Experimental Feature
        Status: Active
    ProxyCreateInvoiceAdjustment:
      allOf:
        - properties:
            AccountId:
              description: |2-
                 The ID of the account that owns the invoice.
                **Character limit**: 32 **Values**: inherited from Account.ID for the invoice owner 
              type: string
            AccountingCode:
              description: "The accounting code for the invoice adjustment. "
              type: string
            AdjustmentDate:
              description: |2-
                 The date when the invoice adjustment is applied. This date must be the same as the invoice's date or later.
                **Character limit**: 29 **Values**: Leave null to automatically generate the current date 
              format: date
              type: string
            AdjustmentNumber:
              description: |2-
                 A unique string to identify an individual invoice adjustment.
                **Character limit**: 255 **Values**: automatically generated 
              type: string
            Amount:
              description: |2-
                 The amount of the invoice adjustment.
                **Character limit**: 16 **Values**: a valid currency amount 
              format: double
              type: number
            Comments:
              description: |2-
                 Use this field to record comments about the invoice adjustment.
                **Character limit**: 255 **Values**: a string of 255 characters or fewer 
              type: string
            CustomerName:
              description: |2-
                 The name of the account that owns the associated invoice.
                **Character limit**: 50 **Values**: inherited from Account.Name 
              type: string
            CustomerNumber:
              description: |2-
                 The unique account number of the customer's account.
                **Character limit**: 70 **Values**: inherited from Account.AccountNumber 
              type: string
            ImpactAmount:
              description: |2-
                 The amount that changes the balance of the associated invoice.
                **Character limit**: 16 **Values**: automatically calculated 
              format: double
              type: number
            InvoiceId:
              description: |2-
                 The ID of the invoice associated with the adjustment. This field is only required if you don't specify a value for the `InvoiceNumber` field.
                **Character limit**: 32 **Values**: a valid invoice ID 
              type: string
            InvoiceNumber:
              description: |2-
                 The unique identification number for the associated invoice. This field is only required if you don't specify a value for the `InvoiceId` field.
                **Character limit**: 32 **Values**: a valid invoice number 
              type: string
            ReasonCode:
              description: |2-
                 A code identifying the reason for the transaction. Must be an existing reason code or empty. If you do not specify a value, Zuora uses the default reason code.
                **Character limit**: 32 **V****alues**: a valid reason code 
              type: string
            ReferenceId:
              description: |2-
                 A code to reference an object external to Zuora. For example, you can use this field to reference a case number in an external system.
                **Character limit**: 100 **Values**: a string of 100 characters or fewer 
              type: string
            Status:
              description: |2-
                 The status of the invoice adjustment. This field is only required in the Query call, but is automatically generated in other calls.
                **Character limit**: 9 **Values**: `Canceled`, `Processed` 
              type: string
            Type:
              description: |2-
                 Indicates whether the adjustment credits or debits the invoice amount.
                **Character limit**: 6 **Values**: `Credit`, `Charge` 
              type: string
          required:
            - Amount
            - Type
          type: object
        - $ref: "#/components/schemas/InvoiceAdjustmentObjectCustomFields"
      example:
        AccountingCode: Accounts Receivable
        AdjustmentDate: 2016-10-20
        Amount: 1.2
        Comments: this is comments
        InvoiceId: 2c93808457d787030157e030d10f3f64
        InvoiceNumber: INV00000001
        ReferenceId: refid-1476935078657
        Type: Credit
    ProxyCreateInvoicePayment:
      example:
        Amount: 10
        InvoiceId: 2c93808457d787030157e02deadb1b6d
        PaymentId: 2c93808457d787030157e02de5fc1b57
      properties:
        Amount:
          description: |2-
             The amount of the payment.
            **Character limit**: 16 **Values**: a valid currency amount 
          format: double
          type: number
        InvoiceId:
          description: |2-
             The unique ID of the invoice associated with this invoice payment.
            **Character limit**: 32 **Values**: a valid invoice ID 
          type: string
        PaymentId:
          description: |2-
             The unique ID of the payment associated with this invoice payment.
            **Character limit**: 32 **V****alues**: a valid payment ID 
          type: string
      required:
        - Amount
        - InvoiceId
        - PaymentId
      type: object
    ProxyCreateOrModifyProductRatePlanChargeChargeModelConfiguration:
      description: |
        Container for charge model configuration data.

        **Notes**:

        * This field is only available if you have the Pre-Rated Pricing or Multi-Attribute Pricing charge models enabled. These charge models are available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information.
        * To use this field, you must set the `X-Zuora-WSDL-Version` request header to `102` or later. Otherwise, an error occurs with "Code: INVALID_VALUE".
      properties:
        ConfigurationItem:
          description: |
            An array of Charge Model Configuration Key-Value pairs.
          items:
            $ref: "#/components/schemas/ProxyCreateOrModifyProductRatePlanChargeChargeModelConfigurationItem"
          type: array
      title: ChargeModelConfiguration
      type: object
    ProxyCreateOrModifyProductRatePlanChargeChargeModelConfigurationItem:
      properties:
        Key:
          description: |
            The name of the field that is specified for a specific charge model.

            Configuration keys supported are as follows:

            * `formula` (only available if you have the Multi-Attribute Pricing charge model enabled. The charge model is available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information.)
            * `customFieldPerUnitRate` (only available if you have the Pre-Rated Per Unit Pricing charge model enabled. The charge model is available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information.)
            * `customFieldTotalAmount` (only available if you have the Pre-Rated Pricing model enabled. The charge model is available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information.)
          type: string
        Value:
          description: |
            The value of the field that is specified in the `Key` field.

            Possible values are follows:

            * A valid pricing formula to calculate actual rating amount for each usage record. For example, `usageQuantity()*10`. Use it with Key `formula` when the Multi-Attribute Pricing charge model is used. The charge model is available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information.
            * A name of a usage custom field that carries the per-unit rate for a usage record. For example, `perUnitRate__c`. Use it with Key `customFieldPerUnitRate` when the Pre-Rated Per Unit Pricing charge model is used. The charge model is available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information.
            * A name of a usage custom field that carries the total amount for a usage record. For example, `totalAmount__c`. Use it with Key `customFieldTotalAmount` when the Pre-Rated Pricing model is used. The charge model is available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information.
          type: string
      title: ConfigurationItem
      type: object
    ProxyCreateOrModifyProductRatePlanChargeTierData:
      description: |
        Container for pricing information associated with the product rate plan charge.
      properties:
        ProductRatePlanChargeTier:
          description: |
            Array of product rate plan charge tiers.

            You should specify all relevant fields of all tiers, including pricing information for each currency.

            For each currency, ensure that the tiers appear in ascending order of `StartingUnit`.

            For example:

            ```
            [
              {
                "StartingUnit": "1",
                "EndingUnit": "150",
                "Currency": "USD",
                "Price": 1.95,
                "PriceFormat": "Per Unit"
              },
              {
                "StartingUnit": "151",
                "EndingUnit": "300",
                "Currency": "USD",
                "Price": 1.45,
                "PriceFormat": "Per Unit"
              },
              {
                "StartingUnit": "1",
                "EndingUnit": "150",
                "Currency": "EUR",
                "Price": 1.75,
                "PriceFormat": "Per Unit"
              },
              {
                "StartingUnit": "151",
                "EndingUnit": "300",
                "Currency": "EUR",
                "Price": 1.30,
                "PriceFormat": "Per Unit"
              }
            ]
            ```
          items:
            properties:
              Currency:
                description: |
                  The code corresponding to the currency for the tier's price.
                type: string
              DiscountAmount:
                description: |
                  The specific amount for a fixed discount. Required if the charge model of the product rate plan charge is `Discount-Fixed Amount`.
                format: double
                type: number
              DiscountPercentage:
                description: |
                  The percentage of discount for a percentage discount. Required if the charge model of the product rate plan charge is `Discount-Percentage`.
                format: double
                type: number
              EndingUnit:
                description: |
                  The end number of a range of units for the tier. Required if the charge model of the product rate plan charge is `Tiered Pricing` or `Tiered with Overage Pricing`.
                format: double
                type: number
              IsOveragePrice:
                description: |
                  Indicates if the price is an overage price, which is the price when usage surpasses the last defined tier.
                type: boolean
              Price:
                description: |
                  The price of the tier if the charge is a flat fee, or the price of each unit in the tier if the charge model is tiered pricing.
                format: double
                type: number
              PriceFormat:
                description: |
                  Indicates if pricing is a flat fee or is per unit. This field is for tiered and volume pricing models only.
                enum:
                  - Flat Fee
                  - Per Unit
                type: string
              StartingUnit:
                description: |
                  The starting number of a range of units for the tier. Required if the charge model of the product rate plan charge is `Tiered Pricing` or `Tiered with Overage Pricing`.
                format: double
                type: number
            type: object
          type: array
      title: productRatePlanChargeTierData
      type: object
    ProxyCreateOrModifyResponse:
      properties:
        Id:
          description: ""
          type: string
        Success:
          description: ""
          type: boolean
      type: object
    ProxyCreatePayment:
      allOf:
        - properties:
            AccountId:
              description: |
                The unique account ID for the customer that the payment is for.
              maxLength: 32
              minLength: 0
              type: string
            AccountingCode:
              description: |
                The accounting code for the payment. Accounting codes group transactions that contain similar accounting attributes.
              maxLength: 100
              minLength: 0
              type: string
            Amount:
              description: |
                The amount of the payment.

                If Invoice Settlement is enabled, this field is required.
              format: double
              maxLength: 16
              minLength: 0
              type: number
            AppliedCreditBalanceAmount:
              description: |
                If you have the Invoice Settlement feature disabled, the value of this field is the amount of the payment to apply to a credit balance. This field is only required if the `AppliedInvoiceAmount` field value is null.

                If you have the Invoice Settlement feature enabled, the value of this field is created as the unapplied amount.
              format: double
              maxLength: 16
              minLength: 0
              type: number
            AppliedInvoiceAmount:
              description: |
                The amount of the payment to apply to an invoice. This field is only required if either the `InvoiceId` or `InvoiceNumber` field is not null.
              format: decimal
              maxLength: 16
              minLength: 0
              type: number
            AuthTransactionId:
              description: |
                The authorization transaction ID from the payment gateway. Use this field for electronic payments, such as credit cards.
              maxLength: 50
              minLength: 0
              type: string
            Comment:
              description: |
                Additional information related to the payment.
              maxLength: 255
              minLength: 0
              type: string
            EffectiveDate:
              description: |
                The date when the payment takes effect.
              format: date
              maxLength: 29
              minLength: 0
              type: string
            Gateway:
              description: |
                The name of the gateway instance that processes the payment. When creating a payment, the value of this field must be a valid gateway instance name, and this gateway must support the specific payment method. If no value is specified, the default gateway on the Account will be used.
              type: string
            GatewayOptionData:
              description: |
                A field used to pass gateway options. Zuora allows you to pass in special gateway-specific parameters for payments that go through the Adyen, Autorize.et, CyberSource, Merchant eSolutions, Orbital (Chase Paymentech), QValent, Vantiv, and Verifi gateways.

                For each of these special parameters, you supply the name-value pair and Zuora passes it to the gateway. This allows you to add functionality that's supported by a specific gateway but currently not supported by Zuora.
              properties:
                GatewayOption:
                  description: ""
                  items:
                    $ref: "#/components/schemas/GatewayOption"
                  maxItems: 200
                  minItems: 0
                  type: array
              required:
                - GatewayOption
              type: object
            GatewayOrderId:
              description: |
                A merchant-specified natural key value that can be passed to the electronic payment gateway when a payment is created. If not specified, the payment number will be passed in instead.

                Gateways check duplicates on the gateway order ID to ensure that the merchant do not accidentally enter the same transaction twice. This ID can also be used to do reconciliation and tie the payment to a natural key in external systems. The source of this ID varies by merchant. Some merchants use their shopping cart order IDs, and others use something different. Merchants use this ID to track transactions in their eCommerce systems.
              maxLength: 70
              minLength: 0
              type: string
            GatewayResponse:
              description: |
                The message returned from the payment gateway for the payment. This message is gateway-dependent.
              maxLength: 500
              minLength: 0
              type: string
            GatewayResponseCode:
              description: |
                The code returned from the payment gateway for the payment. This code is gateway-dependent.
              maxLength: 20
              minLength: 0
              type: string
            GatewayState:
              description: |
                The status of the payment in the gateway; use for reconciliation.
              enum:
                - MarkedForSubmission
                - Submitted
                - Settled
                - NotSubmitted
                - FailedToSettle
              type: string
            InvoiceId:
              description: |
                The ID of the invoice that the payment is applied to. When applying a payment to a single invoice, this field is only required if the `InvoiceNumber` field is null.
              maxLength: 32
              minLength: 0
              type: string
            InvoiceNumber:
              description: |
                The unique identification number for the invoice that the payment is applied to. When applying a payment to a single invoice, this field is only required if the `InvoiceId` field is null.
              maxLength: 32
              minLength: 0
              type: string
            InvoicePaymentData:
              description: |
                Container for the invoice payment data. This field is only required if you apply a payment to multiple invoices.
              properties:
                InvoicePayment:
                  description: ""
                  items:
                    $ref: "#/components/schemas/InvoicePayment"
                  maxItems: 200
                  minItems: 0
                  type: array
              required:
                - InvoicePayment
              title: InvoicePaymentData
              type: object
            PaymentMethodId:
              description: |
                The ID of the payment method used for the payment. 
              maxLength: 32
              minLength: 0
              type: string
            PaymentNumber:
              description: |
                The unique identification number of the payment. For example, P-00000028.
              maxLength: 32
              minLength: 0
              type: string
            ReferenceId:
              description: |
                The transaction ID returned by the payment gateway. Use this field to reconcile payments between your gateway and Zuora Payments.
              maxLength: 100
              minLength: 0
              type: string
            SoftDescriptor:
              description: |
                A payment gateway-specific field that maps to Zuora for the gateways, Orbital, Vantiv and Verifi. 

                Zuora passes this field to Verifi directly without verification. In general, this field will be defaulted by the gateway. For Orbital, this field contains two fields separated by an asterisk, `SDMerchantName` and `SDProductionInfo`. For more information, contact your payment gateway.
              maxLength: 35
              minLength: 0
              type: string
            SoftDescriptorPhone:
              description: |
                A payment gateway-specific field that maps to Zuora for the gateways, Orbital, Vantiv and Verifi.

                Verifi and Orbital determine how to format this string. For more information, contact your payment gateway.
              maxLength: 20
              minLength: 0
              type: string
            Status:
              description: |
                The status of the payment in Zuora. The value depends on the type of payments.

                - If you have the Invoice Settlement feature disabled, for electronic payments, the status can be `Processed`, `Processing`, `Error`, or `Voided`. For external payments, the status can be `Processed` or `Canceled`.
                - If you have the Invoice Settlement feature enabled, for electronic payments, the status can be `Processed`, `Processing`, `Error`, or `Canceled`. For external payments, the status can be `Processed` or `Canceled`.
              enum:
                - Processed
                - Error
                - Voided
                - Canceled
              type: string
            Type:
              description: |
                The type of the payment, whether the payment is external or electronic.
              enum:
                - External
                - Electronic
              type: string
          required:
            - AccountId
            - EffectiveDate
            - PaymentMethodId
            - Status
            - Type
          type: object
        - $ref: "#/components/schemas/PaymentObjectNSFields"
        - $ref: "#/components/schemas/PaymentObjectCustomFields"
      example:
        AccountId: 2c93808457d787030157e03190e748ea
        Amount: 2
        AppliedCreditBalanceAmount: 0
        AppliedInvoiceAmount: 2
        EffectiveDate: 2016-10-20
        InvoiceId: 2c93808457d787030157e03195604902
        PaymentMethodId: 2c93808457d787030157e03196d1490e
        Status: Processed
        Type: Electronic
    ProxyCreatePaymentMethod:
      allOf:
        - properties:
            AccountId:
              description: |-
                The ID of the customer account associated with this payment method.
                To create an orphan payment method that is not associated with any customer account, you do not need to specify this field during creation. However, you must associate the orphan payment method with a customer account within 10 days. Otherwise, this orphan payment method will be deleted.
              type: string
            AchAbaCode:
              description: |2-
                 The nine-digit routing number or ABA number used by banks. This field is only required if the `Type` field is set to `ACH`.

                **Character limit**: 9 **Values**: a string of 9 characters or fewer 
              type: string
            AchAccountName:
              description: |2-
                 The name of the account holder, which can be either a person or a company. This field is only required if the `Type` field is set to `ACH`.

                **Character limit**: 70 **Values**: a string of 70 characters or fewer 
              type: string
            AchAccountNumber:
              description: |-
                The bank account number associated with the ACH payment. This field is only required if the `Type` field is set to `ACH`.
                **Character limit**: 30 **Values**: a string of 30 numeric characters or fewer 
              type: string
            AchAccountType:
              description: |2
                 The type of bank account associated with the ACH payment. This field is only required if the `Type` field is set to `ACH`.
                **Character limit**: 16 **Values**:
                - `BusinessChecking`
                - `Checking`
                - `Saving`
              type: string
            AchAddress1:
              description: " Line 1 for the ACH address. This field is required for creating a payment method for the Vantiv payment gateway. **Character limit**: 255 **Values**: an address "
              type: string
            AchAddress2:
              description: " Line 2 for the ACH address. This field is required for creating a payment method for the Vantiv payment gateway. **Character limit**: 255 **Values**: an address "
              type: string
            AchBankName:
              description: |2-
                 The name of the bank where the ACH payment account is held. This field is only required if the `Type` field is set to `ACH`.
                **Character limit**: 70 **Values**: a string of 70 characters or fewer 
              type: string
            AchCity:
              description: |-
                The city of the ACH address. Use this field for ACH payment methods. **Note**: This field is only specific to the NMI payment gateway.
                **Character limit**: 40 **Values**: a string of 40 characters or fewer 
              type: string
            AchCountry:
              description: |-
                The country of the ACH address. See [Country Names and Their ISO Standard 2- and 3-Digit Codes](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/D_Country%2C_State%2C_and_Province_Codes/A_Country_Names_and_Their_ISO_Codes) for the list of supported country names. Use this field for ACH methods. **Note**: This field is only specific to the NMI payment gateway.
                **Character limit**: 40 **Values**: a supported country name 
              type: string
            AchPostalCode:
              description: |-
                The billing address's zip code. This field is required only when you define an ACH payment method. **Note**: This field is only specific to the NMI payment gateway.
                **Character limit**: 20 **Values**: a string of 20 characters or fewer 
              type: string
            AchState:
              description: |-
                The billing address's state. Use this field is if the `ACHCountry` value is either `Canada` or the `US`. State names must be spelled in full. For more information, see the list of [supported state names](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/D_Country%2C_State%2C_and_Province_Codes/B_State_Names_and_2-Digit_Codes). This field is required only when you define an ACH payment method. **Note**: This field is only specific to the NMI payment gateway.
                **Character limit**: 50 **Values**: a valid state name 
              type: string
            BankBranchCode:
              description: |2-
                 The branch code of the bank used for direct debit. Use this field for direct debit payment methods.
                **Character limit**: 10 **Values**: a string of 10 characters or fewer 
              type: string
            BankCheckDigit:
              description: "The check digit in the international bank account number, which confirms the validity of the account. Use this field for direct debit payment methods. **Character limit**: 4 **Values**: a string of 4 characters or fewer "
              type: string
            BankTransferAccountName:
              description: |
                The name on the direct debit bank account. Use this field for direct debit payment methods.

                **Character limit**: 60
                **Values**: a string of 60 characters or fewer
              type: string
            BankTransferAccountNumber:
              description: |
                The number of the customer's bank account. Use this field for direct debit payment methods.

                **Character limit**: 30
                **Values**: a string of 30 characters or fewer
              type: string
            BankTransferAccountNumberMask:
              description: |
                
                This is a masked displayable version of the ACH account number, used for security purposes. For example: `XXXXXXXXX54321`.

                **Character limit**: 32
                **Values**: automatically generated
              type: string
            BankTransferType:
              description: |
                The type of direct debit transfer. The value of this field is dependent on the country of the user. This field is only required if the `Type` field is set to `BankTransfer`.

                 **Values**: 

                   - `SEPA` 
                   
                   - `AutomatischIncasso` (Netherlands)

                   - `LastschriftDE` (Germany)

                   - `LastschriftAT` (Austria)

                   - `DemandeDePrelevement` (France)

                   - `DirectEntryAU` (Australia)

                   - `DirectDebitUK` (UK)

                   - `Domicil` (Belgium)

                   - `LastschriftCH` (Switzerland)

                   - `RID` (Italy)

                   - `OrdenDeDomiciliacion` (Spain)
                   - `Autogiro` (Sweden)
                   - `Betalingsservice` (Denmark)
              maxLength: 20
              type: string
            BusinessIdentificationCode:
              description: |2-
                 The business identification code for Swiss direct payment methods that use the Global Collect payment gateway. Use this field only for direct debit payments in Switzerland with Global Collect.
                **Character limit**: 11 **Values**: a string of 11 characters or fewer 
              type: string
            City:
              description: |2-
                 The city of the customer's address. Use this field for direct debit payment methods.
                **Character limit**:80 **Values**: a string of 80 characters or fewer 
              type: string
            CompanyName:
              description: |
                The name of the company.

                Zuora does not recommend that you use this field.
              maxLength: 80
              type: string
            Country:
              description: |2-
                 The two-letter country code of the customer's address. This field is only required if the `Type` field is set to `BankTransfer`, and the `BankTransferType` field is set to either `DirectDebitUK`, `DirectEntryAU`, or `DirectDebitNZ`.
                **Character limit**: 2 **Values**: a valid country code 
              type: string
            CreditCardAddress1:
              description: |2-
                 The first line of the card holder's address, which is often a street address or business name. Use this field for credit card and direct debit payment methods.
                **Character limit**: 255 **Values**: a string of 255 characters or fewer 
              type: string
            CreditCardAddress2:
              description: |2-
                 The second line of the card holder's address. Use this field for credit card and direct debit payment methods.
                **Character limit**: 255 **Values**: a string of 255 characters or fewer 
              type: string
            CreditCardCity:
              description: " The city of the card holder's address. Use this field for credit card and direct debit payment methods **Character limit**: 40 **Values**: a string of 40 characters or fewer "
              type: string
            CreditCardCountry:
              description: " The country of the card holder's address. "
              type: string
            CreditCardExpirationMonth:
              description: |2-
                 The expiration month of the credit card or debit card. This field is only required if the `Type` field is set to `CreditCard` or `DebitCard`.
                **Character limit**: 2 **Values**: a two-digit number, 01 - 12 
              format: int32
              type: integer
            CreditCardExpirationYear:
              description: |2-
                 The expiration month of the credit card or debit card. This field is only required if the `Type` field is set to `CreditCard` or `DebitCard`.
                **Character limit**: 4 **Values**: a four-digit number 
              format: int32
              type: integer
            CreditCardHolderName:
              description: |2-
                 The full name of the card holder. This field is only required if the `Type` field is set to `CreditCard` or `DebitCard`.

                **Character limit**: 50 **Values**: a string of 50 characters or fewer 
              type: string
            CreditCardNumber:
              description: "Credit card number, a string of up to 16 characters. This field can only be set when creating a new payment method; it cannot be queried or updated. "
              type: string
            CreditCardPostalCode:
              description: " The billing address's zip code. **Character limit**: 20 **Values**: a string of 20 characters or fewer "
              type: string
            CreditCardSecurityCode:
              description: "The CVV or CVV2 security code. See [How do I control what information Zuora sends over to the Payment Gateway?](https://knowledgecenter.zuora.com/kb/How_do_I_control_information_sent_to_payment_gateways_when_verifying_payment_methods%3F) for more information. To ensure PCI compliance, this value is not stored and cannot be queried. "
              type: string
            CreditCardState:
              description: " The billing address's state. Use this field if the `CreditCardCountry` value is either Canada or the US. State names must be spelled in full. "
              type: string
            CreditCardType:
              description: |
                The type of the credit card.

                Possible values  include `Visa`, `MasterCard`, `AmericanExpress`, `Discover`, `JCB`, and `Diners`. For more information about credit card types supported by different payment gateways, see [Supported Payment Gateways](https://knowledgecenter.zuora.com/CB_Billing/M_Payment_Gateways/Supported_Payment_Gateways).
              type: string
            DeviceSessionId:
              description: |2-
                 The session ID of the user when the `PaymentMethod` was created or updated. Some gateways use this field for fraud prevention. If this field is passed to Zuora, then Zuora passes this field to supported gateways. Currently only Verifi supports this field.
                **Character limit**: 255 **Values**: 
              type: string
            Email:
              description: |2-
                 An email address for the payment method in addition to the bill to contact email address.
                **Character limit**: 80 **Values**: a string of 80 characters or fewer 
              type: string
            ExistingMandate:
              description: |2-
                 Indicates if the customer has an existing mandate or a new mandate. A mandate is a signed authorization for UK and NL customers. When you are migrating mandates from another system, be sure to set this field correctly. If you indicate that a new mandate is an existing mandate or vice-versa, then transactions fail. This field is used only for the direct debit payment method.
                **Character limit**: 3 **Values**: `Yes`, `No` 
              type: string
            FirstName:
              description: |2-
                 The customer's first name. This field is used only for the direct debit payment method.
                **Character limit**: 30 **Values**: a string of 30 characters or fewer 
              type: string
            GatewayOptionData:
              description: |
                A field used to pass gateway options. Zuora allows you to pass in special gateway-specific parameters for payments that go through the Adyen, Autorize.et, CyberSource, Merchant eSolutions, Orbital (Chase Paymentech), QValent, Vantiv, and Verifi gateways.

                For each of these special parameters, you supply the name-value pair and Zuora passes it to the gateway. This allows you to add functionality that's supported by a specific gateway but currently not supported by Zuora.
              properties:
                GatewayOption:
                  description: ""
                  items:
                    $ref: "#/components/schemas/GatewayOption"
                  maxItems: 200
                  minItems: 0
                  type: array
              required:
                - GatewayOption
              type: object
            IBAN:
              description: |2-
                 The International Bank Account Number. This field is used only for the direct debit payment method.
                **Character limit**: 42 **Values**: a string of 42 characters or fewer 
              type: string
            IPAddress:
              description: |2-
                 The IP address of the user when the payment method was created or updated. Some gateways use this field for fraud prevention. If this field is passed to Zuora, then Zuora passes this field to supported gateways. Currently PayPal, CyberSource, Authorize.Net, Verifi, and WorldPay support this field.
                **Character limit**: 15 **Values**: a string of 15 characters or fewer 
              type: string
            IdentityNumber:
              description: |
                The unique identity number of the customer account. 

                This field is required only if the `BankTransferType` field is set to `Autogiro` or `Betalingsservice`. It is a string of 12 characters for a Swedish identity number, and a string of 10 characters for a Denish identity number.
              type: string
            IsCompany:
              default: false
              description: |
                Whether the customer account is a company.

                Zuora does not recommend that you use this field. 
              type: boolean
            LastName:
              description: |2-
                 The customer's last name. This field is used only for the direct debit payment method.
                **Character limit**: 70 **Values**: a string of 70 characters or fewer 
              type: string
            LastTransactionDateTime:
              description: |2-
                 The date of the most recent transaction.
                **Character limit**: 29 **Values**: a valid date and time value 
              format: date-time
              type: string
            MandateCreationDate:
              description: |2-
                 The date when the mandate was created, in `yyyy-mm-dd` format. A mandate is a signed authorization for UK and NL customers. This field is used only for the direct debit payment method.
                **Character limit**: 29 
              format: date
              type: string
            MandateID:
              description: |2-
                 The ID of the mandate. A mandate is a signed authorization for UK and NL customers. This field is used only for the direct debit payment method.
                **Character limit**: 36 **Values**: a string of 36 characters or fewer 
              type: string
            MandateReceived:
              description: |2-
                 Indicates if  the mandate was received. A mandate is a signed authorization for UK and NL customers. This field is used only for the direct debit payment method.
                **Character limit**: 3 **Values**: `Yes`, `No `(case-sensitive) 
              type: string
            MandateUpdateDate:
              description: |2-
                 The date when the mandate was last updated, in `yyyy-mm-dd` format. A mandate is a signed authorization for UK and NL customers. This field is used only for the direct debit payment method.
                **Character limit**: 29 
              format: date
              type: string
            MaxConsecutivePaymentFailures:
              description: |2-
                 Specifies the number of allowable consecutive failures Zuora attempts with the payment method before stopping. When the `UseDefaultRetryRule` field is set to `false`, this field is only required if the `PaymentRetryWindow` field is not defined.
                **Values**: a valid number 
              type: integer
            NumConsecutiveFailures:
              description: |
                The number of consecutive failed payments for this payment method. It is reset to `0` upon successful payment. 
              format: int32
              maximum: 100
              minimum: 0
              type: integer
            PaymentRetryWindow:
              description: |2-
                 The retry interval setting, which prevents making a payment attempt if the last failed attempt was within the last specified number of hours. When the `UseDefaultRetryRule` field is set to `false`, this field is only required if the `MaxConsecutivePaymentFailures` field is not defined.
                **Character limit**: 4 **Values**: a whole number between 1 and 1000, exclusive 
              type: integer
            PaypalBaid:
              description: |2-
                 The PayPal billing agreement ID, which is a contract between two PayPal accounts. Typically, the selling party initiates a request to create a BAID, and sends it to buying party for acceptance. The seller can keep track of the BAID and use it for future charges against the buyer. This field is only required if the `Type` field is set to `PayPal`.
                **Character limit**: 64 **Values**: a string of 64 characters or fewer 
              type: string
            PaypalEmail:
              description: |2-
                 The email address associated with the account holder's PayPal account or of the PayPal account of the person paying for the service. This field is only required if the `Type` field is set to `PayPal`.
                **Character limit**: 80 **Values**: a string of 80 characters or fewer 
              type: string
            PaypalPreapprovalKey:
              description: |2-
                 PayPal's Adaptive Payments API key. Zuora does not create this key, nor does it call PayPal to generate it. You must use PayPal's Adaptive Payments' API to generate this key, and then pass it to Zuora. Zuora uses this key to authorize future payments to PayPal's Adaptive Payments API. This field is only required if you use PayPal Adaptive Payments gateway.
                **Character limit**: 32 **Values**: a valid PayPal Adaptive Payment pre-approval key 
              type: string
            PaypalType:
              description: |2-
                 Specifies the PayPal gateway: PayFlow Pro (Express Checkout) or Adaptive Payments. This field is only required if you use PayPal Adaptive Payments or Payflow Pro (Express Checkout) gateways.
                **Character limit**: 32 **Values**: `ExpressCheckout`, `AdaptivePayments` 
              type: string
            Phone:
              description: |2-
                 The phone number that the account holder registered with the bank. This field is used for credit card validation when passing to a gateway.
                **Character limit**: 40 **Values**: a string of 40 characters or fewer 
              type: string
            PostalCode:
              description: |2-
                 The zip code of the customer's address. This field is used only for the direct debit payment method.
                **Character limit**: 20 **Values**: a string of 20 characters or fewer 
              type: string
            SecondTokenId:
              description: " A gateway unique identifier that replaces sensitive payment method data. `SecondTokenId` is conditionally required only when `TokenId` is being used to represent a gateway customer profile. `SecondTokenId` is used in the CC Reference Transaction payment method. **Character limit**: 64 **Values**: a string of 64 characters or fewer "
              type: string
            SkipValidation:
              description: |-
                If you set this field to `false`, Zuora will send an authorization request to the payment gateway. If the authorization fails, the Create Payment Method request will fail as well. If the user knows that the card number or token is valid, we recommend disabling this feature because authorization requests to the card network incur additional processing fees. Currently, Zuora sends all authorizations as keyed entries.
                If you set this field to `true`, the authorization request is not sent.
                **Character limit**: 5 **Values**: `true` or `false` 
              type: boolean
            State:
              description: |-
                The state of the customer's address. This field is used only for the direct debit payment method.
                **Character limit**: 70 **Values**: a string of 70 characters or fewer 
              type: string
            StreetName:
              description: |-
                The street name of the customer's address. This field is used only for the direct debit payment method.
                **Character limit**: 100 **Values**: a string of 100 characters or fewer 
              type: string
            StreetNumber:
              description: |-
                The street number of the customer's address. This field is used only for the direct debit payment method.
                **Character limit**: 30 **Values**: a string of 30 characters or fewer 
              type: string
            TokenId:
              description: |-
                A gateway unique identifier that replaces sensitive payment method data or represents a gateway's unique customer profile. When `TokenId` is used to represent a customer profile, `SecondTokenId` is conditionally required for representing the underlying tokenized payment method. `TokenId` is required for the CC Reference Transaction payment method.
                **Character limit**: 255 **Values**: a string of 255 characters or fewer 
              type: string
            Type:
              description: |
                The type of payment method. 

                If you want to create an Amazon Pay payment method, specify `CreditCardReferenceTransaction` for this field. 

                If you want create a custom payment method, specify the name of the custom payment method type. This type is only available if the Universal Payment Connector and Open Payment Method services are enabled. See [Set up custom payment gateways and payment methods](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/MB_Set_up_custom_payment_gateways_and_payment_methods) for details.
              enum:
                - ACH
                - BankTransfer
                - CreditCard
                - CreditCardReferenceTransaction
                - DebitCard
                - PayPal
              type: string
            UseDefaultRetryRule:
              description: |-
                Determines whether to use the default retry rules configured in the Z-Payments settings. Set this to `true` to use the default retry rules. Set this to `false` to set the specific rules for this payment method. If you set this value to `false`, then the fields, `PaymentRetryWindow` and `MaxConsecutivePaymentFailures`, are required.
                **Character limit**: 5 **Values**: `true` or `false` 
              type: boolean
            currencyCode:
              description: |
                The currency used for payment method authorization.

                If this field is not specified, `currency` specified for the account is used for payment method authorization. If no currency is specified for the account, the default currency of the account is then used.
              type: string
          type: object
        - $ref: "#/components/schemas/PaymentMethodObjectCustomFields"
      example:
        AccountId: 2c93808457d787030157e0321fdf4fab
        CreditCardAddress1: 312 2nd Ave W
        CreditCardCity: Seattle
        CreditCardCountry: United States
        CreditCardExpirationMonth: 12
        CreditCardExpirationYear: 2020
        CreditCardHolderName: Somebody
        CreditCardNumber: "4111111111111111"
        CreditCardPostalCode: "98119"
        CreditCardState: Washington
        CreditCardType: Visa
        MaxConsecutivePaymentFailures: 10
        NumConsecutiveFailures: 3
        PaymentRetryWindow: 3
        Type: CreditCard
      required:
        - Type
        - UseDefaultRetryRule
    ProxyCreateProduct:
      allOf:
        - properties:
            AllowFeatureChanges:
              description: |2-
                 Controls whether to allow your users to add or remove features while creating or amending a subscription.
                **Character** **limit**: n/a
                **Values**: true, false (default) 
              type: boolean
            Category:
              description: |2
                 Category of the product. Used by Zuora Quotes Guided Product Selector.
                **Character** **limit**: 100
                **Values**: One of the following:

                - Base Products
                - Add On Services
                - Miscellaneous Products
              type: string
            Description:
              description: " A descriptionof the product. **Character limit**: 500 **Values**: a string of 500 characters or fewer "
              type: string
            EffectiveEndDate:
              description: |
                The date when the product expires and can't be subscribed to anymore, in `yyyy-mm-dd` format.
              format: date
              type: string
            EffectiveStartDate:
              description: |
                The date when the product becomes available and can be subscribed to, in `yyyy-mm-dd` format.
              format: date
              type: string
            Name:
              description: "The name of the product. This information is displayed in the product catalog pages in the web-based UI. **Character limit**: 100 **Values**: a string of 100 characters or fewer "
              type: string
            SKU:
              description: |
                The unique SKU for the product. **Character limit**: 50 **Values**: one of the following:

                - leave null for automatic generated
                - an alphanumeric string of 50 characters or fewer
              type: string
          required:
            - EffectiveEndDate
            - EffectiveStartDate
            - Name
          type: object
        - $ref: "#/components/schemas/ProductObjectNSFields"
        - $ref: "#/components/schemas/ProductObjectCustomFields"
      example:
        Description: Create product via API
        EffectiveEndDate: 2066-10-20
        EffectiveStartDate: 1966-10-20
        Name: P_1476935173677
        SKU: API-SKU1476935173677
    ProxyCreateProductRatePlan:
      allOf:
        - properties:
            ActiveCurrencies:
              description: |
                A list of 3-letter currency codes representing active currencies for the product rate plan. Use a comma to separate each currency code.

                When creating a product rate plan, you can use this field to specify at most four active currencies. 
              items:
                type: string
              type: array
            Description:
              description: "A description of the product rate plan. **Character limit**: 500 **Values**: a string of 500 characters or fewer "
              type: string
            EffectiveEndDate:
              description: |2-
                 The date when the product rate plan expires and can't be subscribed to, in `yyyy-mm-dd` format.
                **Character limit**: 29 
              format: date
              type: string
            EffectiveStartDate:
              description: |2-
                 The date when the product rate plan becomes available and can be subscribed to, in `yyyy-mm-dd` format.
                **Character limit**: 29 
              format: date
              type: string
            Name:
              description: "The name of the product rate plan. The name doesn't have to be unique in a Product Catalog, but the name has to be unique within a product. **Character limit**: 100 **Values**: a string of 100 characters or fewer "
              type: string
            ProductId:
              description: "The ID of the product that contains the product rate plan. **Character limit**: 32 **Values**: a string of 32 characters or fewer "
              type: string
          required:
            - Name
            - ProductId
          type: object
        - $ref: "#/components/schemas/ProductRatePlanObjectNSFields"
        - $ref: "#/components/schemas/ProductRatePlanObjectCustomFields"
      example:
        Description: Test create product rateplan via API
        EffectiveEndDate: 2066-10-20
        EffectiveStartDate: 1966-10-20
        Name: ProductRatePlan1476935173957
        ProductId: 2c93808457d787030157e03246ae5129
    ProxyCreateProductRatePlanCharge:
      allOf:
        - properties:
            AccountingCode:
              description: "The accounting code for the charge. Accounting codes group transactions that contain similar accounting attributes. **Character limit**: 100 **Values**: an active accounting code in your Zuora Chart of Accounts "
              type: string
            ApplyDiscountTo:
              description: |
                Specifies the type of charges that you want a specific discount to apply to. All field values are case sensitive: note that these values are in all-caps. **Character limit**: 21 **Values**: one of the following:

                - `ONETIME (1)`
                - `RECURRING (2)`
                - `USAGE (4)`
                - `ONETIMERECURRING (3)`
                - `ONETIMEUSAGE (5)`
                - `RECURRINGUSAGE (6)`
                - `ONETIMERECURRINGUSAGE (7)`
              type: string
            BillCycleDay:
              description: |2-
                 Sets the bill cycle day (BCD) for the charge. The BCD determines which day of the month customer is billed. The BCD value in the account can override the BCD in this object.
                **Character limit**: 2 **Values**: a valid BCD integer, 1 - 31 
              format: int32
              type: integer
            BillCycleType:
              description: |2
                 Specifies how to determine the billing day for the charge. **Character limit**: 20 **Values**: one of the following:

                - `DefaultFromCustomer`
                - `SpecificDayofMonth:`
                - `SubscriptionStartDay`
                - `ChargeTriggerDay`
                - `SpecificDayofWeek`
                **Note**:

                - If you set this field to `SpecificDayofMonth`, you must specify which day of the month as the billing day for the charge in the BillCycleDay field.
                - If you set this field to `SpecificDayofWeek`, you must specify which day of the week as the billing day for the charge in the WeeklyBillCycleDay field.
              type: string
            BillingPeriod:
              description: |2-
                 The billing period for the charge. The start day of the billing period is also called the bill cycle day (BCD).
                **Character limit**: 15 **Values**: one of the following

                - `Month`
                - `Quarter`
                - `Annual`
                - `Semi-Annual`
                - `Specific Months`
                - `Subscription Term` (This value is in **Limited Availability**.)
                - `Week`
                - `Specific Weeks`
                **Note**: Specify the number of months or weeks in the SpecificBillingPeriod field if you set this field to `Specific Months` or `Specific Weeks`. 
              type: string
            BillingPeriodAlignment:
              description: |2
                 Aligns charges within the same subscription if multiple charges begin on different dates.
                **Character limit**: 24 **Values**: one of the following:

                - `AlignToCharge`
                - `AlignToSubscriptionStart`
                - `AlignToTermStart`
              type: string
            BillingTiming:
              description: |2+
                 The billing timing for the charge. You can choose to bill in advance or in arrears for recurring charge types. This field is not used in one-time or usage based charge types.
                **Character limit**: **Values**: one of the following:

                - `In Advance`
                - `In Arrears`

                This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).

              type: string
            ChargeModel:
              description: |2
                 Determines how to calculate charges. Charge models must be individually activated in Zuora Billing administration.
                **Character limit**: 27 **Values**: one of the following:

                - `Discount-Fixed Amount`
                - `Discount-Percentage`
                - `Flat Fee Pricing`
                - `Per Unit Pricing`
                - `Overage Pricing`
                - `Tiered Pricing`
                - `Tiered with Overage Pricing`
                - `Volume Pricing`
                - `MultiAttributePricing` (available only if you have the Multi-Attribute Pricing charge model enabled. The charge model is available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information.)
                - `PreratedPerUnit` (available only if you have the Pre-rated Per Unit Pricing charge model enabled. The charge model is available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information.)
                - `PreratedPricing` (available only if you have the Pre-rated Pricing charge model enabled. The charge model is available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information.)
                - `HighWatermarkVolumePricing` (available only if you have the High Water Mark Volume Pricing charge model enabled. The charge model is available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information.)
                - `HighWatermarkTieredPricing` (available only if you have the High Water Mark Tiered Pricing charge model enabled. The charge model is available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information.)
              type: string
            ChargeModelConfiguration:
              $ref: "#/components/schemas/ProxyCreateOrModifyProductRatePlanChargeChargeModelConfiguration"
            ChargeType:
              description: |2
                 Specifies the type of charge.
                **Character limit**: 9 **Values**: one of the following:

                - `OneTime`
                - `Recurring`
                - `Usage`
              type: string
            DefaultQuantity:
              description: |2-
                 The default quantity of units, such as the number of authors in a hosted wiki service. This field is required if you use a per-unit pricing model.
                **Character limit**: 16 **Values**: a valid quantity value 
              format: double
              type: number
            DeferredRevenueAccount:
              description: |2+
                 The name of the deferred revenue account for this charge.
                **Character limit**: 100 **Values**: an active accounting code in your Zuora Chart of Accounts
                This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).

              type: string
            Description:
              description: "A description of the charge. **Character limit**: 500 **Values**: a string of 500 characters or fewer "
              type: string
            DiscountLevel:
              description: |2
                 Specifies if the discount applies to just the product rate plan, the entire subscription, or to any activity in the account.
                **Character limit**: 12 **Values**: one of the following:

                - `rateplan`
                - `subscription`, `account`
              type: string
            EndDateCondition:
              description: |2-
                 Defines when the charge ends after the charge trigger date.
                **Values**: one of the following:

                - `SubscriptionEnd`: The charge ends on the subscription end date after a specified period based on the trigger date of the charge. This is the default value.
                - `FixedPeriod`: The charge ends after a specified period based on the trigger date of the charge. If you set this field to `FixedPeriod`, you must specify the length of the period and a period type by defining the `UpToPeriods` and `UpToPeriodsType` fields.
                **Note**: If the subscription ends before the charge end date, the charge ends when the subscription ends. But if the subscription end date is subsequently changed through a Renewal, or Terms and Conditions amendment, the charge will end on the charge end date. 
              type: string
            IncludedUnits:
              description: "Specifies the number of units in the base set of units. **Character limit**: 16 **Values**: a positive decimal value "
              format: double
              type: number
            LegacyRevenueReporting:
              description: ""
              type: boolean
            ListPriceBase:
              description: |
                The list price base for the product rate plan charge. **Values**: one of the following:

                - `Per Month`
                - `Per Billing Period`
                - `Per Week`
              type: string
            MaxQuantity:
              description: |2-
                 Specifies the maximum number of units for this charge. Use this field and the `MinQuantity` field to create a range of units allowed in a product rate plan charge.
                **Character limit**: 16 **Values**: a positive decimal value 
              format: double
              type: number
            MinQuantity:
              description: "Specifies the minimum number of units for this charge. Use this field and the `MaxQuantity` field to create a range of units allowed in a product rate plan charge. **Character limit**: 16 **Values**: a positive decimal value "
              format: double
              type: number
            Name:
              description: "The name of the product rate plan charge. **Character limit**: 100 **Values**: a string of 100 characters or fewer "
              type: string
            NumberOfPeriod:
              description: "Specifies the number of periods to use when calculating charges in an overage smoothing charge model. **Character limit**: **Values**: a positive whole number "
              format: int64
              type: integer
            OverageCalculationOption:
              description: |
                Determines when to calculate overage charges. If the value of the SmoothingMode field is not specified, the value of this field is ignored. **Character limit**: 20 **Values**: one of the following:

                - `EndOfSmoothingPeriod`: This option is used by default. The overage is charged at the end of the smoothing period.
                - `PerBillingPeriod`: The overage is charged on-demand rather than waiting until the end of the smoothing period.
              type: string
            OverageUnusedUnitsCreditOption:
              description: |2
                 Determines whether to credit the customer with unused units of usage.
                **Character limit**: 20 **Values**: one of the following:

                - `NoCredit`
                - `CreditBySpecificRate`
              type: string
            PriceChangeOption:
              description: |2
                 Applies an automatic price change when a termed subscription is renewed.
                **Character limit**: **Values**: one of the following:

                - `NoChange` (default)
                - `SpecificPercentageValue`
                - `UseLatestProductCatalogPricing`
              type: string
            PriceIncreaseOption:
              description: |
                Applies an automatic price change when a termed subscription is renewed.
              enum:
                - FromTenantPercentageValue
                - SpecificPercentageValue
              type: string
            PriceIncreasePercentage:
              description: |2-
                 Specifies the percentage to increase or decrease the price of a termed subscription's renewal. Use this field if you set the value to `SpecificPercentageValue`.
                **Character limit**: 16 **Values**: a decimal value between -100 and 100 
              format: double
              type: number
            ProductRatePlanChargeTierData:
              $ref: "#/components/schemas/ProxyCreateOrModifyProductRatePlanChargeTierData"
            ProductRatePlanId:
              description: |2-
                 The ID of the product rate plan associated with this product rate plan charge.
                **Character limit**: 32 **Values**: a valid product rate plan ID 
              type: string
            RatingGroup:
              description: |
                Specifies a rating group based on which usage records are rated.

                Possible values:

                - `ByBillingPeriod` (default): The rating is based on all the usages in a billing period.
                - `ByUsageStartDate`: The rating is based on all the usages on the same usage start date. 
                - `ByUsageRecord`: The rating is based on each usage record.
                - `ByUsageUpload`: The rating is based on all the  usages in a uploaded usage file (`.xls` or `.csv`).
                - `ByGroupId`: The rating is based on all the usages in a custom group.

                **Note:** 
                - The `ByBillingPeriod` value can be applied for all charge models. 
                - The `ByUsageStartDate`, `ByUsageRecord`, and `ByUsageUpload` values can only be applied for per unit, volume pricing, and tiered pricing charge models. 
                - The `ByGroupId` value is only available if you have the Active Rating feature enabled.
                - Use this field only for Usage charges. One-Time Charges and Recurring Charges return `NULL`.
              type: string
            RecognizedRevenueAccount:
              description: |2+
                 The name of the recognized revenue account for this charge.

                - Required when the Allow Blank Accounting Code setting is No.
                - Optional when the Allow Blank Accounting Code setting is Yes.

                **Character limit**: 100 **Values**: an active accounting code in your Zuora Chart of Accounts
                This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).

              type: string
            RevRecCode:
              description: "Associates this product rate plan charge with a specific revenue recognition code. **Character limit**: 70 **Values**: a valid revenue recognition code "
              type: string
            RevRecTriggerCondition:
              description: |2
                 Specifies when revenue recognition begins.
                **Character limit**: 22 **Values**: one of the following:

                - `ContractEffectiveDate`
                - `ServiceActivationDate`
                - `CustomerAcceptanceDate`
              type: string
            RevenueRecognitionRuleName:
              description: |
                Determines when to recognize the revenue for this charge. **Character limit**: 25 **Values**: one of the following:

                - `Recognize upon invoicing`
                - `Recognize daily over time`
              type: string
            SmoothingModel:
              description: |2
                 Specifies the smoothing model for an overage smoothing charge model.
                **Character limit**: 22 **Values**: one of the following:

                - `RollingWindow`
                - `Rollover`
              type: string
            SpecificBillingPeriod:
              description: |2-
                 Customizes the number of months or weeks for the charges billing period. This field is required if you set the value of the BillingPeriod field to `Specific Months` or `Specific Weeks`.
                **Values**: a positive integer 
              format: int64
              type: integer
            TaxCode:
              description: |2-
                 Specifies the tax code for taxation rules. Required when the Taxable field is set to `True`.

                **Character limit**: 64

                **Values**: a valid tax code

                **Note**: This value affects the tax calculation of rate plan charges that come from the `ProductRatePlanCharge`. 
              type: string
            TaxMode:
              description: |2-
                 Determines how to define taxation for the charge. Required when the Taxable field is set to `True`.

                **Character limit**: 12

                **Values**: one of the following:

                - `TaxExclusive`
                - `TaxInclusive`

                **Note**: This value affects the tax calculation of rate plan charges that come from the `ProductRatePlanCharge`. 
              type: string
            Taxable:
              description: |2-
                 Determines whether the charge is taxable. When set to `True`, the TaxMode and TaxCode fields are required when creating or updating th ProductRatePlanCharge object.

                **Character limit**: 5

                **Values**: `True`, `False`

                **Note**: This value affects the tax calculation of rate plan charges that come from the `ProductRatePlanCharge`. 
              type: boolean
            TriggerEvent:
              description: |2
                 Specifies when to start billing the customer for the charge.
                **Character limit**: 18 **Values**: one of the following:

                - `ContractEffective` is the date when the subscription's contract goes into effect and the charge is ready to be billed.
                - `ServiceActivation` is the date when the services or products for a subscription have been activated and the customers have access.
                - `CustomerAcceptance` is when the customer accepts the services or products for a subscription.
              type: string
            UOM:
              description: |2
                 Specifies the units to measure usage.
                **Character limit**: 25 **Values**: a configured unit of measure **Note**: You must specify this field when creating the following charge models:

                - Per Unit Pricing
                - Volume Pricing
                - Overage Pricing
                - Tiered Pricing
                - Tiered with Overage Pricing
              type: string
            UpToPeriods:
              description: |2
                 Specifies the length of the period during which the charge is active. If this period ends before the subscription ends, the charge ends when this period ends.
                **Character limit**: 5 **Values**: a whole number between 0 and 65535, exclusive **Note**:

                - You must use this field together with the `UpToPeriodsType` field to specify the time period. This field is applicable only when the `EndDateCondition` field is set to `FixedPeriod`.
                - If the subscription end date is subsequently changed through a Renewal, or Terms and Conditions amendment, the charge end date will change accordingly up to the original period end.
              format: int64
              type: integer
            UpToPeriodsType:
              description: |2
                 The period type used to define when the charge ends.
                **Character limit**: -- **Values**: one of the following:

                - `Billing Periods` (default)
                - `Days`
                - `Weeks`
                - `Months`
                - `Years`

                **Note**:

                - You must use this field together with the `UpToPeriods` field to specify the time period.
                - This field is applicable only when the `EndDateCondition` field is set to `FixedPeriod`.
              type: string
            UsageRecordRatingOption:
              default: EndOfBillingPeriod
              description: |
                Determines how Zuora processes usage records for per-unit usage charges. 
              enum:
                - EndOfBillingPeriod
                - OnDemand
              type: string
            UseDiscountSpecificAccountingCode:
              description: "Determines whether to define a new accounting code for the new discount charge. **Character limit**: 5 **Values**: `True`, `False` "
              type: boolean
            UseTenantDefaultForPriceChange:
              description: " Applies the tenant-level percentage uplift value for an automatic price change to a termed subscription's renewal. **Character limit**: 5 **Values**: `true`, `false` "
              type: boolean
            WeeklyBillCycleDay:
              description: |2
                 Specifies which day of the week as the bill cycle day (BCD) for the charge.
                This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).

                **Values**: one of the following:

                - `Sunday`
                - `Monday`
                - `Tuesday`
                - `Wednesday`
                - `Thursday`
                - `Friday`
                - `Saturday`
              type: string
          type: object
        - $ref: "#/components/schemas/ProductRatePlanChargeObjectNSFields"
        - $ref: "#/components/schemas/ProductRatePlanChargeObjectCustomFields"
      example:
        AccountingCode: Deferred Revenue
        BillCycleType: DefaultFromCustomer
        BillingPeriod: Month
        ChargeModel: Volume Pricing
        ChargeType: Recurring
        DeferredRevenueAccount: Deferred Revenue
        Name: Recurring flat fee
        ProductRatePlanChargeTierData:
          ProductRatePlanChargeTier:
            - Currency: USD
              Price: 10
        ProductRatePlanId: 2c92c0f8628e007901628f1dc06a453d
        RecognizedRevenueAccount: Accounts Receivable
        TriggerEvent: ContractEffective
        UOM: each
        UseDiscountSpecificAccountingCode: false
    ProxyCreateRefund:
      allOf:
        - properties:
            AccountId:
              description: |2-
                 The ID of the account associated with this refund. This field is only required if you create a non-referenced refund. Don't specify a value for any other type of refund; Zuora associates the refund automatically with the account from the associated payment.
                **Character limit**: 32 **Values**: a valid account ID 
              type: string
            Amount:
              description: |2-
                 The amount of the refund. The amount can't exceed the amount of the associated payment. If the original payment was applied to a single invoice, you can create a partial refund by specifying an amount in this field or through the UI. If the payment was applied to multiple invoices, you can create a partial refund by using the `RefundInvoicePaymentData` field of this operation or through the UI.
                **Character limit**: 16 **Values**: a valid currency amount 
              format: double
              type: number
            Comment:
              description: |2-
                 Use this field to record comments about the refund.
                **Character limit**: 255 **Values**: a string of 255 characters or fewer 
              type: string
            GatewayOptionData:
              description: |
                A field used to pass gateway options. Zuora allows you to pass in special gateway-specific parameters for payments that go through the Adyen, Autorize.et, CyberSource, Merchant eSolutions, Orbital (Chase Paymentech), QValent, Vantiv, and Verifi gateways.

                For each of these special parameters, you supply the name-value pair and Zuora passes it to the gateway. This allows you to add functionality that's supported by a specific gateway but currently not supported by Zuora.
              properties:
                GatewayOption:
                  description: ""
                  items:
                    $ref: "#/components/schemas/GatewayOption"
                  maxItems: 200
                  minItems: 0
                  type: array
              required:
                - GatewayOption
              type: object
            GatewayState:
              description: |2-
                 The status of the payment in the gateway.
                **Character limit**: 19 **Values**: automatically generated 
              type: string
            MethodType:
              description: |2
                 Indicates how an external refund was issued to a customer. This field is only required if the `Type` field is set to ` External`. You can issue an external refund on an electronic payment. **Character limit**: 30 **Values**:

                - `ACH`
                - `Cash`
                - `Check`
                - `CreditCard`
                - `Other`
                - `PayPal`
                - `WireTransfer`
                - `DebitCard`
                - `CreditCardReferenceTransaction`
              type: string
            PaymentId:
              description: |2-
                 The unique ID of the payment associated with this refund. Don't specify a value for this field if you're creating an electronic non-referenced refund.
                **Character limit**: 32 **Values**: a valid payment ID 
              type: string
            PaymentMethodId:
              description: |2-
                 The unique ID of the payment method that the customer used to make the payment. This field is only required if you create a non-referenced refund.
                **Character limit**: 32 **V****alues**: a valid payment method ID 
              type: string
            ReasonCode:
              description: |2-
                 A code identifying the reason for the transaction. Must be an existing reason code or empty. If you do not specify a value, Zuora uses the default reason code.
                **Character limit**: 32 **V****alues**: a valid reason code 
              type: string
            RefundDate:
              description: |
                The date of the refund, in `yyyy-mm-dd` format. The date of the refund cannot be before the payment date. This field is only required if the `Type` field is set to ` External`. Zuora automatically generates this field for electronic refunds.

                With the Future Dated Credit Balance Adjustment feature enabled, you can create a non-referenced refund with a refund date. 
                * For external refunds, you can specify any date.
                * For electronic refunds, you can only set the date to the date when the API operation is called or one day later.
              format: date
              maxLength: 29
              type: string
            RefundInvoicePaymentData:
              description: |
                Container for the refund invoice payment data. This field is only required if you apply a full or partical refund against a payment attached to muliple invoices.
              properties:
                RefundInvoicePayment:
                  description: ""
                  items:
                    $ref: "#/components/schemas/RefundInvoicePayment"
                  maxItems: 200
                  minItems: 0
                  type: array
              required:
                - RefundInvoicePayment
              type: object
            SoftDescriptor:
              description: |2
                 A payment gateway-specific field that maps Zuora to other gateways . **Character limit**: 35 **Values**:

                - 3-byte company identifier &quot;*&quot; 18-byte descriptor
                - 7-byte company identifier &quot;*&quot; 14-byte descriptor
                - 12-byte company identifier &quot;*&quot; 9-byte descriptor
              type: string
            SoftDescriptorPhone:
              description: |2
                 A payment gateway-specific field that maps Zuora to other gateways . **Character limit**: 20 **Values**:

                - Customer service phone number formatted as: `NNN-NNN-NNNN` or `NNN-AAAAAAA`
                - URL (non-e-Commerce): Transactions sent with a URL do not qualify for the best interchange rate
                - Email address
              type: string
            SourceType:
              description: |2
                 Specifies whether the refund is a refund payment or a credit balance. This field is only required if you create a non-referenced refund. If you creating an non-referenced refund, then set this value to `CreditBalance`.
                **Note**: If you have the Invoice Settlement feature enabled, the value of this field can only be set to `Payment`.
                **Character limit**: 13 **Values**:

                - `Payment`
                - `CreditBalance`
              type: string
            Type:
              description: |2
                 Specifies if the refund is electronic or external.
                **Character limit**: 10 **Values**:

                - `Electronic`
                - `External`
              type: string
          required:
            - Amount
            - Type
          type: object
        - $ref: "#/components/schemas/RefundObjectNSFields"
        - $ref: "#/components/schemas/RefundObjectCustomFields"
      example:
        AccountId: 2c93808457d787030157e03190e748ea
        Amount: 1.1
        Comment: this is comments
        PaymentId: 2c93808457d787030157e03197714910
        ReasonCode: Standard Refund
        RefundInvoicePaymentData:
          RefundInvoicePayment:
            - InvoiceId: 2c93808457d787030157e03195604902
              RefundAmount: 1.1
        SoftDescriptor: thisSD
        SoftDescriptorPhone: contact@example.com
        SourceType: Payment
        Type: Electronic
    ProxyCreateTaxationItem:
      allOf:
        - properties:
            AccountingCode:
              description: " The Chart of Accounts "
              type: string
            ExemptAmount:
              description: |2-
                 The calculated tax amount excluded due to the exemption.
                **Character limit**: 16 **Values**: a decimal value 
              format: double
              type: number
            InvoiceItemId:
              description: |2-
                 The ID of the specific invoice item that the taxation information applies to.
                **Character limit**: 32 **Values**: a valid invoice item ID 
              type: string
            Jurisdiction:
              description: |2-
                 The jurisdiction that applies the tax or VAT. This value is typically a state, province, county, or city.
                **Character limit**: 32 **Values**: a string of 32 characterrs or fewer 
              type: string
            LocationCode:
              description: |2-
                 The identifier for the location based on the value of the `TaxCode` field.
                **Character limit**: 32 **Values**: automatically generated 
              type: string
            Name:
              description: |2-
                 The name of the tax rate, such as sales tax or GST. This name is displayed on invoices.
                **Character limit**: 128 **Values**: a string of 128 characters or fewer 
              type: string
            TaxAmount:
              description: |2-
                 The amount of the tax applied to the charge.
                **Character limit**: 16 **Values**: a decimal value 
              format: double
              type: number
            TaxCode:
              description: |2-
                 The tax code identifies which tax rules and tax rates to apply to a specific charge.
                **Character limit**: 32 **Values**: a string of 32 characters or fewer 
              type: string
            TaxCodeDescription:
              description: |2-
                 The description for the tax code.
                **Character limit**: 255 **Values**: a string of 255 characters or fewer 
              type: string
            TaxDate:
              description: |2-
                 The date that the tax is applied to the charge, in `yyyy-mm-dd` format.
                **Character limit**: 29 
              format: date
              type: string
            TaxRate:
              description: |2-
                 The tax rate applied to the charge.
                **Character limit**: 16 **Values**: a valid decimal value 
              format: double
              type: number
            TaxRateDescription:
              description: |2-
                 The description of the tax rate.
                **Character limit**: 255 **Values**: a string of 255 characters or fewer 
              type: string
            TaxRateType:
              description: |2-
                 The type of the tax rate applied to the charge.
                **Character limit**: 10 **Values**: `Percentage`, `FlatFee` 
              type: string
          required:
            - InvoiceItemId
            - Jurisdiction
            - Name
            - TaxAmount
            - TaxRate
            - TaxDate
            - TaxRateType
          type: object
        - $ref: "#/components/schemas/TaxationItemObjectCustomFields"
      example:
        AccountingCode: Usage Revenue
        ExemptAmount: 50
        InvoiceItemId: 2c93808457d787030157e0306cd43a88
        Jurisdiction: test
        LocationCode: code - 001
        Name: test
        TaxAmount: 3
        TaxCode: taxcode
        TaxCodeDescription: description
        TaxDate: 2016-10-20
        TaxMode: TaxExclusive
        TaxRate: 3
        TaxRateDescription: test
        TaxRateType: FlatFee
    ProxyCreateUnitOfMeasure:
      example:
        Active: true
        DecimalPlaces: 9
        DisplayedAs: name_display_name_1476935033519
        RoundingMode: UP
        UomName: name_1476935033519
      properties:
        Active:
          description: |2-
             Indicates if the UOM is available for new product rate plans. The default value is `true`.
            **Character limit**: 5 **Values**: `true`, `false ` 
          type: boolean
        DecimalPlaces:
          description: "The number of digits to the right of the decimal point that you want to measure for the unit. To use whole numbers only, set this value to 0. You can't change this value after this `UOM` is used in any product, subscription, or usage. **Character limit**: 1 **Values**: an integer between 0 and 9, exclusive "
          format: int64
          type: integer
        DisplayedAs:
          description: "The name of the UOM that you want displayed on invoices. The default value is the `UomName` field value. **Character limit**: 50 **Values**: A string of 50 characters or fewer "
          type: string
        RoundingMode:
          description: |2-
             Specifies whether to round the UOM value up or down when the value exceeds the `DecimalPlaces` field value. The default value is `Up`.
            **Character limit**: 4 **Values**: `Up`, `Down` 
          type: string
        UomName:
          description: |2-
             The name of the UOM, such as license or GB. This name is displayed in query results and in the web-based UI labels. If you want a different name to be displayed on invoices, then use the `DisplayedAs` field to provide the invoice label.
            **Character limit**: 50 **Values**: a string of 50 characters or fewer 
          type: string
      required:
        - DecimalPlaces
        - UomName
      type: object
    ProxyCreateUsage:
      allOf:
        - properties:
            AccountId:
              description: |2-
                 The ID of the account associated with the usage data. This field is only required if no value is specified for the `AccountNumber` field.
                **Character limit**: 32 **Values**: a valid account ID. 
              type: string
            AccountNumber:
              description: |2-
                 The number of the account associated with the usage data. This field is only required if no value is specified for the `AccountId` field.
                **Character limit**: 50 **Values**: a valid account number. 
              type: string
            ChargeId:
              description: " The OrginalId of the rate plan charge related to the usage record, e.g., `2c9081a03c63c94c013c6873357a0117` **Character limit**: 32 **Values**: a valid rate plan charge OriginalID. "
              type: string
            ChargeNumber:
              description: |
                A unique number for the rate plan charge related to the usage record. For example, C-00000007.
              maxLength: 50
              type: string
            Description:
              description: |
                A description of the usage record.
              maxLength: 200
              type: string
            EndDateTime:
              description: |2-
                 The end date and time of a range of time when usage is tracked. Use this field for reporting; this field doesn't affect usage calculation.
                **Character limit**: 29 **Values**: a valid date and time value. 
              format: date-time
              type: string
            Quantity:
              description: |2-
                 Indicates the number of units used.
                **Character limit**: 16 **Values**: a valid decimal amount equal to or greater than 0 
              format: double
              type: number
            StartDateTime:
              description: |2-
                 The start date and time of a range of time when usage is tracked. Zuora uses this field value to determine the usage date. Unlike the `EndDateTime`, the `StartDateTime` field does affect usage calculation.
                **Character limit**: 29 **Values**: a valid date and time value 
              format: date-time
              type: string
            SubmissionDateTime:
              description: |2-
                 The date when usage was submitted.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
              type: string
            SubscriptionId:
              description: |
                The ID of the subscription that contains the fees related to the usage data.

                The ID of a subscription might change when you create amendments to the subscription. It is good practice to use the unique subscription number that you can specify in the `SubscriptionNumber` field.
              maxLength: 32
              type: string
            SubscriptionNumber:
              description: |
                The unique identifier number of the subscription that contains the fees related to the usage data.

                It is good practice to use this field when creating usage records.
              maxLength: 100
              type: string
            UOM:
              description: |2-
                 Specifies the units to measure usage. Units of measure are configured in the web-based UI. Your values depend on your configuration in **Billing Settings**.
                **Character limit**: **Values**: a valid unit of measure 
              type: string
          required:
            - Quantity
            - StartDateTime
            - UOM
          type: object
        - $ref: "#/components/schemas/UsageObjectCustomFields"
      example:
        AccountId: 2c92c0f956bc8fb40156d502fc3718b1
        ChargeNumber: C-00000229
        Description: test
        Quantity: 9
        StartDateTime: 2017-12-01T16:41:36.000+01:00
        SubscriptionNumber: A-S00000100
        UOM: Each
    ProxyDeleteResponse:
      properties:
        id:
          description: ""
          type: string
        success:
          description: ""
          type: boolean
      type: object
    ProxyGetAccount:
      allOf:
        - properties:
            AccountNumber:
              description: |
                Unique account number assigned to the account. **Character limit**: 50 **Values**: one of the following:

                - null to auto-generate
                - a string of 50 characters or fewer that doesn't begin with the default account number prefix
              type: string
            AdditionalEmailAddresses:
              description: "List of additional email addresses to receive emailed invoices. **Character limit**: 120 **Values**: comma-separated list of email addresses "
              type: string
            AllowInvoiceEdit:
              description: |2-
                 Indicates if associated invoices can be edited.
                **Character limit**: 5 **Values**: `true`, `false` (default if left null) 
              type: boolean
            AutoPay:
              description: |2-
                 Indicates if future payments are automatically collected when they're due during a Payment Run.
                **Character limit**: 5 **Values**: `true`, `false` (default) 
              type: boolean
            Balance:
              description: "Current outstanding balance for the account. **Character limit**: 16 **Values**: automatically generated "
              format: double
              type: number
            Batch:
              description: |2-
                 Organizes your customer accounts into groups to optimize your billing and payment operations. Required if you use the Subscribe call
                **Character limit**: 20 **Values**:any system-defined batch (`Batch1` - `Batch50 `or by name). 
              type: string
            BcdSettingOption:
              description: "Billing cycle day setting option. **Character limit**: 9 **Values**: `AutoSet`, `ManualSet` "
              type: string
            BillCycleDay:
              description: "Billing cycle day (BCD) on which bill runs generate invoices for the account. **Character limit**: 2 **Values**: any activated system-defined bill cycle day (`1` - `31`) "
              format: int32
              type: integer
            BillToId:
              description: "ID of the person to bill for the account. **Character limit**: 32 **Values**: a valid contact ID for the account "
              type: string
            CommunicationProfileId:
              description: "Associates the account with a specified communication profile. **Character limit**: 32 **Values**: a valid communication profile ID "
              type: string
            CreatedById:
              description: "ID of the Zuora user who created the Account object. **Character limit**: 32 **Values**: automatically generated "
              type: string
            CreatedDate:
              description: "Date when the Account object was created. **Character limit**: 29 **Values**: automatically generated "
              format: date-time
              type: string
            CreditBalance:
              description: "Total credit balance for the account. **Character limit**: 16 **Values**: automatically generated "
              format: double
              type: number
            CrmId:
              description: "CRM account ID for the account. A CRM is a customer relationship management system, such as Salesforce.com. **Character limit**: 100 **Values**: a string of 100 characters or fewer "
              type: string
            Currency:
              description: " Currency that the customer is billed in. "
              type: string
            CustomerServiceRepName:
              description: "Name of the account's customer service representative, if applicable. **Character limit**: 50 **Values**: a string of 50 characters or fewer "
              type: string
            DefaultPaymentMethodId:
              description: "ID of the default payment method for the account. This field is required if the AutoPay field is set to `true`. **Character limit**: 32 **Values**: a valid ID for an existing payment method "
              type: string
            Id:
              description: Object identifier.
              type: string
            InvoiceDeliveryPrefsEmail:
              description: "Indicates if the customer wants to receive invoices through email.  **Character limit**: 5 **Values**: `true`, `false` (default if left null) "
              type: boolean
            InvoiceDeliveryPrefsPrint:
              description: "Indicates if the customer wants to receive printed invoices, such as through postal mail. **Character limit**: 5 **Values**: `true`, `false` (default if left null) "
              type: boolean
            InvoiceTemplateId:
              description: "The ID of the invoice template. Each customer account can use a specific invoice template for invoice generation. **Character limit**: 32 **Values**: a valid template ID configured in Zuora Billing Settings "
              type: string
            LastInvoiceDate:
              description: |2-
                 The date when the previous invoice was generated for the account. The field value is null if no invoice has ever been generated for the account.
                **Character limit**: 29 **Values**: automatically generated 
              format: date
              type: string
            Name:
              description: "Name of the account as displayed in the Zuora UI. **Character limit**: 255 **Values**: a string of 255 characters or fewer "
              type: string
            Notes:
              description: " Comments about the account. **Character limit**: 65,535 **Values**: a string of 65,535 characters "
              type: string
            ParentId:
              description: "Identifier of the parent customer account for this Account object. Use this field if you have customer hierarchy enabled. **Character limit**: 32 **Values**: a valid account ID "
              type: string
            PaymentGateway:
              description: |
                Gateway used for processing electronic payments and refunds. **Character limit**: 40 **Values**: one of the following:

                - a valid configured gateway name
                - Null to inherit the default value set in Payment Settings
              type: string
            PaymentTerm:
              description: "Indicates when the customer pays for subscriptions. **Character limit**: 100 **Values**: a valid, active payment term defined in the web-based UI administrative settings "
              type: string
            PurchaseOrderNumber:
              description: "The number of the purchase order associated with this account. Purchase order information generally comes from customers. **Character limit**: 100 **Values**: a string of 100 characters or fewer "
              type: string
            SalesRepName:
              description: "The name of the sales representative associated with this account, if applicable. **Character limit**: 50 **Values**: a string of 50 characters or fewer "
              type: string
            SoldToId:
              description: "ID of the person who bought the subscription associated with the account. **Character limit**: 32 **Values**: a valid contact ID for the account "
              type: string
            Status:
              description: |
                Status of the account in the system.
              enum:
                - Draft
                - Active
                - Canceled
              type: string
            TaxCompanyCode:
              description: |2-
                 Unique code that identifies a company account in Avalara. Use this field to calculate taxes based on origin and sold-to addresses in Avalara.
                This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).

                **Character limit**: 50 **Values**: a valid company code 
              type: string
            TaxExemptCertificateID:
              description: "ID of your customer's tax exemption certificate. **Character limit**: 32 **Values**: a string of 32 characters or fewer "
              type: string
            TaxExemptCertificateType:
              description: "Type of the tax exemption certificate that your customer holds.  **Character limit**: 32 **Values**: a string of 32 characters or fewer "
              type: string
            TaxExemptDescription:
              description: "Description of the tax exemption certificate that your customer holds. **Character limit**: 500 **Values**: a string of 500 characters or fewer "
              type: string
            TaxExemptEffectiveDate:
              description: "Date when the the customer's tax exemption starts. **Character limit**: 29 **Version notes**: requires Zuora Tax "
              format: date
              type: string
            TaxExemptExpirationDate:
              description: "Date when the customer's tax exemption certificate expires  **Character limit**: 29 **Version notes**: requires Zuora Tax "
              format: date
              type: string
            TaxExemptIssuingJurisdiction:
              description: "Indicates the jurisdiction in which the customer's tax exemption certificate was issued. **Character limit**: 32 **Values**: a string of 32 characters or fewer "
              type: string
            TaxExemptStatus:
              description: |2
                 Status of the account's tax exemption. Required if you use Zuora Tax.
                **Character limit**: 19 **Values**: one of the following:

                - `Yes`
                - `No`
                - `PendingVerification`
              type: string
            TotalInvoiceBalance:
              description: "Total balance of the account's invoices. **Character limit**: 16 **Values**: a valid currency value "
              format: double
              type: number
            UpdatedById:
              description: "ID of the user who last updated the account. **Character limit**: 32 **Values**: automatically generated "
              type: string
            UpdatedDate:
              description: "Date when the account was last updated. **Character limit**: 29 **Values**: automatically generated "
              format: date-time
              type: string
            VATId:
              description: |2-
                 EU Value Added Tax ID.
                This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).

                **Character limit**: 25 **Values**: a valid Value Added Tax ID 
              type: string
          type: object
        - $ref: "#/components/schemas/AccountObjectNSFields"
        - $ref: "#/components/schemas/AccountObjectCustomFields"
    ProxyGetAmendment:
      allOf:
        - properties:
            AutoRenew:
              description: |2-
                 Determines whether the subscription is automatically renewed, or whether it expires at the end of the term and needs to be manually renewed. **Required:** For amendment of type TermsAndConditions when changing the automatic renewal status of a subscription.
                **Values**: true, false 
              type: boolean
            Code:
              description: |2
                 A unique alphanumeric string that identifies the amendment.
                **Character limit**: 50 **Values**: one of the following:

                - `null` generates a value automatically
                - A string
              type: string
            ContractEffectiveDate:
              description: |2-
                 The date when the amendment's changes become effective for billing purposes.
                **Version notes**: -- 
              format: date
              type: string
            CreatedById:
              description: |2-
                 The user ID of the person who created the amendment.
                **Character limit**: 32 **Values**: automatically generated 
              type: string
            CreatedDate:
              description: |2-
                 The date when the amendment was created.
                **Values**: automatically generated 
              format: date-time
              type: string
            CurrentTerm:
              description: |2-
                 The length of the period for the current subscription term. This field can be updated when Status is `Draft`.
                **Required**: Only if the value of the Type field is set to `TermsAndConditions` and TermType is set to `TERMED`. This field is not required if TermType is set to `EVERGREEN`.
                **Character limit**: **Values**: a valid number 
              format: int64
              type: integer
            CurrentTermPeriodType:
              description: |2
                 The period type for the current subscription term. **Values**:

                - `Month` (default)
                - `Year`
                - `Day`
                - `Week`
                **Note**:

                - This field can be updated when Status is `Draft`.
                - This field is used with the CurrentTerm field to specify the current subscription term.
              type: string
            CustomerAcceptanceDate:
              description: |
                The date when the customer accepts the amendment's changes to the subscription.

                This field is only required if [Zuora is configured to require customer acceptance in Z-Billing](https://knowledgecenter.zuora.com/CB_Billing/W_Billing_and_Payments_Settings/Define_Default_Subscription_Settings) and the subscription is currently in the Pending Acceptance status (the value of the `Status` field is currently `PendingAcceptance`).
              format: date
              type: string
            Description:
              description: |2-
                 A description of the amendment.
                **Character limit**: 500 **Values**: maximum 500 characters 
              type: string
            EffectiveDate:
              description: |2-
                 The date when the amendment's changes take effective. This field validates that the amendment's changes are within valid ranges of products and product rate plans.
                **Required**: For the cancellation amendments. Optional for other types of amendments.
                **Version notes**: -- 
              format: date
              type: string
            Id:
              description: Object identifier.
              type: string
            Name:
              description: |2-
                 The name of the amendment.
                **Character limit**: 100 **Values**: a string of 100 characters or fewer 
              type: string
            RenewalSetting:
              description: |2-
                 Specifies whether a termed subscription will remain termed or change to evergreen when it is renewed.
                **Required**: If TermType is Termed **Values**: RENEW_WITH_SPECIFIC_TERM (default), RENEW_TO_EVERGREEN 
              type: string
            RenewalTerm:
              description: |2-
                 The term of renewal for the amended subscription. This field can be updated when Status is `Draft`.
                **Required**: Only if the value of the Type field is set to `TermsAndConditions`.
                **Character limit**: **Values:** a valid number 
              format: int64
              type: integer
            RenewalTermPeriodType:
              description: |2
                 The period type for the subscription renewal term. This field can be updated when Status is `Draft`.
                **Required**: Only if the value of the Type field is set to `TermsAndConditions`. This field is used with the RenewalTerm field to specify the subscription renewal term.
                **Values**:

                - `Month` (default)
                - `Year`
                - `Day`
                - `Week`
              type: string
            ServiceActivationDate:
              description: |
                The date when service is activated.

                This field is only required if [Zuora is configured to require service activation in Z-Billing](https://knowledgecenter.zuora.com/CB_Billing/W_Billing_and_Payments_Settings/Define_Default_Subscription_Settings) and the subscription is currently in the Pending Activation status (the value of the `Status` field is currently `PendingActivation`).
              format: date
              type: string
            SpecificUpdateDate:
              description: |2-
                 The date when the UpdateProduct amendment takes effect. This field is only applicable if there is already a future-dated UpdateProduct amendment on the subscription.
                **Required**: Only for the UpdateProduct amendments if there is already a future-dated UpdateProduct amendment on the subscription.
                **Version notes**: -- 
              format: date
              type: string
            Status:
              description: |2
                 The status of the amendment. Type: string (enum) **Character limit**: 17 **Values**: one of the following:

                - Draft (default, if left null)
                - Pending Activation
                - Pending Acceptance
                - Completed
              type: string
            SubscriptionId:
              description: |2-
                 The ID of the subscription that the amendment changes.
                **Character limit**: 32 **Values**: a valid subscription ID 
              type: string
            TermStartDate:
              description: |2-
                 The date when the new terms and conditions take effect.


                **Version notes**: -- 
              format: date
              type: string
            TermType:
              description: |2-
                 Indicates if the subscription isTERMED or EVERGREEN.

                - A TERMED subscription has an expiration date, and must be manually renewed.
                - An EVERGREEN subscription doesn't have an expiration date, and must be manually ended.

                **Required**: Only when as part of an amendment of type TermsAndConditions &#65279;to change the term type of a subscription. Type: string **Character limit**: 9 **Values**: TERMED, EVERGREEN 
              type: string
            Type:
              description: |2
                 The type of amendment.
                **Character limit**: 18 **Values**: one of the following:

                - Cancellation
                - NewProduct
                - OwnerTransfer
                - RemoveProduct
                - Renewal
                - UpdateProduct
                - TermsAndConditions
                - SuspendSubscription
                - ResumeSubscription
              type: string
            UpdatedById:
              description: |2-
                 The ID of the user who last updated the amendment.
                **Character limit**: 32 **Values**: automatically generated 
              type: string
            UpdatedDate:
              description: |2-
                 The date when the amendment was last updated.
                **Values**: automatically generated 
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/AmendmentObjectCustomFields"
    ProxyGetBillRun:
      properties:
        AccountId:
          description: |
            ID of the account used for single account bill run.

            **Character limit:** 32
          type: string
        AutoEmail:
          description: |
            Determines whether to auto send email or not once the bill run completes.

            **Note:** You must enable the [Support Bill Run Auto-Post Billing](https://knowledgecenter.zuora.com/CB_Billing/Billing_Settings/Define_Billing_Rules) rule to pass this field.
          type: boolean
        AutoPost:
          description: |
            Determines whether to auto post bill run or not once the bill run completes.

            **Note:** You must enable the [Support Bill Run Auto-Post Billing](https://knowledgecenter.zuora.com/CB_Billing/Billing_Settings/Define_Billing_Rules) rule to pass this field.
          type: boolean
        AutoRenewal:
          description: |
            Determines whether to auto renew subscription or not by this bill run once the bill run completes.
          type: boolean
        Batch:
          description: |
            Batch of accounts for this bill run. 

            **Character limit:** 20

            **Values:** AllBatches or Batchn where n is a number between 1 and 50.
          type: string
        BillCycleDay:
          description: |
            The day of the bill cycle.

            **Character limit:** 32

            **Values:** `AllBillCycleDays` or 01 - 31.
          type: string
        BillRunNumber:
          description: |
            Number of the bill run.

            **Character limit:** 50

            **Values:** automatically generated
          type: string
        CreatedById:
          description: |
            The user ID of the person who created the bill run.

            **Character limit:** 32

            **Values:** automatically generated         
          type: string
        CreatedDate:
          description: |
            The date and time when the bill run was created.

            **Character limit:** 29

            **Values:** automatically generated           
          format: date-time
          type: string
        ExecutedDate:
          description: |
            The date and time when the bill run was executed.
          format: date-time
          type: string
        Id:
          description: |
            ID of the object.

            **Character limit:** 32

            **Values:** automatically generated
          type: string
        InvoiceDate:
          description: |
            Invoice date for this bill run.

            **Character limit:** 29
          format: date
          type: string
        InvoicesEmailed:
          description: |
            Indicates whether the invoice has been sent or not. 

            **Values:** automatically generated           
          type: boolean
        LastEmailSentTime:
          description: |
            The last time emails were sent for this bill run.

            **Character limit:** 29

            **Values:** automatically generated
          format: date-time
          type: string
        NoEmailForZeroAmountInvoice:
          description: |
            Determines whether to suppress email for invoices with zero total or not for this bill run once the bill run completes. (Do not email invoices with 0 Invoice Total).
          type: boolean
        NumberOfAccounts:
          description: |
            The number of accounts processed by this bill run.

            **Values:** automatically generated
          format: int64
          type: integer
        NumberOfInvoices:
          description: |
            The number of invoices generated by this  run.

            **Values:** automatically generated
          format: int64
          type: integer
        Status:
          description: |
            The status  for this bill run. See [Status Types](https://knowledgecenter.zuora.com/CB_Billing/J_Billing_Operations/G_Bill_Runs#Status_Types) for more information.

            **Character limit:** 20

            **Values:** 

              * `Pending`
              * `Processing`
              * `Completed`
              * `Error`
              * `Canceled`
              * `Posted`
          type: string
        TargetDate:
          description: |
            Target date for this bill run. See [Create Bill Run](https://knowledgecenter.zuora.com/CB_Billing/J_Billing_Operations/G_Bill_Runs/Creating_Bill_Runs) for more information.

            **Character limit:** 29
          format: date
          type: string
        UpdatedById:
          description: |
            The user ID of the person who last updated the bill run.

            **Character limit:** 32

            **Values:** automatically generated         
          type: string
        UpdatedDate:
          description: |
            The date and time when the bill run was last updated.

            **Character limit:** 29

            **Values:** automatically generated 
          format: date-time
          type: string
      type: object
    ProxyGetCommunicationProfile:
      properties:
        CreatedById:
          description: ""
          type: string
        CreatedDate:
          description: ""
          format: date-time
          type: string
        Description:
          description: ""
          type: string
        Id:
          description: Object identifier.
          type: string
        ProfileName:
          description: ""
          type: string
        UpdatedById:
          description: ""
          type: string
        UpdatedDate:
          description: ""
          format: date-time
          type: string
      type: object
    ProxyGetContact:
      allOf:
        - properties:
            AccountId:
              description: |2-
                 The Zuora account ID associated with this contact. This field is not required when you use the Subscribe call. This field is required for all other calls.
                **Character limit: **32 **Values: **a valid account ID 
              type: string
            Address1:
              description: |2-
                 The first line of the contact's address, which is often a street address or business name.
                **Character limit**: 255 **Values**: a string of 255 characters or fewer 
              type: string
            Address2:
              description: |2-
                 The second line of the contact's address.
                **Character limit**: 255 **Values**: a string of 255 characters or fewer 
              type: string
            City:
              description: |2-
                 The city of the contact's address.
                **Character limit**: 40 **Values: **a string of 40 characters or fewer 
              type: string
            Country:
              description: " The country of the contact's address. "
              type: string
            County:
              description: |2-
                 The county. May optionally be used by Zuora Tax to calculate county tax.
                **Character limit**: 32 **Values**: a string of 32 characters or fewer 
              type: string
            CreatedById:
              description: "The ID of the Zuora user who created the contact. **Character limit**: 32 **Values**: automatically generated "
              type: string
            CreatedDate:
              description: "The date when the contact was created. **Character limit**: 29 **Values**: automatically generated "
              format: date-time
              type: string
            Description:
              description: |2-
                 A description for the contact.
                **Character limit**: 100 **Values**: a string of 100 characters or fewer 
              type: string
            Fax:
              description: |2-
                 The contact's fax number.
                **Character limit**: 40 **Values**: a string of 40 characters or fewer 
              type: string
            FirstName:
              description: |2-
                 The contact's first name.
                **Character limit**: 100 **Values**: a string of the contact's first name 
              type: string
            HomePhone:
              description: |2-
                 The contact's home phone number.
                **Character limit**: 40 **Values**: a string of 40 characters or fewer 
              type: string
            Id:
              description: Object identifier.
              type: string
            LastName:
              description: |2-
                 The contact's last name.
                **Character limit**: 100 **Values**: a string of 100 characters or fewer 
              type: string
            MobilePhone:
              description: |2-
                 The contact's mobile phone number.
                **Character limit**: 40 **Values**: a string of 40 characters or fewer 
              type: string
            NickName:
              description: |2-
                 A nickname for the contact.
                **Character limit**: 100 **Values**: a string of 100 characters or fewer 
              type: string
            OtherPhone:
              description: |2-
                 An additional phone number for the contact.
                **Character limit**: 40 **Values**: a string of 40 characters or fewer 
              type: string
            OtherPhoneType:
              description: "The type of the `OtherPhone`. **Character limit**: 20 **Values**: `Work`, `Mobile`, `Home`, `Other` "
              type: string
            PersonalEmail:
              description: |2-
                 The contact's personal email address.
                **Character limit**: 80 **Values**: a string of 80 characters or fewer 
              type: string
            PostalCode:
              description: |2-
                 The zip code for the contact's address.
                **Character limit:** 20 **Values: **a string of 20 characters or fewer 
              type: string
            State:
              description: " The state or province of the contact's address. "
              type: string
            TaxRegion:
              description: "If using Zuora Tax rules "
              type: string
            UpdatedById:
              description: |2-
                 The ID of the user who lasted updated the contact.
                **Character limit**: 32 **Values**: automatically generated 
              type: string
            UpdatedDate:
              description: |2-
                 The date when the contact was last updated.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
              type: string
            WorkEmail:
              description: |2-
                 The contact's business email address.
                **Character limit**: 80 **Values**: a string of 80 characters or fewer 
              type: string
            WorkPhone:
              description: |2-
                 The contact's business phone number.
                **Character limit**: 40 **notes**: -- **Values**: a string of 40 characters or fewer 
              type: string
          type: object
        - $ref: "#/components/schemas/ContactObjectCustomFields"
    ProxyGetCreditBalanceAdjustment:
      allOf:
        - properties:
            AccountId:
              description: |2
                 The account ID of the credit balance's account. Zuora generates this value from the source transaction.
                **Character limit**: 32 **Values**: automatically generated from:

                - CreditBalanceAdjustment.SourceTransactionId or
                - CreditBalanceAdjustment.SourceTransactionNumber
              type: string
            AccountingCode:
              description: " The Chart of Accounts "
              type: string
            AdjustmentDate:
              description: |2-
                 The date when the credit balance adjustment is applied.
                **Character limit**: 29 **Values**: automatically generated 
              format: date
              type: string
            Amount:
              description: |2-
                 The amount of the adjustment.
                **Character limit**: 16 **Values**: a valid currency amount 
              format: double
              type: number
            CancelledOn:
              description: |2-
                 The date when the credit balance adjustment was canceled.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
              type: string
            Comment:
              description: |2-
                 Use this field to record comments about the credit balance adjustment.
                **Character limit**: 255 **Values**: a string of 255 characters or fewer 
              type: string
            CreatedById:
              description: |2-
                 The user ID of the person who created the credit balance adjustment.
                **Character limit**: 32 **Values**: automatically generated 
              type: string
            CreatedDate:
              description: |2-
                 The date when the credit balance adjustmentwas generated.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
              type: string
            Id:
              description: Object identifier.
              type: string
            Number:
              description: |2-
                 A unique identifier for the credit balance adjustment. Zuora generates this number in the format, <em>CBA-xxxxxxxx</em>, such as CBA-00375919.
                **Character limit**: 255 **Values**: automatically generated 
              type: string
            ReasonCode:
              description: |2-
                 A code identifying the reason for the transaction. Must be an existing reason code or empty. If you do not specify a value, Zuora uses the default reason code.
                **Character limit**: 32 **Values**: a valid reason code 
              type: string
            ReferenceId:
              description: |2-
                 The ID of the payment that the credit balance adjustment is for.
                **Character limit**: 100 **Values**: a string of 100 characters or fewer 
              type: string
            SourceTransactionId:
              description: |2
                 The ID of the object that the credit balance adjustment is applied to. You must specify a value for either the `SourceTransactionId` field or the `SourceTransactionNumber` field.
                **Character limit**: 32 **Values**: one of the following:

                - InvoiceId
                - PaymentId
                - RefundId
              type: string
            SourceTransactionNumber:
              description: |2
                 The number of the object that the credit balance adjustment is applied to. You must specify a value for either the `SourceTransactionId` field or the `SourceTransactionNumber` field.
                **Character limit**: 50 **Values**: one of the following:

                - InvoiceNumber
                - PaymentNumber
                - RefundNumber
              type: string
            SourceTransactionType:
              description: |2
                 The source of the credit balance adjustment.
                **Character limit**: **Values**: automatically generated; one of the following:

                - Invoice
                - Payment
                - Refund
              type: string
            Status:
              description: |2
                 The status of the credit balance adjustment.
                **Character limit**: 9 **Values**: automatically generated; one of the following:

                - Processed
                - Canceled
              type: string
            TransferredToAccounting:
              description: |
                Status of the credit balance adjustment's transfer to an external accounting system, such as NetSuite.
              enum:
                - Processing
                - Yes
                - No
                - Error
                - Ignore
              type: string
            Type:
              description: Create Query Filter
              type: string
            UpdatedById:
              description: |2-
                 The ID of the user who last updated the credit balance adjustment.
                **Character limit**: 32 **Values**: automatically generated 
              type: string
            UpdatedDate:
              description: |2-
                 The date when the credit balance adjustment was last updated.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/CreditBalanceAdjustmentObjectNSFields"
        - $ref: "#/components/schemas/CreditBalanceAdjustmentObjectCustomFields"
    ProxyGetExport:
      properties:
        ConvertToCurrencies:
          description: |2-
             The currencies that you want to convert transaction amounts into. You can specify any number of currencies. Specify the currencies using their Foreign Currency Conversion enabled to use this field.
            **Character limit**: **Values**: a list of valid currency codes 
          type: string
        CreatedById:
          description: |2-
             The user ID of the person who created the export.
            **Character limit**: 32 **Values**: automatically generated 
          type: string
        CreatedDate:
          description: |2-
             The date when the import was created.
            **Character limit**: 29 **Values**: automatically generated 
          format: date-time
          type: string
        Encrypted:
          description: |2-
             Exports a secure version of encrypted data source fields. such as the AchAccountNumber field of the PaymentMethod object and the DefaultPaymentMethod data souce objects.
            **Character limit**: 5 **Values:** true, false 
          type: boolean
        FileId:
          description: |2-
             The ID of the file generated by an export query. This file is automatically generated when an Export object is created. Use this file ID with [Get files](https://www.zuora.com/developer/api-reference/#operation/GET_Files) to download the export file.
            **Character limit**: 32 **Values**: automatically generated 
          type: string
        Format:
          description: |2-
             The format that you want the export file to use.
            **Character limit**: 5 
          enum:
            - csv
            - html
            - Excel
          type: string
        Id:
          description: Object identifier.
          type: string
        Name:
          description: |2-
             The name of the export.
            **Character limit**: 255 **Values**: a string of 255 characters or fewer 
          type: string
        Query:
          description: |
            [Export ZOQL](https://knowledgecenter.zuora.com/DC_Developers/M_Export_ZOQL) query.
          type: string
        Size:
          description: |2-
             The number of records or rows exported. This field value is null until the export status is Completed.
            **Character limit**: **Values**: automatically generated 
          format: int32
          type: integer
        Status:
          description: |2
             The status of the export. Type: string (enum) **Character limit**: 10 **Values**: automatically generated to be one of the following values:

            - Pending
            - Processing
            - Completed
            - Canceled
            - Failed
          type: string
        StatusReason:
          description: |2-
             The reason for the given status. Use this information to help ascertain why an export failed.
            **Character limi**t: 255 **Values**: automatically generated 
          type: string
        UpdatedById:
          description: |2-
             The ID of the user who last updated the export.
            **Character limit**: 32 **Values**: automatically generated 
          type: string
        UpdatedDate:
          description: |2-
             The date when the expotr was last updated.
            **Character limit**: 29 **Values**: automatically generated 
          format: date-time
          type: string
        Zip:
          description: |2-
             Indicates if you want the resulting export file to be compressed into a zip file.
            **Character limit**: **Values**: true, false (default) 
          type: boolean
      type: object
    ProxyGetFeature:
      allOf:
        - properties:
            CreatedById:
              description: " Internal Zuora ID of the user who created the feature **Character limit**: 32 "
              type: string
            CreatedDate:
              description: " Date and time when the feature was created **Character limit**: 29 "
              format: date-time
              type: string
            Description:
              description: " Description of the feature **Character limit**: 1000 "
              type: string
            FeatureCode:
              description: " Unique code of the feature **Character limit**: 255 "
              type: string
            Id:
              description: Object identifier.
              type: string
            Name:
              description: " Name of the feature **Character limit**: 255 "
              type: string
            Status:
              description: " Status of the feature, Active or Inactive **Character limit**: 8 "
              type: string
            UpdatedById:
              description: " Internal Zuora ID of the user who last updated the feature **Character limit**: 32 "
              type: string
            UpdatedDate:
              description: " Date and time when the feature was last updated **Character limit**: 29 "
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/FeatureObjectCustomFields"
    ProxyGetImport:
      properties:
        CreatedById:
          description: |2-
             The user ID of the person who created the import.

            **Character limit**: 32

            **Values**: automatically generated 
          type: string
        CreatedDate:
          description: |2-
             The date when the import was created.

            **Character limit**: 29

            **Values**: automatically generated 
          format: date-time
          type: string
        Id:
          description: Object identifier.
          type: string
        ImportType:
          description: |2-
             The type of item imported.

            **Character limit**: 7

            **Values**: Usage 
          type: string
        ImportedCount:
          description: |-
            The number of records successfully imported.

            **Values**: automatically generated 
          format: int32
          type: integer
        Md5:
          description: |2-
             A check to validate the import file's integrity.

            **Character limit:** 32

            **System-generated:** no

            **Values**: a string of 32 characters or fewer 
          type: string
        Name:
          description: |2
             A descriptive name for the import.

            **Character limit:** 100

            **Values:** one of the following:

            - a string of 100 characters or fewer
            - if NULL default is: `import <ImportType_value>`
          type: string
        OriginalResourceUrl:
          description: |2-
             The URL for your import file, which contains your records for upload. When you upload the file, Zuora assigns it to this address.

            **Values:** automatic dynamically-generated URL 
          type: string
        ResultResourceUrl:
          description: |2-
             The URL for the import result file, which is a zipped CSV file.

            **Values**: automatic dynamically-generated URL 
          type: string
        Status:
          description: |
            The status of the import process.

            **Values**: automatically generated using one of the following values:

            - Pending
            - Processing
            - Completed
            - Failed
          type: string
        StatusReason:
          description: |2-
             The reason for the system-generated status. Use this information if the import fails.

            **Character limit**: 2000

            **Values**: automatically generated error message 
          type: string
        TotalCount:
          description: |2-
             The number of records in the import file.

            **Character limit**:

            **Values**: automatically generated 
          format: int32
          type: integer
        UpdatedById:
          description: |2-
             The ID of the user who last updated the import.

            **Character limit**: 32

            **Values**: automatically generated 
          type: string
        UpdatedDate:
          description: |2-
             The date when the import was last updated.
            **Character limit**: 29 **Values**: automatically generated 
          format: date-time
          type: string
      type: object
    ProxyGetInvoice:
      allOf:
        - properties:
            AccountId:
              description: ""
              type: string
            AdjustmentAmount:
              description: " The amount of the invoice adjustments associated with the invoice. **Character limi**t: 16 **Values**: a valid currency amount "
              format: double
              type: number
            Amount:
              description: |2-
                 The sum of all charges and taxes associated with the invoice.
                **Character limit**: 16 **Values**: automatically generated 
              format: double
              type: number
            AmountWithoutTax:
              description: |2-
                 The sum of all charges associated with the invoice. Taxes are excluded from this value.
                **Character limit**: 16 **Values**: automatically generated 
              format: double
              type: number
            Balance:
              description: |2-
                 The remaining balance of the invoice after all payments, adjustments, and refunds are applied.
                **Character limit**: 16 **Values**: automatically generated 
              format: double
              type: number
            Body:
              description: " Required "
              type: string
            Comments:
              description: |2-
                 Additional information related to the invoice that a Zuora user added to the invoice.
                **Character limit**: 255 **Values:** a string of 255 characters or fewer 
              type: string
            CreatedById:
              description: |2-
                 The user ID of the person who created the invoice. If a bill run generated the invoice, then the value is the user ID of person who created the bill run.
                **Character limit**: 32 **Values**: automatically generated 
              type: string
            CreatedDate:
              description: |2-
                 The date when the invoice was generated.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
              type: string
            CreditBalanceAdjustmentAmount:
              description: |2+
                 The currency amount of the adjustment applied to the customer's credit balance.
                **Character limit**: 16 **Values**: a valid currency amount This field is only available if the [Zuora Global Support](http://support.zuora.com/) to enable this feature.


              format: double
              type: number
            DueDate:
              description: |2-
                 The date by which the payment for this invoice is due.
                **Character limit**: 29 **Version notes**: -- 
              format: date
              type: string
            Id:
              description: Object identifier.
              type: string
            IncludesOneTime:
              default: true
              description: |
                Whether the bill run picks up all one-time charges for processing. You can use this field only with the Generate call for the Invoice object.
              type: boolean
            IncludesRecurring:
              default: true
              description: |
                Whether the bill run picks up all recurring charges for processing. You can use this field only with the Generate call for the Invoice object.
              type: boolean
            IncludesUsage:
              default: true
              description: |
                Whether the bill run picks up all usage charges for processing. You can use this field only with the Generate call for the Invoice object.
              type: boolean
            InvoiceDate:
              description: |2-
                 Specifies the date on which to generate the invoice.
                **Character limit**: 29 **Version notes**: -- 
              format: date
              type: string
            InvoiceNumber:
              description: |2-
                 The unique identification number for the invoice. This number is returned as a string.
                **Character limit**: 32 **Values**: automatically generated 
              type: string
            LastEmailSentDate:
              description: |2-
                 The date when the invoice was last emailed.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
              type: string
            PaymentAmount:
              description: |2-
                 The amount of payments applied to the invoice.
                **Character limit**: 16 **Value**s: automatically generated 
              format: double
              type: number
            PostedBy:
              description: |2-
                 The user ID of the person who moved the invoice to Posted status.
                **Character limit**: 32 **Values**: automatically generated 
              type: string
            PostedDate:
              description: |2-
                 The date when the invoice was posted.
                **Character limit:** 29 **Values**: automatically generated 
              format: date-time
              type: string
            RefundAmount:
              description: |2-
                 Specifies the amount of a refund that was applied against an earlier payment on the invoice.
                **Character limit**: 16 **Values**: automatically generated 
              format: double
              type: number
            Status:
              description: |2+
                 The status of the invoice in the system. This status is not the status of the payment of the invoice, just the status of the invoice itself.
                **Character limit**: 8 **Values**: one of the following:

                -  Draft (default, automatically set upon invoice creation)

                -  Posted

                -  Canceled

              type: string
            TargetDate:
              description: |2-
                 This date is used to determine which charges are to be billed. All charges that are to be billed on this date or prior will be included in this bill run.
                **Character limit**: 29 **Version notes**: -- 
              format: date
              type: string
            TaxAmount:
              description: |2-
                 The total amount of the taxes applied to the invoice.
                **Character limit**: 16 **Values**: automatically generated 
              format: double
              type: number
            TaxExemptAmount:
              description: |2-
                 The total amount of the invoice that is exempt from taxation.
                **Character limit**: 16 **Values**: automatically generated 
              format: double
              type: number
            TransferredToAccounting:
              description: |2-
                 Specifies whether or not the invoice was transferred to an external accounting system, such as NetSuite.
                **Character limit**: 10 **Values**: Processing, Yes, Error, Ignore 
              type: string
            UpdatedById:
              description: ""
              type: string
            UpdatedDate:
              description: |2-
                 The date when the invoice was last updated.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/InvoiceObjectNSFields"
        - $ref: "#/components/schemas/InvoiceObjectCustomFields"
    ProxyGetInvoiceAdjustment:
      allOf:
        - properties:
            AccountId:
              description: |2-
                 The ID of the account that owns the invoice.
                **Character limit**: 32 **Values**: inherited from Account.ID for the invoice owner 
              type: string
            AccountingCode:
              description: "The accounting code for the invoice adjustment. "
              type: string
            AdjustmentDate:
              description: |2-
                 The date when the invoice adjustment is applied. This date must be the same as the invoice's date or later.
                **Character limit**: 29 **Values**: Leave null to automatically generate the current date 
              format: date
              type: string
            AdjustmentNumber:
              description: |2-
                 A unique string to identify an individual invoice adjustment.
                **Character limit**: 255 **Values**: automatically generated 
              type: string
            Amount:
              description: |2-
                 The amount of the invoice adjustment.
                **Character limit**: 16 **Values**: a valid currency amount 
              format: double
              type: number
            CancelledById:
              description: |2-
                 The ID of the Zuora user who canceled the invoice adjustment. Zuora generates this read-only field only if the adjustment is canceled.
                **Character limit**: 32 **Values**: automatically generated 
              type: string
            CancelledOn:
              description: |2-
                 The date when the invoice adjustment is canceled. Zuora generates this read-only field if this adjustment is canceled.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
              type: string
            Comments:
              description: |2-
                 Use this field to record comments about the invoice adjustment.
                **Character limit**: 255 **Values**: a string of 255 characters or fewer 
              type: string
            CreatedById:
              description: |2-
                 The user ID of the person who created the invoice adjustment.
                **Character limit**: 32 **Values**: automatically generated 
              type: string
            CreatedDate:
              description: |2-
                 The date the invoice adjustment was created.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
              type: string
            CustomerName:
              description: |2-
                 The name of the account that owns the associated invoice.

                **Character limit**: 50

                **Values**: inherited from `Account.Name`

                **Note**: This value changes if `Account.Name` is updated. The values of `UpdatedById` and `UpdatedDate` for the `InvoiceAdjustment` do not change when `Account.Name` is updated. 
              type: string
            CustomerNumber:
              description: |2-
                 The unique account number of the customer's account.

                **Character limit**: 70

                **Values**: inherited from `Account.AccountNumber`

                **Note**: This value changes if `Account.AccountNumber` is updated. The values of `UpdatedById` and `UpdatedDate` for the `InvoiceAdjustment` do not change when `Account.AccountNumber` is updated. 
              type: string
            Id:
              description: Object identifier.
              type: string
            ImpactAmount:
              description: |2-
                 The amount that changes the balance of the associated invoice.
                **Character limit**: 16 **Values**: automatically calculated 
              format: double
              type: number
            InvoiceId:
              description: |2-
                 The ID of the invoice associated with the adjustment. This field is required if you don't specify a value for the `InvoiceNumber` field.
                **Character limit**: 32 **Values**: a valid invoice ID 
              type: string
            InvoiceNumber:
              description: |2-
                 The unique identification number for the associated invoice. This field is required if you don't specify a value for the `InvoiceId` field.
                **Character limit**: 32 **Values**: a valid invoice number 
              type: string
            ReasonCode:
              description: |2-
                 A code identifying the reason for the transaction. Must be an existing reason code or empty. If you do not specify a value, Zuora uses the default reason code.
                **Character limit**: 32 **V****alues**: a valid reason code 
              type: string
            ReferenceId:
              description: |2-
                 A code to reference an object external to Zuora. For example, you can use this field to reference a case number in an external system.
                **Character limit**: 60 **Values**: a string of 60 characters or fewer 
              type: string
            Status:
              description: |2-
                 The status of the invoice adjustment. This field is required in the Query call, but is automatically generated in other calls.
                **Character limit**: 9 **Values**: `Canceled`, `Processed` 
              type: string
            TransferredToAccounting:
              description: |
                Indicates the status of the adjustment's transfer to an external accounting system, such as NetSuite.
              enum:
                - Processing
                - Yes
                - No
                - Error
                - Ignore
              type: string
            Type:
              description: |2-
                 Indicates whether the adjustment credits or debits the invoice amount.
                **Character limit**: 6 **Values**: `Credit`, `Charge` 
              type: string
            UpdatedById:
              description: |2-
                 The ID of the user who last updated the invoice.
                **Character limit**: 32 **Values**: automatically generated 
              type: string
            UpdatedDate:
              description: |2-
                 The date when the invoice was last updated.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/InvoiceAdjustmentObjectCustomFields"
    ProxyGetInvoiceItem:
      allOf:
        - properties:
            AccountingCode:
              description: |2-
                 The accounting code for the item's charge. Accounting codes group transactions that contain similar accounting attributes.
                **Character limit**: 100 **Values**: inherited from `RatePlanCharge.AccountingCode` 
              type: string
            AppliedToInvoiceItemId:
              description: |2-
                 Associates a discount invoice item to a specific invoice item.

                **Character limit**: 32

                **Values**: inherited from `InvoiceItem.Id` for the invoice item that the discount charge is applied to 
              type: string
            ChargeAmount:
              description: |2-
                 The amount being charged for the invoice item. This amount doesn't include taxes regardless if the charge's tax mode is inclusive or exclusive.
                **Character limit**: **Values**: automatically calculated from multiple fields in multiple objects 
              format: double
              type: number
            ChargeDate:
              description: |2-
                 The date when the Invoice Item is created .
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
              type: string
            ChargeName:
              description: |2-
                 The name of the invoice item's charge.
                **Character limi**t: 50 **Values: **inherited from `RatePlanCharge.Name` 
              type: string
            CreatedById:
              description: |2-
                 The user ID of the person who created the invoice item.
                **Character limit**: 32 **Values**: automatically generated 
              type: string
            CreatedDate:
              description: |2-
                 The date the invoice item was created.
                **Character limit:** 29 **Values**: automatically generated 
              format: date-time
              type: string
            Id:
              description: Object identifier.
              type: string
            InvoiceId:
              description: |2-
                 The ID of the invoice that's associated with this invoice item.
                **Character limit**: 32 **Values**: inherited from `Invoice.Id` 
              type: string
            ProcessingType:
              description: |2
                 Identifies the kind of charge where 0 is a charge, 1 is a discount, 2 is a prepayment, and 3 is a tax. The returned value is text not decimal on data sources.
                **Character limit**: **Values: **

                - 0: charge
                - 1: discount
                - 2: prepayment
                - 3: tax
              format: double
              type: number
            ProductDescription:
              description: |2-
                 A description of the product associated with this invoice item.

                **Character limit**: 500

                **Values**: inherited from `Product.Description`

                **Note**: This value changes if `Product.Description` is updated. The values of `UpdatedById` and `UpdatedDate` for the `InvoiceItem` do not change when `Product.Description` is updated. 
              type: string
            ProductName:
              description: |2-
                 The name of the product associated with this invoice item.

                **Character limit**: 255

                **Values**: inherited from `Product.Name`

                **Note**: This value changes if `Product.Name` is updated. The values of `UpdatedById` and `UpdatedDate` for the `InvoiceItem` do not change when `Product.Name` is updated. 
              type: string
            Quantity:
              description: |2-
                 The number of units for this invoice item.
                **Values**: inherited from `RatePlanCharge.Quantity` 
              format: double
              type: number
            RatePlanChargeId:
              description: |2-
                 The ID of the rate plan charge that's associated with this invoice item.
                **Character limit**: 32 **Values**: inherited from `RatePlanCharge.Id` 
              type: string
            RevRecStartDate:
              description: |2-
                 The date when revenue recognition is triggered.
                **Character limit**: 29 **Values**: generated from `InvoiceItem.RevRecTriggerCondition` 
              format: date
              type: string
            SKU:
              description: |2-
                 The unique SKU for the product associated with this invoice item.
                **Character limit**: 255 **Values**: inherited from `Product.SKU` 
              type: string
            ServiceEndDate:
              description: |2-
                 The end date of the service period associated with this invoice item. Service ends one second before the date in this value.
                **Character limit**: 29 **Values**: automatically generated 
              format: date
              type: string
            ServiceStartDate:
              description: |2-
                 The start date of the service period associated with this invoice item. If the associated charge is a one-time fee, then this date is the date of that charge.
                **Character limit:** 29 **Values**: automatically generated 
              format: date
              type: string
            SubscriptionId:
              description: |2-
                 The ID of the subscription associated with the invoice item.
                **Character limit**: 32 **Values**: inherited from `Subscription.Id` 
              type: string
            TaxAmount:
              description: |2-
                 The amount of tax applied to the invoice item's charge.
                **Character limit**: **Values**: calculated from multiple fields in the ProductRatePlanCharge object 
              format: double
              type: number
            TaxCode:
              description: |2-
                 Specifies the tax code for taxation rules.
                **Character limit**: 6 **Values**: inherited from `ProductRatePlanCharge.TaxCode` 
              type: string
            TaxExemptAmount:
              description: |2-
                 The amount of the invoice item's charge that's tax exempt.
                **Character limit**: **Values**: calculated from multiple fields in the ProductRatePlanCharge object 
              format: double
              type: number
            TaxMode:
              description: |2-
                 The tax mode of the invoice item.
                **Character limit**: 12 **Values**: `TaxExclusive`, `TaxInclusive` 
              type: string
            UOM:
              description: " Specifies the units to measure usage. **Character limit**: **Values**: inherited from `ProductRatePlanCharge.UOM` "
              type: string
            UnitPrice:
              description: |2-
                 The per-unit price of the invoice item.
                **Character limit**: **Values**: calculated from multiple fields in ProductRatePlanCharge and ProductRatePlanChargeTier objets 
              format: double
              type: number
            UpdatedById:
              description: |2-
                 The ID of the user who last updated the invoice item.
                **Character limit**: 32 **Values**: automatically generated 
              type: string
            UpdatedDate:
              description: |2-
                 The date when the invoice item was last updated.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/InvoiceItemObjectNSFields"
        - $ref: "#/components/schemas/InvoiceItemObjectCustomFields"
    ProxyGetInvoiceItemAdjustment:
      allOf:
        - properties:
            AccountId:
              description: |2-
                 The ID of the account that owns the invoice.
                **Values**: inherited from `Account.ID` for the invoice owner 
              type: string
            AccountingCode:
              description: |2-
                 The accounting code for the invoice item. Accounting codes group transactions that contain similar accounting attributes.
                **Character limit**: 100 **Values**: inherited from `InvoiceItem.AccountingCode` 
              type: string
            AdjustmentDate:
              description: |2-
                 The date when the invoice item adjustment is applied, in `yyyy-mm-dd` format. This date must be the same as the invoice's date or later.
                **Character limit**: 29 
              format: date
              type: string
            AdjustmentNumber:
              description: |2-
                 A unique string to identify an individual invoice item adjustment.
                **Character limit**: 255 **Values**: automatically generated 
              type: string
            Amount:
              description: " The amount of the invoice item adjustment. The value of Amount must be positive. Use the required parameter Type to either credit or charge (debit) this amount on the invoice. **Character limit**: 16 **Values**: a valid currency amount "
              format: double
              type: number
            CancelledById:
              description: |2-
                 The ID of the Zuora user who canceled the invoice item adjustment. Zuora generates this read-only field only if the adjustment is canceled.
                **Character limit**: 32 **Values**: automatically generated 
              type: string
            CancelledDate:
              description: |2-
                 The date when the invoice item adjustment is canceled. Zuora generates this read-only field if this adjustment is canceled.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
              type: string
            Comment:
              description: |2-
                 Use this field to record comments about the invoice item adjustment.
                **Character limit**: 255 **Values**: a string of 255 characters or fewer 
              type: string
            CreatedById:
              description: |2-
                 The user ID of the person who created the invoice item.
                **Character limit**: 32 **Values**: automatically generated 
              type: string
            CreatedDate:
              description: |2-
                 The date the invoice item was created.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
              type: string
            CustomerName:
              description: |2-
                 The name of the account that owns the associated invoice.

                **Character limit**: 50

                **Values**: inherited from `Account.Name`

                **Note**: This value changes if `Account.Name` is updated. The values of `UpdatedById` and `UpdatedDate` for the `InvoiceItemAdjustment` do not change when `Account.Name` is updated. 
              type: string
            CustomerNumber:
              description: |2-
                 The unique account number of the customer's account.

                **Character limit**: 50

                **Values**: inherited from `Account.AccountNumber`

                **Note**: This value changes if `Account.AccountNumber` is updated. The values of `UpdatedById` and `UpdatedDate` for the `InvoiceItemAdjustment` do not change when `Account.AccountNumber` is updated. 
              type: string
            Id:
              description: Object identifier.
              type: string
            InvoiceId:
              description: |2-
                 The ID of the invoice associated with the adjustment. The adjustment invoice item is in this invoice. This field is optional if you specify a value for the `InvoiceNumber` field.
                **Character limit**: 3 **Values**: a valid invoice ID 
              type: string
            InvoiceItemName:
              description: |2-
                 The name of the invoice item's charge. This field is required in the Query call, but is inherited in other calls.
                **Character limit**: 255 **Values**: inherited from `InvoiceItem.ChargeName` 
              type: string
            InvoiceNumber:
              description: |2-
                 The unique identification number for the invoice that contains the invoice item. This field is optional if you specify a value for the `InvoiceId` field.
                **Character limit**: 32 **Values**: a valid invoice number 
              type: string
            ReasonCode:
              description: |2-
                 A code identifying the reason for the transaction. Must be an existing reason code or empty. If you do not specify a value, Zuora uses the default reason code.
                **Character limit**: 32 **V****alues**: a valid reason code 
              type: string
            ReferenceId:
              description: |2-
                 A code to reference an object external to Zuora. For example, you can use this field to reference a case number in an external system.
                **Character limit**: 60 **Values**: a string of 60 characters or fewer 
              type: string
            ServiceEndDate:
              description: |2-
                 The end date of the service period associated with the invoice item. Service ends one second before the date in this value.

                **Character limit**: 29 
              format: date
              type: string
            ServiceStartDate:
              description: |2-
                 The start date of the service period associated with the invoice item. Service ends one second before the date in this value.

                **Character limit**: 29 
              format: date
              type: string
            SourceId:
              description: |2-
                 The ID of the item specified in the SourceType field.
                **Character limit**: 32 **Values**: a valid invoice item ID or taxation item ID 
              type: string
            SourceType:
              description: |2-
                 The type of adjustment.
                **Character limit**: 13 **Values**: InvoiceDetail, Tax 
              type: string
            Status:
              description: |2-
                 The status of the invoice item adjustment. This field is required in the Query call, but is automatically generated in other calls.
                **Character limit**: 9 **Values**: Canceled, Processed 
              type: string
            TransferredToAccounting:
              description: |
                Indicates the status of the adjustment's transfer to an external accounting system, such as NetSuite.
              enum:
                - Processing
                - Yes
                - No
                - Error
                - Ignore
              type: string
            UpdatedById:
              description: |2-
                 The ID of the user who last updated the invoice item.
                **Character limit**: 32 **Values**: automatically generated 
              type: string
            UpdatedDate:
              description: |2-
                 The date when the invoice item was last updated.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/InvoiceItemAdjustmentObjectNSFields"
        - $ref: "#/components/schemas/InvoiceItemAdjustmentObjectCustomFields"
    ProxyGetInvoicePayment:
      properties:
        Amount:
          description: |2-
             The amount of the payment.
            **Character limit**: 16 **Values**: a valid currency amount 
          format: double
          type: number
        CreatedById:
          description: |2-
             The user ID of the person who created the invoice payment.
            **Character limit**: 32 **V****alues**: automatically generated 
          type: string
        CreatedDate:
          description: |2-
             The date when the invoice payment was generated.
            **Character limit**: 29 **V****alues**: automatically generated 
          format: date-time
          type: string
        Id:
          description: Object identifier.
          type: string
        InvoiceId:
          description: |2-
             The unique ID of the invoice associated with this invoice payment.
            **Character limit**: 32 **Values**: a valid invoice ID 
          type: string
        PaymentId:
          description: |2-
             The unique ID of the payment associated with this invoice payment.
            **Character limit**: 32 **V****alues**: a valid payment ID 
          type: string
        RefundAmount:
          description: "Specifies the amount of a refund applied against this InvoicePayment. **Character limit**: 16 **Values**: automatically generated "
          format: double
          type: number
        UpdatedById:
          description: |2-
             The ID of the user who last updated the invoice payment.
            **Character limit**: 32 **V****alues**: automatically generated 
          type: string
        UpdatedDate:
          description: |2-
             The date when the invoice payment was last updated.
            **Character limit**: 29 **V****alues**: automatically generated 
          format: date-time
          type: string
      type: object
    ProxyGetInvoiceSplit:
      properties:
        CreatedById:
          description: "The ID of the Zuora user who created the InvoiceSplit object. **Character limit**: 32 **Values**: automatically generated "
          type: string
        CreatedDate:
          description: "The date when the InvoiceSplit object was created. **Character limit**: 29 **Values**: automatically generated "
          format: date-time
          type: string
        Id:
          description: Object identifier.
          type: string
        InvoiceId:
          description: |2-
             The ID of the original invoice that the InvoiceSplit object splits. This field becomes read-only after the InvoiceSplit object is created.
            **Character limit**: 32 **Values**: a valid invoice ID 
          type: string
        UpdatedById:
          description: "The ID of the Zuora user who last updated the invoice split. **Character limit**: 32 **Values**: automatically generated "
          type: string
        UpdatedDate:
          description: "The date when the invoice split was last updated. **Values**: automatically generated "
          format: date-time
          type: string
      type: object
    ProxyGetInvoiceSplitItem:
      properties:
        CreatedById:
          description: |2-
             The ID of the Zuora user who created the InvoiceSplitItem object.
            **Character limit**: 32 **Values**: automatically generated 
          type: string
        CreatedDate:
          description: |2-
             The date when the InvoiceSplitItem was created.
            **Values**: automatically generated 
          format: date-time
          type: string
        Id:
          description: Object identifier.
          type: string
        InvoiceDate:
          description: |2-
             The generation date of the new split invoice, in `yyyy-mm-dd` format.
            **Character limit**: 29 
          format: date
          type: string
        InvoiceId:
          description: |2-
             The new invoice after the split.
            **Character limit**: 32 **Values**: automatically generated 
          type: string
        InvoiceSplitId:
          description: |2-
             The ID of the invoice split associated with the individual invoice split item.
            **Character limit**: 32 **Values**: a valid invoice split ID 
          type: string
        PaymentTerm:
          description: |2-
             Indicates when the customer pays the split invoice.
            **Values**: a valid, active payment term 
          type: string
        SplitPercentage:
          description: |2
             Specifies the percentage of the original invoice that you want to be the balance of the split invoice. The total of the SplitPercentage field values for all of the InvoiceSplitItem objects in an InvoiceSplit object must equal 100.
            **Values**:
          format: double
          type: number
        UpdatedById:
          description: |2-
             The ID of the Zuora user who last updated the invoice split.
            **Character limit**: 32 **Values**: automatically generated 
          type: string
        UpdatedDate:
          description: |2-
             The date when the invoice split was last updated.
            **Values**: automatically generated 
          format: date-time
          type: string
      type: object
    ProxyGetPayment:
      allOf:
        - properties:
            AccountId:
              description: |
                The unique account ID for the customer that the payment is for.
              type: string
            AccountingCode:
              description: |
                The accounting code for the payment. Accounting codes group transactions that contain similar accounting attributes.
              type: string
            Amount:
              description: |
                The amount of the payment.
              format: double
              type: number
            AppliedAmount:
              description: |
                The applied amount of the payment.

                **Note**: This field is only available if you have the Invoice Settlement feature enabled.
              format: double
              type: number
            AppliedCreditBalanceAmount:
              description: |
                If you have the Invoice Settlement feature disabled, the value of this field is the amount of the payment to apply to a credit balance.

                If you have the Invoice Settlement feature enabled, the value of this field returned in the response is `0` for the payments that are created after the enablement.
              format: double
              type: number
            AuthTransactionId:
              description: |
                The authorization transaction ID from the payment gateway. 
              type: string
            BankIdentificationNumber:
              description: |
                The first six digits of the credit card or debit card used for the payment, when applicable. 
              type: string
            CancelledOn:
              description: |
                The date and time when the payment was canceled.
              format: date-time
              type: string
            Comment:
              description: |
                Additional information related to the payment.
              type: string
            CreatedById:
              description: |
                The ID of the Zuora user who created the payment.
              type: string
            CreatedDate:
              description: |
                The date and time when the payment was created.
              format: date-time
              type: string
            EffectiveDate:
              description: |
                The date when the payment takes effect.
              format: date
              type: string
            Gateway:
              description: |
                The name of the gateway instance that processes the payment. 
              type: string
            GatewayOrderId:
              description: |
                A merchant-specified natural key value that can be passed to the electronic payment gateway when a payment is created. If not specified, the payment number will be passed in instead.
              type: string
            GatewayResponse:
              description: |
                The message returned from the payment gateway for the payment. This message is gateway-dependent.
              type: string
            GatewayResponseCode:
              description: |
                The code returned from the payment gateway for the payment. This code is gateway-dependent.
              type: string
            GatewayState:
              description: |
                The status of the payment in the gateway; use for reconciliation.
              enum:
                - MarkedForSubmission
                - Submitted
                - Settled
                - NotSubmitted
                - FailedToSettle
              type: string
            Id:
              description: |
                The unique ID of a payment. For example, 2c92c095592623ea01596621ada84352.
              type: string
            MarkedForSubmissionOn:
              description: |
                The date and time when a payment was marked and waiting for batch submission to the payment process. 
              format: date-time
              type: string
            PaymentMethodId:
              description: |
                The ID of the payment method used for the payment. 
              type: string
            PaymentMethodSnapshotId:
              description: |
                The unique ID of the payment method snapshot which is a copy of the particular payment method used in a transaction.
              type: string
            PaymentNumber:
              description: |
                The unique identification number of the payment. For example, P-00000028.
              type: string
            ReferenceId:
              description: |
                The transaction ID returned by the payment gateway. Use this field to reconcile payments between your gateway and Zuora Payments.
              type: string
            RefundAmount:
              description: |
                The amount of the payment that is refunded. The value of this field is `0` if no refund is made against the payment.
              format: double
              type: number
            SecondPaymentReferenceId:
              description: |
                The transaction ID returned by the payment gateway if there is an additional transaction for the payment. Use this field to reconcile payments between your gateway and Zuora Payments.
              type: string
            SettledOn:
              description: |
                The date and time when the payment was settled in the payment processor. This field is used by the Spectrum gateway only and not applicable to other gateways.
              format: date-time
              type: string
            SoftDescriptor:
              description: |
                A payment gateway-specific field that maps to Zuora for the gateways, Orbital, Vantiv and Verifi. 
              type: string
            SoftDescriptorPhone:
              description: |
                A payment gateway-specific field that maps to Zuora for the gateways, Orbital, Vantiv and Verifi.
              type: string
            Source:
              description: |
                How the payment was created, whether through the API, manually, import, or payment run.
              enum:
                - PaymentRun
                - Import
                - Manually
                - API
              type: string
            SourceName:
              description: |
                The name of the source. The value is a Payment Run number or a file name.
              type: string
            Status:
              description: |
                The status of the payment in Zuora. The value depends on the type of payments.

                - If you have the Invoice Settlement feature disabled, for electronic payments, the status can be `Processed`, `Processing`, `Error`, or `Voided`. For external payments, the status can be `Processed` or `Canceled`.
                - If you have the Invoice Settlement feature enabled, for electronic payments, the status can be `Processed`, `Processing`, `Error`, or `Canceled`. For external payments, the status can be `Processed` or `Canceled`.
              enum:
                - Processed
                - Error
                - Voided
                - Canceled
              type: string
            SubmittedOn:
              description: |
                The date and time when the payment was submitted.
              format: date-time
              type: string
            TransferredToAccounting:
              description: |
                Indicates if the payment was transferred to an external accounting system. Use this field for integration with accounting systems, such as NetSuite.
              enum:
                - Processing
                - Yes
                - Error
                - Ignore
              type: string
            Type:
              description: |
                The type of the payment, whether the payment is external or electronic.
              enum:
                - External
                - Electronic
              type: string
            UnappliedAmount:
              description: |
                The unapplied amount of the payment.

                **Note**: This field is only available if you have the Invoice Settlement feature enabled.
              format: double
              type: number
            UpdatedById:
              description: |
                The ID of the Zuora user who last updated the payment.
              type: string
            UpdatedDate:
              description: |
                The date and time when the payment was last updated.
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/PaymentObjectNSFields"
        - $ref: "#/components/schemas/PaymentObjectCustomFields"
    ProxyGetPaymentMethod:
      properties:
        AccountId:
          description: " The ID of the customer account associated with this payment method. This field is not required for the account ID. "
          type: string
        AchAbaCode:
          description: |2-
             The nine-digit routing number or ABA number used by banks. Use this field for ACH payment methods.
            **Character limit**: 9 **Values**: a string of 9 characters or fewer 
          type: string
        AchAccountName:
          description: |2-
             The name of the account holder, which can be either a person or a company. Use this field for ACH payment methods.
            **Character limit**: 70 **Values**: a string of 70 characters or fewer 
          type: string
        AchAccountNumberMask:
          description: |2-
             This is a masked displayable version of the ACH account number, used for security purposes. For example: `XXXXXXXXX54321`. Use this field for ACH payment methods.
            **Character limit**: 32 **Values**: automatically generated 
          type: string
        AchAccountType:
          description: |2
             The type of bank account associated with the ACH payment. Use this field for ACH payment methods.
            **Character limit**: 16 **Values**:

            - `BusinessChecking`
            - `Checking`
            - `Saving`
          type: string
        AchAddress1:
          description: |2-
             Line 1 for the ACH address. Required on create for the Vantiv payment gateway. Optional for other gateways.
            **Character limit:** **Values:** an address 
          type: string
        AchAddress2:
          description: |2-
             Line 2 for the ACH address. Required on create for the Vantiv payment gateway. Optional for other gateways.
            **Character limit:** **Values:** an address 
          type: string
        AchBankName:
          description: |2-
             The name of the bank where the ACH payment account is held. Use this field for ACH payment methods.
            **Character limit**: 70 **Values**: a string of 70 characters or fewer 
          type: string
        Active:
          description: |2-
             Specifies whether a payment method is available in Zuora. This field is used to indicate if a payment method is loaded by the system or created by the customer.
            - `true`: System loaded payment method.
            - `false`: Customer created payment method.

            The default value is `false`.
            **Character limit**: 5 **Values**: `true`, `false` 
          type: boolean
        BankBranchCode:
          description: |2-
             The branch code of the bank used for direct debit. Use this field for direct debit payment methods.
            **Character limit**: 10 **Values**:  string of 10 characters or fewer 
          type: string
        BankCheckDigit:
          description: "The check digit in the international bank account number, which confirms the validity of the account. Use this field for direct debit payment methods. **Character limit**: 4 **Values**:  string of 4 characters or fewer "
          type: string
        BankCity:
          description: |2-
             The city of the direct debit bank. Use this field for direct debit payment methods.
            **Character limit**:70 **Values**:  string of 70 characters or fewer 
          type: string
        BankCode:
          description: |2-
             The sort code or number that identifies the bank. This is also known as the sort code. This field is required for direct debit payment methods.
            **Character limit**: 18 **Values**:  string of 18 characters or fewer 
          type: string
        BankIdentificationNumber:
          description: |2-
             The first six digits of the payment method's number, such as the credit card number or account number. Banks use this number to identify a payment method.
            **Character limit**: 6 **Values**:  string of 6 characters or fewer 
          type: string
        BankName:
          description: |2-
             The name of the direct debit bank. Use this field for direct debit payment methods.
            **Character limit**:80 **Values**:  string of 80 characters or fewer 
          type: string
        BankPostalCode:
          description: |2-
             The zip code or postal code of the direct debit bank. Use this field for direct debit payment methods.
            **Character limit**:20 **Values**:  string of 20 characters or fewer 
          type: string
        BankStreetName:
          description: |2-
             The name of the street of the direct debit bank. Use this field for direct debit payment methods.
            **Character limit**:60 **Values**:  string of 60 characters or fewer 
          type: string
        BankStreetNumber:
          description: |2-
             The number of the direct debit bank. Use this field for direct debit payment methods.
            **Character limit**:10 **Values**:  string of 10 characters or fewer 
          type: string
        BankTransferAccountName:
          description: |2-
             The name on the direct debit bank account. Use this field for direct debit payment methods.
            **Character limit**: 60 **Values**:  string of 60 characters or fewer 
          type: string
        BankTransferAccountNumber:
          description: |
            The number of the customer's bank account. Use this field for direct debit payment methods.

            **Character limit**: 30
            **Values**: a string of 30 characters or fewer
          type: string
        BankTransferAccountNumberMask:
          description: |2-
             This is a masked displayable version of the bank account number, used for security purposes. For example: `XXXXXXXXX54321`.
            **Character limit**: 32 **Values**: automatically generated 
          type: string
        BankTransferAccountType:
          description: |2-
             The type of the customer's bank account. Use this field for direct debit payment methods.
            **Character limit**: 11 **Values**: `DirectDebit` 
          type: string
        BankTransferType:
          description: |
            The type of direct debit transfer. The value of this field is dependent on the country of the user. This field is only required if the `Type` field is set to `BankTransfer`.

             **Values**: 

               - `SEPA`
               
               - `AutomatischIncasso` (NL)

               - `LastschriftDE` (Germany)

               - `LastschriftAT` (Austria)

               - `DemandeDePrelevement` (FR)

               - `DirectDebitUK` (UK)

               - `Domicil` (Belgium)

               - `LastschriftCH` (CH)

               - `RID` (Italy)

               - `OrdenDeDomiciliacion` (Spain)
               - `Autogiro` (Sweden)
               - `Betalingsservice` (Denmark)
          maxLength: 20
          type: string
        BusinessIdentificationCode:
          description: |2-
             The business identification code for Swiss direct payment methods that use the Global Collect payment gateway. Use this field only for direct debit payments in Switzerland with Global Collect.
            **Character limit**: 11 **Values**: string of 11 characters or fewer 
          type: string
        City:
          description: |2-
             The city of the customer's address. Use this field for direct debit payment methods.
            **Character limit**:80 **Values**:  string of 80 characters or fewer 
          type: string
        CompanyName:
          description: |
            The name of the company.
          type: string
        Country:
          description: |2-
             The two-letter country code of the customer's address. Use this field for direct debit payment methods.
            **Character limit**: 2 **Values**: a valid country code 
          type: string
        CreatedById:
          description: |2-
             The user ID of the person who created the `PaymentMethod` object when there is a login user in the user session. In Hosted Payment Method and Zuora Checkout pages, this field is set to 3 as there is no login user to initiate a user session.
            **Character limit**: 32 **Values**: automatically generated 
          type: string
        CreatedDate:
          description: |2-
             The date when the `PaymentMethod` object was created in the Zuora system.
            **Character limit**: 29 **Values**: automatically generated 
          format: date-time
          type: string
        CreditCardAddress1:
          description: |2-
             The first line of the card holder's address, which is often a street address or business name. Use this field for credit card and direct debit payment methods.
            **Character limit**: 255 **Values**: a string of 255 characters or fewer 
          type: string
        CreditCardAddress2:
          description: |2-
             The second line of the card holder's address. Use this field for credit card and direct debit payment methods.
            **Character limit**: 255 **Values**: a string of 255 characters or fewer 
          type: string
        CreditCardCity:
          description: " The city of the card holder's address. Use this field for credit card and direct debit payment methods **Character limit**: 40 **Values**: a string of 40 characters or fewer "
          type: string
        CreditCardCountry:
          description: " The country of the card holder's address. "
          type: string
        CreditCardExpirationMonth:
          description: |2-
             The expiration month of the credit card or debit card. Use this field for credit card and direct debit payment methods.
            **Character limit**: 2 **Values**: a two-digit number, 01 - 12 
          format: int32
          type: integer
        CreditCardExpirationYear:
          description: |2-
             The expiration month of the credit card or debit card. Use this field for credit card and direct debit payment methods.
            **Character limit**: 4 **Values**: a four-digit number 
          format: int32
          type: integer
        CreditCardHolderName:
          description: |2-
             The full name of the card holder. Use this field for credit card and direct debit payment methods.
            **Character limit**: 50 **Values**: a string of 50 characters or fewer 
          type: string
        CreditCardMaskNumber:
          description: |2-
             A masked version of the credit or debit card number.
            **Character limit**: 32 **Values**: automatically generated 
          type: string
        CreditCardPostalCode:
          description: |2-
             The billing address's zip code. This field is required only when you define a debit card or credit card payment.
            **Character limit**: 20 **Values**: a string of 20 characters or fewer 
          type: string
        CreditCardState:
          description: " The billing address's state. Use this field is if the `CreditCardCountry` value is either Canada or the US. State names must be spelled in full. "
          type: string
        CreditCardType:
          description: |
            The type of the credit card.
                
            Possible values  include `Visa`, `MasterCard`, `AmericanExpress`, `Discover`, `JCB`, and `Diners`. For more information about credit card types supported by different payment gateways, see [Supported Payment Gateways](https://knowledgecenter.zuora.com/CB_Billing/M_Payment_Gateways/Supported_Payment_Gateways).
          type: string
        DeviceSessionId:
          description: |2-
             The session ID of the user when the `PaymentMethod` was created or updated. Some gateways use this field for fraud prevention. If this field is passed to Zuora, then Zuora passes this field to supported gateways. Currently only Verifi supports this field.
            **Character limit**: 255 
          type: string
        Email:
          description: |2-
             An email address for the payment method in addition to the bill to contact email address.
            **Character limit**: 80 **Values**: a string of 80 characters or fewer 
          type: string
        ExistingMandate:
          description: |2-
             Indicates if the customer has an existing mandate or a new mandate. A mandate is a signed authorization for UK and NL customers. When you are migrating mandates from another system, be sure to set this field correctly. If you indicate that a new mandate is an existing mandate or vice-versa, then transactions fail. This field is used only for the direct debit payment method.
            **Character limit**: 3 **Values**: `Yes` or `No` 
          type: string
        FirstName:
          description: |2-
             The customer's first name. This field is used only for the direct debit payment method.
            **Character limit**: 30 **Values**: a string of 30 characters or fewer 
          type: string
        IBAN:
          description: |2-
             The International Bank Account Number. This field is used only for the direct debit payment method.
            **Character limit**: 42 **Values**: a string of 42 characters or fewer 
          type: string
        IPAddress:
          description: |2-
             The IP address of the user when the payment method was created or updated. Some gateways use this field for fraud prevention. If this field is passed to Zuora, then Zuora passes this field to supported gateways. Currently PayPal, CyberSource, Authorize.Net, Verifi, and WorldPay support this field.
            **Character limit**: 15 **Values**: a string of 15 characters or fewer 
          type: string
        Id:
          description: Object identifier.
          type: string
        IdentityNumber:
          description: |
            The unique identity number of the customer account. 
          type: string
        IsCompany:
          description: |
            Whether the customer account is a company.
          type: boolean
        LastFailedSaleTransactionDate:
          description: |2-
             The date of the last failed attempt to collect payment with this payment method.
            **Character limit**: 29 **Values**: automatically generated 
          format: date-time
          type: string
        LastName:
          description: |2-
             The customer's last name. This field is used only for the direct debit payment method.
            **Character limit**: 70 **Values**: a string of 70 characters or fewer 
          type: string
        LastTransactionDateTime:
          description: |2-
             The date of the most recent transaction.
            **Character limit**: 29 **Values**: a valid date and time value 
          format: date-time
          type: string
        LastTransactionStatus:
          description: |2-
             The status of the most recent transaction.
            **Character limit**: 39 **Values**: automatically generated 
          type: string
        MandateCreationDate:
          description: |2-
             The date when the mandate was created, in `yyyy-mm-dd` format. A mandate is a signed authorization for UK and NL customers. This field is used only for the direct debit payment method.
            **Character limit**: 29 
          format: date
          type: string
        MandateID:
          description: |2-
             The ID of the mandate. A mandate is a signed authorization for UK and NL customers. This field is used only for the direct debit payment method.
            **Character limit**: 36 **Values**: a string of 36 characters or fewer 
          type: string
        MandateReceived:
          description: |2-
             Indicates if  the mandate was received. A mandate is a signed authorization for UK and NL customers. This field is used only for the direct debit payment method.
            **Character limit**: 3 **Values**: `Yes` or `No `(case-sensitive) 
          type: string
        MandateUpdateDate:
          description: |2-
             The date when the mandate was last updated, in `yyyy-mm-dd` format. A mandate is a signed authorization for UK and NL customers. This field is used only for the direct debit payment method.
            **Character limit**: 29 
          format: date
          type: string
        MaxConsecutivePaymentFailures:
          description: |2-
             Specifies the number of allowable consecutive failures Zuora attempts with the payment method before stopping.
            **Values**: a valid number 
          type: integer
        Name:
          description: The name of the payment method.
          type: string
        NumConsecutiveFailures:
          description: |
            The number of consecutive failed payments for this payment method. It is reset to `0` upon successful payment. 
          format: int32
          maximum: 100
          minimum: 0
          type: integer
        PaymentMethodStatus:
          description: |2
             This field is used to indicate the status of the payment method created within an account. It is set to `Active` on creation.
            **Character limit**: 6 **Values**: `Active` or `Closed`
          type: string
        PaymentRetryWindow:
          description: |2-
             The retry interval setting, which prevents making a payment attempt if the last failed attempt was within the last specified number of hours. This field is required if the `UseDefaultRetryRule` field value is set to `false`.
            **Character limit**: 4 **Values**: a whole number between 1 and 1000, exclusive 
          type: integer
        PaypalBaid:
          description: |2-
             The PayPal billing agreement ID, which is a contract between two PayPal accounts. Typically, the selling party initiates a request to create a BAID, and sends it to buying party for acceptance. The seller can keep track of the BAID and use it for future charges against the buyer. This field is required when defining a PayPal payment method.
            **Character limit**: 64 **Values**: a string of 64 characters or fewer 
          type: string
        PaypalEmail:
          description: |2-
             The email address associated with the account holder's PayPal account or of the PayPal account of the person paying for the service. This field is required only when you define a PayPal payment method.
            **Character limit**: 80 **Values**: a string of 80 characters or fewer 
          type: string
        PaypalPreapprovalKey:
          description: |2-
             PayPal's Adaptive Payments API key. Zuora does not create this key, nor does it call PayPal to generate it. You must use PayPal's Adaptive Payments' API to generate this key, and then pass it to Zuora. Zuora uses this key to authorize future payments to PayPal's Adaptive Payments API. This field is required when you use PayPal Adaptive Payments gateway.
            **Character limit**: 32 **Values**: a valid PayPal Adaptive Payment pre-approval key 
          type: string
        PaypalType:
          description: |2-
             Specifies the PayPal gateway: PayFlow Pro (Express Checkout) or Adaptive Payments. This field is required when you use PayPal Adaptive Payments or Payflow Pro (Express Checkout) gateways.
            **Character limit**: 32 **Values**: `ExpressCheckout` or `AdaptivePayments` 
          type: string
        Phone:
          description: |2-
             The phone number that the account holder registered with the bank. This field is used for credit card validation when passing to a gateway.
            **Character limit**: 40 **Values**: a string of 40 characters or fewer 
          type: string
        PostalCode:
          description: |2-
             The zip code of the customer's address. This field is used only for the direct debit payment method.
            **Character limit**: 20 **Values**: a string of 20 characters or fewer 
          type: string
        SecondTokenId:
          description: " A gateway unique identifier that replaces sensitive payment method data. `SecondTokenId` is conditionally required only when `TokenId` is being used to represent a gateway customer profile. `SecondTokenId` is used in the CC Reference Transaction payment method. **Character limit**: 64 **Values**: a string of 64 characters or fewer "
          type: string
        State:
          description: |2-
             The state of the customer's address. This field is used only for the direct debit payment method.
            **Character limit**: 70 **Values**: a string of 70 characters or fewer 
          type: string
        StreetName:
          description: |2-
             The street name of the customer's address. This field is used only for the direct debit payment method.
            **Character limit**: 100 **Values**: a string of 100 characters or fewer 
          type: string
        StreetNumber:
          description: |2-
             The street number of the customer's address. This field is used only for the direct debit payment method.
            **Character limit**: 30 **Values**: a string of 30 characters or fewer 
          type: string
        TokenId:
          description: |2-
             A gateway unique identifier that replaces sensitive payment method data or represents a gateway's unique customer profile. `TokenId` is required for the CC Reference Transaction payment method.
            **Character limit**: 255 **Values**: a string of 255 characters or fewer 
          type: string
        TotalNumberOfErrorPayments:
          description: |2-
             The number of error payments that used this payment method.
            **Character limit**: **Values**: automatically generated 
          format: int32
          type: integer
        TotalNumberOfProcessedPayments:
          description: |2-
             The number of successful payments that used this payment method.
            **Character limit**: **Values**: automatically generated 
          format: int32
          type: integer
        Type:
          description: "The type of payment method. "
          enum:
            - ACH
            - ApplePay
            - BankTransfer
            - Cash
            - Check
            - CreditCard
            - CreditCardReferenceTransaction
            - DebitCard
            - Other
            - PayPal
            - WireTransfer
          type: string
        UpdatedById:
          description: |2-
             The ID of the user who last updated the payment method.
            **Character limit**: 32 **Values**: automatically generated 
          type: string
        UpdatedDate:
          description: |2-
             The date when the payment method was last updated.
            **Character limit**: 29 **Values**: automatically generated 
          format: date-time
          type: string
        UseDefaultRetryRule:
          description: |2-
             Determines whether to use the default retry rules configured in the Zuora Payments settings. Set this to `true` to use the default retry rules. Set this to `false` to set the specific rules for this payment method. If you set this value to `false`, then the fields, `PaymentRetryWindow` and `MaxConsecutivePaymentFailures`, are required.
            **Character limit**: 5 **Values**: `t``rue`, `false` 
          type: boolean
      type: object
    ProxyGetPaymentMethodSnapshot:
      properties:
        AccountId:
          description: The ID of the customer account associated with this payment method.
          type: string
        AchAbaCode:
          description: The nine-digit routing number or ABA number used by banks. Applicable to ACH payment methods.
          type: string
        AchAccountName:
          description: The name of the account holder, which can be either a person or a company. Applicable to ACH payment methods.
          type: string
        AchAccountNumberMask:
          description: "This is a masked displayable version of the ACH account number, used for security purposes. For example: `XXXXXXXXX54321`."
          type: string
        AchAccountType:
          description: The type of bank account associated with the ACH payment.
          enum:
            - BusinessChecking
            - Checking
            - Saving
          type: string
        AchBankName:
          description: The name of the bank where the ACH payment account is held.
          type: string
        BankBranchCode:
          description: The branch code of the bank used for direct debit.
          type: string
        BankCheckDigit:
          description: The check digit in the international bank account number, which confirms the validity of the account. Applicable to direct debit payment methods.
          type: string
        BankCity:
          description: The city of the direct debit bank.
          type: string
        BankCode:
          description: The sort code or number that identifies the bank. This is also known as the sort code.
          type: string
        BankIdentificationNumber:
          description: The first six digits of the payment method's number, such as the credit card number or account number. Banks use this number to identify a payment method.
          type: string
        BankName:
          description: The name of the direct debit bank.
          type: string
        BankPostalCode:
          description: The zip code or postal code of the direct debit bank.
          type: string
        BankStreetName:
          description: The name of the street of the direct debit bank.
          type: string
        BankStreetNumber:
          description: The number of the direct debit bank.
          type: string
        BankTransferAccountName:
          description: The name on the direct debit bank account.
          type: string
        BankTransferAccountNumberMask:
          description: "This is a masked displayable version of the bank account number, used for security purposes. For example: `XXXXXXXXX54321`."
          type: string
        BankTransferAccountType:
          description: The type of the customer's bank account. Applicable to direct debit payment methods.
          type: string
        BankTransferType:
          description: |
            Specifies the type of direct debit transfer. The value of this field is dependent on the country of the user.

            Possible Values: 


            * `AutomatischIncasso` (NL)

            * `LastschriftDE` (Germany)

            * `LastschriftAT` (Austria)

            * `DemandeDePrelevement` (FR)

            * `DirectDebitUK` (UK)

            * `Domicil` (Belgium)

            * `LastschriftCH` (CH)

            * `RID` (Italy)

            * `OrdenDeDomiciliacion` (Spain)
            * `Autogiro` (Sweden)
            * `Betalingsservice` (Denmark)
          enum:
            - AutomatischIncasso
            - LastschriftDE
            - LastschriftAT
            - DemandeDePrelevement
            - DirectDebitUK
            - Domicil
            - LastschriftCH
            - RID
            - OrdenDeDomiciliacion
            - Autogiro
            - Betalingsservice
          type: string
        BusinessIdentificationCode:
          description: The business identification code for Swiss direct payment methods that use the Global Collect payment gateway. Only applicable to direct debit payments in Switzerland with Global Collect.
          type: string
        City:
          description: The city of the customer's address. Applicable to debit payment methods.
          type: string
        CompanyName:
          description: |
            The name of the company.
          type: string
        Country:
          description: The two-letter country code of the customer's address. Applicable to direct debit payment methods.
          type: string
        CreditCardAddress1:
          description: The first line of the card holder's address, which is often a street address or business name. Applicable to credit card and direct debit payment methods.
          type: string
        CreditCardAddress2:
          description: The second line of the card holder's address. Applicable to credit card and direct debit payment methods.
          type: string
        CreditCardCity:
          description: The city of the card holder's address. Applicable to credit card and direct debit payment methods.
          type: string
        CreditCardCountry:
          description: The country of the card holder's address.
          type: string
        CreditCardExpirationMonth:
          description: The expiration month of the credit card or debit card. Applicable to credit card and direct debit payment methods.
          format: int32
          type: integer
        CreditCardExpirationYear:
          description: The expiration month of the credit card or debit card. Applicable to credit card and direct debit payment methods.
          format: int32
          type: integer
        CreditCardHolderName:
          description: The full name of the card holder. Applicable to credit card and direct debit payment methods.
          type: string
        CreditCardMaskNumber:
          description: A masked version of the credit or debit card number.
          type: string
        CreditCardPostalCode:
          description: The billing address's zip code.
          type: string
        CreditCardState:
          description: The billing address's state. Applicable if `CreditCardCountry` is either Canada or the US.
          type: string
        CreditCardType:
          description: The type of credit card or debit card.
          enum:
            - AmericanExpress
            - Discover
            - MasterCard
            - Visa
          type: string
        DeviceSessionId:
          description: The session ID of the user when the `PaymentMethod` was created or updated.
          type: string
        Email:
          description: An email address for the payment method in addition to the bill to contact email address.
          type: string
        ExistingMandate:
          description: Indicates if the customer has an existing mandate or a new mandate. Only applicable to direct debit payment methods.
          enum:
            - Yes
            - No
          type: string
        FirstName:
          description: The customer's first name. Only applicable to direct debit payment methods.
          type: string
        IBAN:
          description: The International Bank Account Number. Only applicable to direct debit payment methods.
          type: string
        IPAddress:
          description: The IP address of the user when the payment method was created or updated.
          type: string
        Id:
          description: Object identifier.
          type: string
        IdentityNumber:
          description: |
            The unique identity number of the customer account. 
          type: string
        IsCompany:
          description: |
            Whether the customer account is a company.
          type: boolean
        LastFailedSaleTransactionDate:
          description: The date of the last failed attempt to collect payment with this payment method.
          format: date-time
          type: string
        LastName:
          description: The customer's last name. Only applicable to direct debit payment methods.
          type: string
        LastTransactionDateTime:
          description: The date of the most recent transaction.
          format: date-time
          type: string
        LastTransactionStatus:
          description: The status of the most recent transaction.
          type: string
        MandateCreationDate:
          description: The date when the mandate was created, in `yyyy-mm-dd` format. A mandate is a signed authorization for UK and NL customers. Only applicable to direct debit payment methods.
          format: date
          type: string
        MandateID:
          description: The ID of the mandate. A mandate is a signed authorization for UK and NL customers. Only applicable to direct debit payment methods.
          type: string
        MandateReceived:
          description: Indicates if  the mandate was received. A mandate is a signed authorization for UK and NL customers. Only applicable to direct debit payment methods.
          type: string
        MandateUpdateDate:
          description: The date when the mandate was last updated, in `yyyy-mm-dd` format. A mandate is a signed authorization for UK and NL customers. Only applicable to direct debit payment methods.
          format: date
          type: string
        MaxConsecutivePaymentFailures:
          description: The number of allowable consecutive failures Zuora attempts with the payment method before stopping.
          type: integer
        Name:
          description: The name of the payment method.
          type: string
        NumConsecutiveFailures:
          description: The number of consecutive failed payment for the payment method.
          format: int32
          type: integer
        PaymentMethodId:
          description: Object identifier of the payment method.
          type: string
        PaymentMethodStatus:
          description: Specifies the status of the payment method.
          enum:
            - Active
            - Closed
          type: string
        PaymentRetryWindow:
          description: The retry interval setting, which prevents making a payment attempt if the last failed attempt was within the last specified number of hours.
          type: integer
        PaypalBaid:
          description: The PayPal billing agreement ID, which is a contract between two PayPal accounts.
          type: string
        PaypalEmail:
          description: The email address associated with the account holder's PayPal account or of the PayPal account of the person paying for the service.
          type: string
        PaypalPreapprovalKey:
          description: PayPal's Adaptive Payments API key.
          type: string
        PaypalType:
          description: "Specifies the PayPal gateway: PayFlow Pro (Express Checkout) or Adaptive Payments."
          enum:
            - ExpressCheckout
            - AdaptivePayments
          type: string
        Phone:
          description: The phone number that the account holder registered with the bank. This field is used for credit card validation when passing to a gateway.
          type: string
        PostalCode:
          description: The zip code of the customer's address. Only applicable to direct debit payment methods.
          type: string
        SecondTokenId:
          description: A gateway unique identifier that replaces sensitive payment method data. Applicable to CC Reference Transaction payment methods.
          type: string
        State:
          description: The state of the customer's address. Only applicable to direct debit payment methods.
          type: string
        StreetName:
          description: The street name of the customer's address. Only applicable to direct debit payment methods.
          type: string
        StreetNumber:
          description: The street number of the customer's address. Only applicable to direct debit payment methods.
          type: string
        TokenId:
          description: A gateway unique identifier that replaces sensitive payment method data or represents a gateway's unique customer profile. Applicable to CC Reference Transaction payment methods.
          type: string
        TotalNumberOfErrorPayments:
          description: The number of error payments that used this payment method.
          format: int32
          type: integer
        TotalNumberOfProcessedPayments:
          description: The number of successful payments that used this payment method.
          format: int32
          type: integer
        Type:
          description: The type of payment method.
          enum:
            - ACH
            - ApplePay
            - BankTransfer
            - Cash
            - Check
            - CreditCard
            - CreditCardReferenceTransaction
            - DebitCard
            - Other
            - PayPal
            - WireTransfer
          type: string
        UseDefaultRetryRule:
          description: Determines whether to use the default retry rules configured in the Zuora Payments settings.
          type: boolean
      type: object
    ProxyGetPaymentMethodTransactionLog:
      properties:
        Gateway:
          description: ""
          type: string
        GatewayReasonCode:
          description: ""
          type: string
        GatewayReasonCodeDescription:
          description: ""
          type: string
        GatewayTransactionType:
          description: ""
          type: string
        Id:
          description: Object identifier.
          type: string
        PaymentMethodId:
          description: ""
          type: string
        PaymentMethodType:
          description: ""
          type: string
        RequestString:
          description: ""
          type: string
        ResponseString:
          description: ""
          type: string
        TransactionDate:
          description: ""
          format: date-time
          type: string
        TransactionId:
          description: ""
          type: string
      type: object
    ProxyGetPaymentTransactionLog:
      properties:
        AVSResponseCode:
          description: |
            The response code returned by the payment gateway referring to the AVS international response of the payment transaction.
          type: string
        BatchId:
          description: |
            The ID of the batch used to send the transaction if the request was sent in a batch.
          type: string
        CVVResponseCode:
          description: |
            The response code returned by the payment gateway referring to the CVV international response of the payment transaction.
          type: string
        Gateway:
          description: |
            The name of the payment gateway used to transact the current payment transaction log.
          type: string
        GatewayReasonCode:
          description: |
            The code returned by the payment gateway for the payment. This code is gateway-dependent.
          type: string
        GatewayReasonCodeDescription:
          description: |
            The message returned by the payment gateway for the payment. This message is gateway-dependent. 
          type: string
        GatewayState:
          description: |
            The state of the transaction at the payment gateway.
          enum:
            - MarkedForSubmission
            - Submitted
            - Settled
            - NotSubmitted
            - FailedToSettle
          type: string
        GatewayTransactionType:
          description: |
            The type of the transaction, either making a payment, or canceling a payment. 
          enum:
            - Authorization
            - Sale
            - Void
            - Inquiry
            - VoidAuth
          type: string
        Id:
          description: |
            The ID of the payment transaction log.
          type: string
        PaymentId:
          description: |
            The ID of the payment wherein the payment transaction log was recorded. 
          type: string
        RequestString:
          description: |
            The payment transaction request string sent to the payment gateway. 
          type: string
        ResponseString:
          description: |
            The payment transaction response string returned by the payment gateway. 
          type: string
        TransactionDate:
          description: |
            The transaction date when the payment was performed. 
          format: date-time
          type: string
        TransactionId:
          description: |
            The transaction ID returned by the payment gateway. This field is used to reconcile payment transactions between the payment gateway and records in Zuora.
          type: string
      type: object
    ProxyGetProduct:
      allOf:
        - properties:
            AllowFeatureChanges:
              description: |2-
                 Controls whether to allow your users to add or remove features while creating or amending a subscription.
                **Character** **limit**: n/a
                **Values**: true, false (default) 
              type: boolean
            Category:
              description: |2
                 Category of the product. Used by Zuora Quotes Guided Product Selector.
                **Character** **limit**: 100
                **Values**: One of the following:

                - Base Products
                - Add On Services
                - Miscellaneous Products
              type: string
            CreatedById:
              description: "The ID of the Zuora user who created the `Product` object. **Character limit**: 32 **Values**: automatically generated "
              type: string
            CreatedDate:
              description: |
                The date when the `Product` object was created.
              format: date-time
              type: string
            Description:
              description: " A descriptionof the product. **Character limit**: 500 **Values**: a string of 500 characters or fewer "
              type: string
            EffectiveEndDate:
              description: |
                The date when the product expires and can't be subscribed to anymore, in `yyyy-mm-dd` format.
              format: date
              type: string
            EffectiveStartDate:
              description: |
                The date when the product becomes available and can be subscribed to, in `yyyy-mm-dd` format.
              format: date
              type: string
            Id:
              description: Object identifier.
              type: string
            Name:
              description: "The name of the product. This information is displayed in the product catalog pages in the web-based UI. **Character limit**: 100 **Values**: a string of 100 characters or fewer "
              type: string
            SKU:
              description: |
                The unique SKU for the product. **Character limit**: 50 **Values**: one of the following:

                - leave null for automatic generated
                - an alphanumeric string of 50 characters or fewer
              type: string
            UpdatedById:
              description: "The ID of the last user to update the object. **Character limit**: 32 **Values**: automatically generated "
              type: string
            UpdatedDate:
              description: |
                The date when the object was last updated.
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/ProductObjectNSFields"
        - $ref: "#/components/schemas/ProductObjectCustomFields"
    ProxyGetProductFeature:
      allOf:
        - properties:
            CreatedById:
              description: "The ID of the Zuora user who created the Account object. **Character limit**: 32 **Values**: automatically generated "
              type: string
            CreatedDate:
              description: "The date when the Account object was created. **Character limit**: 29 **Values**: automatically generated "
              format: date-time
              type: string
            FeatureId:
              description: |2-
                 Internal Zuora ID of the product feature. This field is not editable.
                **Character limit**: 32 **Values**: a string of 32 characters or fewer 
              type: string
            Id:
              description: Object identifier.
              type: string
            ProductId:
              description: |2-
                 Id of the product to which the feature belongs. This field is not editable.
                **Character limit**: 32 **Values**: a string of 32 characters or fewer 
              type: string
            UpdatedById:
              description: "The ID of the user who last updated the account. **Character limit**: 32 **Values**: automatically generated "
              type: string
            UpdatedDate:
              description: "The date when the account was last updated. **Character limit**: 29 **Values**: automatically generated "
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/ProductFeatureObjectCustomFields"
    ProxyGetProductRatePlan:
      allOf:
        - properties:
            ActiveCurrencies:
              description: |
                A list of 3-letter currency codes representing active currencies for the product rate plan. 

                This field cannot be queried in conjunction with any other fields except `id` at the same time. 
              items:
                type: string
              type: array
            CreatedById:
              description: "The ID of the Zuora user who created the `ProductRatePlan` object. **Character limit**: 32 **Values**: automatically generated "
              type: string
            CreatedDate:
              description: |2-
                 The date when the `ProductRatePlan` object was created.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
              type: string
            Description:
              description: "A description of the product rate plan. **Character limit**: 500 **Values**: a string of 500 characters or fewer "
              type: string
            EffectiveEndDate:
              description: |2-
                 The date when the product rate plan expires and can't be subscribed to, in `yyyy-mm-dd` format.
                **Character limit**: 29 
              format: date
              type: string
            EffectiveStartDate:
              description: |2-
                 The date when the product rate plan becomes available and can be subscribed to, in `yyyy-mm-dd` format.
                **Character limit**: 29 
              format: date
              type: string
            Id:
              description: Object identifier.
              type: string
            Name:
              description: "The name of the product rate plan. The name doesn't have to be unique in a Product Catalog, but the name has to be unique within a product. **Character limit**: 100 **Values**: a string of 100 characters or fewer "
              type: string
            ProductId:
              description: "The ID of the product that contains the product rate plan. **Character limit**: 32 **Values**: a string of 32 characters or fewer "
              type: string
            UpdatedById:
              description: "The ID of the last user to update the object. **Character limit**: 32 **Values**: automatically generated "
              type: string
            UpdatedDate:
              description: "The date when the object was last updated. **Character limit**: 29 **Values**: automatically generated "
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/ProductRatePlanObjectNSFields"
        - $ref: "#/components/schemas/ProductRatePlanObjectCustomFields"
    ProxyGetProductRatePlanCharge:
      allOf:
        - properties:
            AccountingCode:
              description: "The accounting code for the charge. Accounting codes group transactions that contain similar accounting attributes. **Character limit**: 100 **Values**: an active accounting code in your Zuora Chart of Accounts "
              type: string
            ApplyDiscountTo:
              description: |
                Specifies the type of charges that you want a specific discount to apply to. All field values are case sensitive: note that these values are in all-caps. **Character limit**: 21 **Values**: one of the following:

                - `ONETIME (1)`
                - `RECURRING (2)`
                - `USAGE (4)`
                - `ONETIMERECURRING (3)`
                - `ONETIMEUSAGE (5)`
                - `RECURRINGUSAGE (6)`
                - `ONETIMERECURRINGUSAGE (7)`
              type: string
            BillCycleDay:
              description: |2-
                 Sets the bill cycle day (BCD) for the charge. The BCD determines which day of the month customer is billed. The BCD value in the account can override the BCD in this object.
                **Character limit**: 2 **Values**: a valid BCD integer, 1 - 31 
              format: int32
              type: integer
            BillCycleType:
              description: |2
                 Specifies how to determine the billing day for the charge. **Character limit**: 20 **Values**: one of the following:

                - `DefaultFromCustomer`
                - `SpecificDayofMonth:`
                - `SubscriptionStartDay`
                - `ChargeTriggerDay`
                - `SpecificDayofWeek`
                **Note**:

                - If you set this field to `SpecificDayofMonth`, you must specify which day of the month as the billing day for the charge in the BillCycleDay field.
                - If you set this field to `SpecificDayofWeek`, you must specify which day of the week as the billing day for the charge in the WeeklyBillCycleDay field.
              type: string
            BillingPeriod:
              description: |2-
                 The billing period for the charge. The start day of the billing period is also called the bill cycle day (BCD).
                **Character limit**: 15 **Values**: one of the following

                - `Month`
                - `Quarter`
                - `Annual`
                - `Semi-Annual`
                - `Specific Months`
                - `Subscription Term` (This value is in **Limited Availability**.)
                - `Week`
                - `Specific Weeks`
                **Note**: Specify the number of months or weeks in the SpecificBillingPeriod field if you set this field to `Specific Months` or `Specific Weeks`. 
              type: string
            BillingPeriodAlignment:
              description: |2
                 Aligns charges within the same subscription if multiple charges begin on different dates.
                **Character limit**: 24 **Values**: one of the following:

                - `AlignToCharge`
                - `AlignToSubscriptionStart`
                - `AlignToTermStart`
              type: string
            BillingTiming:
              description: |2+
                 The billing timing for the charge. You can choose to bill in advance or in arrears for recurring charge types. This field is not used in one-time or usage based charge types.
                **Character limit**: **Values**: one of the following:

                - `In Advance`
                - `In Arrears`

                This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).

              type: string
            ChargeModel:
              description: |2
                 Determines how to calculate charges. Charge models must be individually activated in Zuora Billing administration.
                **Character limit**: 27 **Values**: one of the following:

                - `Discount-Fixed Amount`
                - `Discount-Percentage`
                - `Flat Fee Pricing`
                - `Per Unit Pricing`
                - `Overage Pricing`
                - `Tiered Pricing`
                - `Tiered with Overage Pricing`
                - `Volume Pricing`
              type: string
            ChargeType:
              description: |2
                 Specifies the type of charge.
                **Character limit**: 9 **Values**: one of the following:

                - `OneTime`
                - `Recurring`
                - `Usage`
              type: string
            CreatedById:
              description: "The ID of the Zuora user who created the `ProductRatePlanCharge` object. **Character limit**: 32 **Values**: automatically generated "
              type: string
            CreatedDate:
              description: |2-
                 The date when the  `ProductRatePlanCharge` object was created.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
              type: string
            DefaultQuantity:
              description: |2-
                 The default quantity of units, such as the number of authors in a hosted wiki service. This field is required if you use a per-unit pricing model.
                **Character limit**: 16 **Values**: a valid quantity value 
              format: double
              type: number
            DeferredRevenueAccount:
              description: |2+
                 The name of the deferred revenue account for this charge.
                **Character limit**: 100 **Values**: an active accounting code in your Zuora Chart of Accounts
                This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).

              type: string
            Description:
              description: "A description of the charge. **Character limit**: 500 **Values**: a string of 500 characters or fewer "
              type: string
            DiscountLevel:
              description: |2
                 Specifies if the discount applies to just the product rate plan, the entire subscription, or to any activity in the account.
                **Character limit**: 12 **Values**: one of the following:

                - `rateplan`
                - `subscription`, `account`
              type: string
            EndDateCondition:
              description: |2-
                 Defines when the charge ends after the charge trigger date.
                **Values**: one of the following:

                - `SubscriptionEnd`: The charge ends on the subscription end date after a specified period based on the trigger date of the charge. This is the default value.
                - `FixedPeriod`: The charge ends after a specified period based on the trigger date of the charge. If you set this field to `FixedPeriod`, you must specify the length of the period and a period type by defining the `UpToPeriods` and `UpToPeriodsType` fields.
                **Note**: If the subscription ends before the charge end date, the charge ends when the subscription ends. But if the subscription end date is subsequently changed through a Renewal, or Terms and Conditions amendment, the charge will end on the charge end date. 
              type: string
            Id:
              description: Object identifier.
              type: string
            IncludedUnits:
              description: "Specifies the number of units in the base set of units. **Character limit**: 16 **Values**: a positive decimal value "
              format: double
              type: number
            LegacyRevenueReporting:
              description: ""
              type: boolean
            ListPriceBase:
              description: |
                The list price base for the product rate plan charge. **Values**: one of the following:

                - `Per Month`
                - `Per Billing Period`
                - `Per Week`
              type: string
            MaxQuantity:
              description: |2-
                 Specifies the maximum number of units for this charge. Use this field and the `MinQuantity` field to create a range of units allowed in a product rate plan charge.
                **Character limit**: 16 **Values**: a positive decimal value 
              format: double
              type: number
            MinQuantity:
              description: "Specifies the minimum number of units for this charge. Use this field and the `MaxQuantity` field to create a range of units allowed in a product rate plan charge. **Character limit**: 16 **Values**: a positive decimal value "
              format: double
              type: number
            Name:
              description: "The name of the product rate plan charge. **Character limit**: 100 **Values**: a string of 100 characters or fewer "
              type: string
            NumberOfPeriod:
              description: "Specifies the number of periods to use when calculating charges in an overage smoothing charge model. **Character limit**: **Values**: a positive whole number "
              format: int64
              type: integer
            OverageCalculationOption:
              description: |
                Determines when to calculate overage charges. If the value of the SmoothingMode field is not specified, the value of this field is ignored. **Character limit**: 20 **Values**: one of the following:

                - `EndOfSmoothingPeriod`: This option is used by default. The overage is charged at the end of the smoothing period.
                - `PerBillingPeriod`: The overage is charged on-demand rather than waiting until the end of the smoothing period.
              type: string
            OverageUnusedUnitsCreditOption:
              description: |2
                 Determines whether to credit the customer with unused units of usage.
                **Character limit**: 20 **Values**: one of the following:

                - `NoCredit`
                - `CreditBySpecificRate`
              type: string
            PriceChangeOption:
              description: |2
                 Applies an automatic price change when a termed subscription is renewed.
                **Character limit**: **Values**: one of the following:

                - `NoChange` (default)
                - `SpecificPercentageValue`
                - `UseLatestProductCatalogPricing`
              type: string
            PriceIncreasePercentage:
              description: |2-
                 Specifies the percentage to increase or decrease the price of a termed subscription's renewal. Use this field if you set the value to `SpecificPercentageValue`.
                **Character limit**: 16 **Values**: a decimal value between -100 and 100 
              format: double
              type: number
            ProductRatePlanId:
              description: |2-
                 The ID of the product rate plan associated with this product rate plan charge.
                **Character limit**: 32 **Values**: a valid product rate plan ID 
              type: string
            RatingGroup:
              description: |
                A rating group based on which usage records are rated. Only applicable to Usage charges.

                Possible values:

                - `ByBillingPeriod`: The rating is based on all the usages in a billing period.
                - `ByUsageStartDate`: The rating is based on all the usages on the same usage start date. 
                - `ByUsageRecord`: The rating is based on each usage record.
                - `ByUsageUpload`: The rating is based on all the  usages in a uploaded usage file (`.xls` or `.csv`).
                - `ByGroupId`: The rating is based on all the usages in a custom group.

                For more information, see [Usage rating by group](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/J_Billing_Operations/Usage/Usage_Rating_by_Group).
              enum:
                - ByBillingPeriod
                - ByUsageStartDate
                - ByUsageRecord
                - ByUsageUpload
                - ByGroupId
              type: string
            RecognizedRevenueAccount:
              description: |2+
                 The name of the recognized revenue account for this charge.

                - Required when the Allow Blank Accounting Code setting is No.
                - Optional when the Allow Blank Accounting Code setting is Yes.

                **Character limit**: 100 **Values**: an active accounting code in your Zuora Chart of Accounts
                This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).

              type: string
            RevRecCode:
              description: "Associates this product rate plan charge with a specific revenue recognition code. **Character limit**: 70 **Values**: a valid revenue recognition code "
              type: string
            RevRecTriggerCondition:
              description: |2
                 Specifies when revenue recognition begins.
                **Character limit**: 22 **Values**: one of the following:

                - `ContractEffectiveDate`
                - `ServiceActivationDate`
                - `CustomerAcceptanceDate`
              type: string
            RevenueRecognitionRuleName:
              description: |
                Determines when to recognize the revenue for this charge. **Character limit**: 25 **Values**: one of the following:

                - `Recognize upon invoicing`
                - `Recognize daily over time`
              type: string
            SmoothingModel:
              description: |2
                 Specifies the smoothing model for an overage smoothing charge model.
                **Character limit**: 22 **Values**: one of the following:

                - `RollingWindow`
                - `Rollover`
              type: string
            SpecificBillingPeriod:
              description: |2-
                 Customizes the number of months or weeks for the charges billing period. This field is required if you set the value of the BillingPeriod field to `Specific Months` or `Specific Weeks`.
                **Values**: a positive integer 
              format: int64
              type: integer
            TaxCode:
              description: |2-
                 Specifies the tax code for taxation rules. Required when the Taxable field is set to `True`.

                **Character limit**: 64

                **Values**: a valid tax code

                **Note**: This value affects the tax calculation of rate plan charges that come from the `ProductRatePlanCharge`. 
              type: string
            TaxMode:
              description: |2-
                 Determines how to define taxation for the charge. Required when the Taxable field is set to `True`.

                **Character limit**: 12

                **Values**: one of the following:

                - `TaxExclusive`
                - `TaxInclusive`

                **Note**: This value affects the tax calculation of rate plan charges that come from the `ProductRatePlanCharge`. 
              type: string
            Taxable:
              description: |2-
                 Determines whether the charge is taxable. When set to `True`, the TaxMode and TaxCode fields are required when creating or updating th ProductRatePlanCharge object.

                **Character limit**: 5

                **Values**: `True`, `False`

                **Note**: This value affects the tax calculation of rate plan charges that come from the `ProductRatePlanCharge`. 
              type: boolean
            TriggerEvent:
              description: |2
                 Specifies when to start billing the customer for the charge.
                **Character limit**: 18 **Values**: one of the following:

                - `ContractEffective` is the date when the subscription's contract goes into effect and the charge is ready to be billed.
                - `ServiceActivation` is the date when the services or products for a subscription have been activated and the customers have access.
                - `CustomerAcceptance` is when the customer accepts the services or products for a subscription.
              type: string
            UOM:
              description: |2
                 Specifies the units to measure usage.
                **Character limit**: 25 **Values**: a configured unit of measure **Note**: You must specify this field when creating the following charge models:

                - Per Unit Pricing
                - Volume Pricing
                - Overage Pricing
                - Tiered Pricing
                - Tiered with Overage Pricing
              type: string
            UpToPeriods:
              description: |2
                 Specifies the length of the period during which the charge is active. If this period ends before the subscription ends, the charge ends when this period ends.
                **Character limit**: 5 **Values**: a whole number between 0 and 65535, exclusive **Note**:

                - You must use this field together with the `UpToPeriodsType` field to specify the time period. This field is applicable only when the `EndDateCondition` field is set to `FixedPeriod`.
                - If the subscription end date is subsequently changed through a Renewal, or Terms and Conditions amendment, the charge end date will change accordingly up to the original period end.
              format: int64
              type: integer
            UpToPeriodsType:
              description: |2
                 The period type used to define when the charge ends.
                **Character limit**: -- **Values**: one of the following:

                - `Billing Periods` (default)
                - `Days`
                - `Weeks`
                - `Months`
                - `Years`

                **Note**:

                - You must use this field together with the `UpToPeriods` field to specify the time period.
                - This field is applicable only when the `EndDateCondition` field is set to `FixedPeriod`.
              type: string
            UpdatedById:
              description: "The ID of the last user to update the object. **Character limit**: 32 **Values**: automatically generated "
              type: string
            UpdatedDate:
              description: "The date when the object was last updated. **Character limit**: 29 **Values**: automatically generated "
              format: date-time
              type: string
            UseDiscountSpecificAccountingCode:
              description: "Determines whether to define a new accounting code for the new discount charge. **Character limit**: 5 **Values**: `True`, `False` "
              type: boolean
            UseTenantDefaultForPriceChange:
              description: " Applies the tenant-level percentage uplift value for an automatic price change to a termed subscription's renewal. **Character limit**: 5 **Values**: `true`, `false` "
              type: boolean
            WeeklyBillCycleDay:
              description: |2
                 Specifies which day of the week as the bill cycle day (BCD) for the charge.
                This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).

                **Values**: one of the following:

                - `Sunday`
                - `Monday`
                - `Tuesday`
                - `Wednesday`
                - `Thursday`
                - `Friday`
                - `Saturday`
              type: string
          type: object
        - $ref: "#/components/schemas/ProductRatePlanChargeObjectNSFields"
        - $ref: "#/components/schemas/ProductRatePlanChargeObjectCustomFields"
    ProxyGetProductRatePlanChargeTier:
      properties:
        CreatedById:
          description: "The ID of the Zuora user who created the ProductRatePlanChargeTier object. **Character limit**: 32 **Values**: automatically generated "
          type: string
        CreatedDate:
          description: "The date when the ProductRatePlanChargeTier object was created. **Character limit**: 29 **Values**: automatically generated "
          format: date-time
          type: string
        Currency:
          description: "The code corresponding to the currency for the tier's price. **Character limit**: 3 **Values**: a valid currency code "
          type: string
        EndingUnit:
          description: "The end number of a range of units for the tier. **Character limit**: 16 **Values**: any positive decimal value "
          format: double
          type: number
        Id:
          description: Object identifier.
          type: string
        Price:
          description: |2-
             The price of the tier if the charge is a flat fee, or the price of each unit in the tier if the charge model is tiered pricing.
            **Character limit**: 16 **Values**: a valid currency value 
          format: double
          type: number
        PriceFormat:
          description: "Indicates if pricing is a flat fee or is per unit. This field is for tiered and volume pricing models only. **Character limit**: 8 **Values**: `FlatFee`, `PerUnit` **Note:** The values `Flat Fee` and `Per Unit` (with spaces) is valid for create or update calls. "
          type: string
        StartingUnit:
          description: |2-
             The starting number of a range of units for the tier.
            **Character limit**: 16 **Values**: any positive decimal value 
          format: double
          type: number
        Tier:
          description: |2-
             A unique number that identifies the tier that the price applies to.
            **Character limit**: 20 **Values**: automatically generated 
          format: int32
          type: integer
        UpdatedById:
          description: |2-
             The ID of the user who last updated the product rate plan charge tier.
            **Character limit**: 32 **Values**: automatically generated 
          type: string
        UpdatedDate:
          description: |2-
             The date when the product rate plan charge tier was last updated.
            **Character limit**: 29 **Values**: automatically generated 
          format: date-time
          type: string
      type: object
    ProxyGetRatePlan:
      allOf:
        - properties:
            AmendmentId:
              description: |2-
                 The ID of the amendment associated with the rate plan. This field only applies to amendment rate plans.
                **Character limit**: 32 **Values**: a valid amendment ID 
              type: string
            AmendmentType:
              description: "The type of amendment associated with the rate plan. This field only applies to amendment rate plans. "
              type: string
            CreatedById:
              description: "The ID of the Zuora user who created the RatePlan object. **Character limit**: 32 **Values**: automatically generated "
              type: string
            CreatedDate:
              description: "The date when the `RatePlan` object was last updated. **Character limit**: 29 **Values**: automatically generated "
              format: date-time
              type: string
            Id:
              description: Object identifier.
              type: string
            Name:
              description: |-
                The name of the rate plan.

                **Values**: inherited from `ProductRatePlan.Name` 
              type: string
            SubscriptionId:
              description: "The ID of the subscription that the rate plan belongs to. **Character limit**: 32 **Values**: a valid subscription ID "
              type: string
            UpdatedById:
              description: |2-
                 The ID of the user who last updated the rate plan.
                **Character limit**: 32 **Values**: automatically generated 
              type: string
            UpdatedDate:
              description: |2-
                 The date when the rate plan was last updated.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/RatePlanObjectCustomFields"
    ProxyGetRatePlanCharge:
      allOf:
        - properties:
            AccountingCode:
              description: |-
                The accounting code for the charge. Accounting codes group transactions that contain similar accounting attributes.

                **Character limit**: 100

                **Values**: inherited from `ProductRatePlanCharge.AccountingCode`

                **Note**: This value changes if `ProductRatePlanCharge.AccountingCode` is updated. The values of `UpdatedById` and `UpdatedDate` for the `RatePlanCharge` do not change when `ProductRatePlanCharge.AccountingCode` is updated. 
              type: string
            ApplyDiscountTo:
              description: " Specifies the type of charges a specific discount applies to. **Character limit**: 21 **Values**: inherited from `ProductRatePlanCharge.ApplyDiscountTo` "
              type: string
            BillCycleDay:
              description: |2-
                 Indicates the charge's billing cycle day (BCD), which is when bill runs generate invoices for charges associated with the product rate plan charge or the account.
                **Character limit**: 2 **Values**: inherited from `ProductRatePlanCharge.BillCycleDay` 
              format: int32
              type: integer
            BillCycleType:
              description: |2-
                 Specifies how to determine the billing day for the charge.
                **Character limit**: 20 **Values**: inherited from `ProductRatePlanCharge.BillCycleType` **Note:** You can override the value inherited from the Product Rate Plan Charge, but only when creating a new subscription or a New Product amendment. 
              type: string
            BillingPeriod:
              description: |2-
                 Allows billing period to be overridden on rate plan charge.
                ****Values**: **inherited from `ProductRatePlanCharge.BillingPeriod` **Note:** You can override the value inherited from the Product Rate Plan Charge, but only when creating a new subscription or a New Product amendment. 
              type: string
            BillingPeriodAlignment:
              description: |2-
                 Aligns charges within the same subscription if multiple charges begin on different dates.
                **Character limit**: 24 **Values**: inherited from `ProductRatePlanCharge.BillingPeriodAlignment` 
              type: string
            BillingTiming:
              description: |2+
                 The billing timing for the charge. You can choose to bill in advance or in arrears for recurring charge types. This field is not used in one-time or usage based charge types.
                **Character limit**: **Values**: one of the following:

                - `In Advance`
                - `In Arrears`
                **Note:** You can override the value inherited from the Product Rate Plan Charge when a subscription has a recurring charge type.
                This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).

              type: string
            ChargeModel:
              description: |2-
                 Determines how to evaluate charges. Charge models must be individually activated in the web-based UI.
                **Character limit**: 29 **Values**: inherited from `ProductRatePlanCharge.ChargeModel` 
              type: string
            ChargeNumber:
              description: |2
                 A unique number that identifies the charge. This number is returned as a string.
                **Character limit**: 50 **Values**: one of the following:

                - automatically generated if left null
                - a unique number of 50 characters or fewer
              type: string
            ChargeType:
              description: |2-
                 Specifies the type of charge.
                **Character limit**: 9 **Values**: inherited from `ProductRatePlanCharge.ChargeType` 
              type: string
            ChargedThroughDate:
              description: |2-
                 The date through which a customer has been billed for the charge.
                **Character limit**: 29 **Values**: automatically generated 
              format: date
              type: string
            CreatedById:
              description: "The ID of the Zuora user who created the `RatePlanCharge` object. **Character limit**: 32 **Values**: automatically generated "
              type: string
            CreatedDate:
              description: |2-
                 The date when the `RatePlanCharge` object was created.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
              type: string
            DMRC:
              description: "A delta monthly recurring charge is the change in monthly recurring revenue caused by an amendment or a new subscription. **Character limit**: 16 **Values**: automatically generated "
              format: double
              type: number
            DTCV:
              description: |2-
                 After an Amendment, the change in the total contract value (TCV) amount for this charge, compared with its previous value.
                **Character limit**: 16 **Values**: automatically generated 
              format: double
              type: number
            Description:
              description: |2-
                 A description of the charge.
                **Character limit**: 500 **Values**: inherited from `ProductRatePlanCharge.Description` 
              type: string
            DiscountLevel:
              description: "Specifies if the discount applies to just the product rate plan, the entire subscription, or to any activity in the account. **Character limit**: 12 **Values**: inherited from `ProductRatePlanCharge.DiscountLevel` "
              type: string
            EffectiveEndDate:
              description: |2-
                 The date when the segmented charge ends or ended.
                **Character limit**: 16 **Values**: automatically generated 
              format: date
              type: string
            EffectiveStartDate:
              description: |2-
                 The date when the segmented charge starts or started.
                **Character limit**: 16 **Values**: automatically generated 
              format: date
              type: string
            EndDateCondition:
              description: |2-
                 Defines when the charge ends after the charge trigger date. This field can be updated when **Status** is `Draft`.
                **Values**: one of the following:

                - `SubscriptionEnd`: The charge ends on the subscription end date after the charge trigger date. This is the default value.
                - `FixedPeriod`: The charge ends after a specified period based on the trigger date of the charge. If you set this field to `FixedPeriod`, you must specify the length of the period and a period type by defining the `UpToPeriods` and `UpToPeriodsType` fields.
                - `SpecificEndDate`: The specific date on which the charge ends. If you set this field to `SpecificEndDate`, you must specify the specific date by defining the `SpecificEndDate` field.

                **Note**: If the subscription ends before the charge end date, the charge ends when the subscription ends. But if the subscription end date is subsequently changed through a Renewal, or Terms and Conditions amendment, the charge will end on the charge end date. 
              type: string
            Id:
              description: Object identifier.
              type: string
            IsLastSegment:
              description: "Indicates if the segment of the rate plan charge is the most recent segment. **Character limit**: 5 **Values**: automatically generated: `true`, `false` "
              type: boolean
            ListPriceBase:
              description: |
                The list price base for the product rate plan charge. **Values**: one of the following:

                - `Per Month`
                - `Per Billing Period`
                - `Per Week`
              type: string
            MRR:
              description: "Monthly recurring revenue (MRR) is the amount of recurring charges in a given month. The MRR calculation doesn't include one-time charges nor usage charges. **Character limit**: 16 **Values**: automatically generated "
              format: double
              type: number
            Name:
              description: "The name of the rate plan charge. **Character limit**: 100 **Values**: automatically generated "
              type: string
            NumberOfPeriods:
              description: "Specifies the number of periods to use when calculating charges in an overage smoothing charge model. **Character limit**: 5 **Values**: inherited from `ProductRatePlanCharge.NumberOfPeriod` "
              format: int64
              type: integer
            OriginalId:
              description: "The original ID of the rate plan charge. **Character limit**: 32 **Values**: automatically generated "
              type: string
            OverageCalculationOption:
              description: "Determines when to calculate overage charges. If the value of the SmoothingMode field is null (not specified and not inherited from ProductRatePlanCharge.SmoothingMode), the value of this field is ignored. **Character limit**: 20 **Values**: inherited from `ProductRatePlanCharge.OverageCalculationOption` "
              type: string
            OverageUnusedUnitsCreditOption:
              description: |2-
                 Determines whether to credit the customer with unused units of usage.
                **Character limit**: 20 **Values**: inherited from `ProductRatePlanCharge.OverageUnusedUnitsCreditOption` 
              type: string
            PriceChangeOption:
              description: |2
                 Applies an automatic price change when a termed subscription is renewed.
                **Character limit**: **Values**: one of the following:

                - `NoChange` (default)
                - `SpecificPercentageValue`
                - `UseLatestProductCatalogPricing`
              type: string
            PriceIncreasePercentage:
              description: |2-
                 Specifies the percentage to increase or decrease the price of renewed subscriptions.
                **Character limit**: 16 **Values**: a decimal value between -100 and 100 
              format: double
              type: number
            ProcessedThroughDate:
              description: |2-
                 The date until when charges have been processed. When billing in arrears, such as usage, this field value is the the same as the `ChargedThroughDate` value. This date is the earliest date when a charge can be amended.
                **Character limit**: 29 **Values**: automatically generated 
              format: date
              type: string
            Quantity:
              description: |2-
                 The default quantity of units, such as the number of authors in a hosted wiki service. Valid for all charge models except for Flat Fee pricing.
                **Character limit**: 16 **Values**: a valid quantity value 
              format: double
              type: number
            RatePlanId:
              description: |2-
                 The ID of the rate plan associated with the rate plan charge.
                **Character limit**: 32 **Values**: inherited from `RatePlan.Id` 
              type: string
            RatingGroup:
              description: |
                A rating group based on which usage records are rated. Only applicable to Usage charges.

                Possible values:

                - `ByBillingPeriod`: The rating is based on all the usages in a billing period.
                - `ByUsageStartDate`: The rating is based on all the usages on the same usage start date. 
                - `ByUsageRecord`: The rating is based on each usage record.
                - `ByUsageUpload`: The rating is based on all the  usages in a uploaded usage file (`.xls` or `.csv`).
                - `ByGroupId`: The rating is based on all the usages in a custom group.

                For more information, see [Usage rating by group](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/J_Billing_Operations/Usage/Usage_Rating_by_Group).
              enum:
                - ByBillingPeriod
                - ByUsageStartDate
                - ByUsageRecord
                - ByUsageUpload
                - ByGroupId
              type: string
            RevRecCode:
              description: |2-
                 Associates this product rate plan charge with a specific revenue recognition code.

                **Character limit**: 70

                **Values**: inherited from `ProductRatePlanCharge.RevRecCode` or a valid revenue recognition code

                **Note**: Unless overridden, this value changes if `ProductRatePlanCharge.RevRecCode` is updated. The values of `UpdatedById` and `UpdatedDate` for the `RatePlanCharge` do not change when `ProductRatePlanCharge.RevRecCode` is updated. 
              type: string
            RevRecTriggerCondition:
              description: |2-
                 Specifies when revenue recognition begins.

                **Character limit**: 22

                **Values**: inherited from `ProductRatePlanCharge.RevRecTriggerCondition` or one of the following:

                -  `ContractEffectiveDate`

                -  `ServiceActivationDate`

                -  `CustomerAcceptanceDate`

                Note: Unless overridden, this value changes if `ProductRatePlanCharge.RevRecTriggerCondition` is updated. The values of `UpdatedById` and `UpdatedDate` for the `RatePlanCharge` do not change when `ProductRatePlanCharge.RevRecTriggerCondition` is updated. 
              type: string
            RevenueRecognitionRuleName:
              description: |2-
                 Specifies the Revenue Recognition Rule that you want the Rate Plan Charge to use. This field can be updated when **Status** is `Draft`. By default, the Revenue Recognition Rule is inherited from the Product Rate Plan Charge. For Amend calls, you can use this field only for NewProduct amendments. For Update calls, you can use this field only to update subscriptions in draft status. Note that if you use this field to specify a Revenue Recognition Rule for the Rate Plan Charge, the rule will remain as specified even if you later change the rule used by the corresponding Product Rate Plan Charge.

                **Character limit**: n/a

                **Values**: inherited from `ProductRatePlanCharge.RevenueRecognitionRuleName` or the name of an active Revenue Recognition Rule

                **Note**: Unless overridden, this value changes if `ProductRatePlanCharge.RevenueRecognitionRuleName` is updated. The values of `UpdatedById` and `UpdatedDate` for the `RatePlanCharge` do not change when `ProductRatePlanCharge.RevenueRecognitionRuleName` is updated. 
              type: string
            RolloverBalance:
              description: |
                Specifies the number of units of measure (UOM) rolled over from previous periods. The value of this field is the rollover balance for the corresponding account.

                This field is applicable only to usage charges with overage models.

                **Note**:

                - You cannot query or filter this field with other fields in a single query.
                - To query or filter this field, you must specify and only specify the rate plan charge Id in the condition.
                - You cannot use this field in the query or filter condition.
              maxLength: 16
              type: number
            Segment:
              description: |2-
                 The identifying number of the subscription rate plan segment. Segments are numbered sequentially, starting with 1.
                **Character limit**: 2 **Values**: automatically generated 
              format: int32
              type: integer
            SpecificBillingPeriod:
              description: |2-
                 Customizes the number of months or weeks for the charges billing period. This field is required if you set the value of the BillingPeriod field to `Specific Months` or `Specific Weeks`.
                **Character limit**: 5 **Values**: inherited from `ProductRatePlanCharge.BillingPeriod` **Note:** You can override the value inherited from the Product Rate Plan Charge, but only when creating a new subscription or a New Product amendment. 
              format: int64
              type: integer
            SpecificEndDate:
              description: |2
                 The specific date on which the charge ends, in `yyyy-mm-dd` format.
                **Character limit**: 29 **Note**:

                - This field is only applicable when the `EndDateCondition` field is set to `SpecificEndDate`.
                - If the subscription ends before the specific end date, the charge ends when the subscription ends. But if the subscription end date is subsequently changed through a Renewal, or Terms and Conditions amendment, the charge will end on the specific end date.
              format: date
              type: string
            TCV:
              description: |2-
                 The total contract value (TCV) is the value of a single rate plan charge in a subscription over the lifetime of the subscription. This value does not represent all charges on the subscription. The TCV includes recurring charges and one-time charges, but it doesn't include usage charge.
                **Character limit**: 16 **Values**: automatically generated 
              format: double
              type: number
            TriggerDate:
              description: |2-
                 The date when the charge becomes effective and billing begins, in `yyyy-mm-dd` format. This field is required if the `TriggerEvent` field value is `SpecificDate`.
                **Character limit**: 29 
              format: date
              type: string
            TriggerEvent:
              description: |2
                 Specifies when to start billing the customer for the charge.
                **Note: **This field can be passed through the Subscribe and Amend calls and will override the default value set on the Product Rate Plan Charge.
                **Character limit**: 18 **Values**: inherited from `ProductRatePlanCharge.TriggerEvent` and can be one of the following values:

                - `ContractEffective` is the date when the subscription's contract goes into effect and the charge is ready to be billed.
                - `ServiceActivation` is when the services or products for a subscription have been activated and the customers have access.
                - `CustomerAcceptance` is when the customer accepts the services or products for a subscription.
                - `SpecificDate` is valid only on the RatePlanCharge.
              type: string
            UOM:
              description: |2-
                 Specifies the units to measure usage.
                **Character limit**: 25 **Values**: inherited from `ProductRatePlanCharge.UOM` 
              type: string
            UpToPeriods:
              description: |2
                 Specifies the length of the period during which the charge is active. If this period ends before the subscription ends, the charge ends when this period ends.
                **Character limit**: 5 **Values**: inherited from `ProductRatePlanCharge.UpToPeriods` **Note**:

                - You must use this field together with the `UpToPeriodsType` field to specify the time period. This field is only applicable only when the `EndDateCondition` field is set to `FixedPeriod`.
                - You can override the value inherited from the Product Rate Plan Charge, but only when creating a new subscription or a New Product amendment.
                - Use this field to override the value in `ProductRatePlanCharge.UpToPeriod`.
                - If you override the value in this field, enter a whole number between 0 and 65535, exclusive.
                - If the subscription end date is subsequently changed through a Renewal, or Terms and Conditions amendment, the charge end date will change accordingly up to the original period end.
              format: int64
              type: integer
            UpToPeriodsType:
              description: |2
                 The period type used to define when the charge ends. This field can be updated when **Status** is `Draft`. **Values**: one of the following:

                - `Billing Periods` (default)
                - `Days`
                - `Weeks`
                - `Months`
                - `Years`
                **Note**:

                - You must use this field together with the `UpToPeriods` field to specify the time period.
                - This field is only applicable only when the `EndDateCondition` field is set to `FixedPeriod`.
              type: string
            UpdatedById:
              description: "The ID of the last user to update the object. **Character limit**: 32 **Values**: automatically generated "
              type: string
            UpdatedDate:
              description: |2-
                 The date when the object was last updated.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
              type: string
            Version:
              description: " The version of the rate plan charge. Each time a charge is amended, Zuora creates a new version of the rate plan charge. **Character limit**: 5 **Values**: automatically generated "
              format: int64
              type: integer
            WeeklyBillCycleDay:
              description: |2
                 Specifies which day of the week as the bill cycle day (BCD) for the charge.
                This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).

                **Values**: one of the following:

                - `Sunday`
                - `Monday`
                - `Tuesday`
                - `Wednesday`
                - `Thursday`
                - `Friday`
                - `Saturday`
              type: string
          type: object
        - $ref: "#/components/schemas/RatePlanChargeObjectCustomFields"
    ProxyGetRatePlanChargeTier:
      properties:
        CreatedById:
          description: "The ID of the Zuora user who created the RatePlanChargeTier object. **Character limit**: 32 **Values**: automatically generated "
          type: string
        CreatedDate:
          description: |2-
             The date when the RatePlanChargeTier object was created.
            **Character limit**: 29 **Values**: automatically generated 
          format: date-time
          type: string
        EndingUnit:
          description: |2-
             The end number of a range of units for the tier.
            **Character limit**: 16 **Values**: any positive decimal value 
          format: double
          type: number
        Id:
          description: Object identifier.
          type: string
        Price:
          description: |2-
             The price of the tier if the charge is a flat fee, or the price of each unit in the tier if the change model is tiered pricing.
            **Character limit**: 16 **Values**: any positive decimal value 
          format: double
          type: number
        PriceFormat:
          description: |2-
             Indicates if the price is a flat fee or is per unit.
            **Character limit**: 8 **Values**: `Flat Fee`, `Per Unit` 
          type: string
        RatePlanChargeId:
          description: |2-
             The ID of the subscription or amendment rate plan charge associated with this tier. You can't create an unassociated tier.
            **Character limit**: 32 **Values**: inherited from `RatePlanCharge.Id`. 
          type: string
        StartingUnit:
          description: |2-
             The start number of a range of units for the tier.
            **Character limit**: 16 **Values**: any positive decimal value 
          format: double
          type: number
        Tier:
          description: |2-
             A unique number that identifies the tier that the price applies to.
            **Character limit**: 20 **Values**: automatically generated 
          format: int32
          type: integer
        UpdatedById:
          description: "The ID of the last user to update the object. **Character limit**: 32 **Values**: automatically generated "
          type: string
        UpdatedDate:
          description: |2-
             The date when the object was last updated.
            **Character limit**: 29 **Values**: automatically generated 
          format: date-time
          type: string
      type: object
    ProxyGetRefund:
      allOf:
        - properties:
            AccountId:
              description: |2-
                 The ID of the account associated with this refund. Specify a value for this field only if you're creating an electronic non-referenced refund. Don't specify a value for any other type of refund; Zuora associates the refund automatically with the account from the associated payment.
                **Character limit**: 32 **Values**: a valid account ID 
              type: string
            AccountingCode:
              description: |2-
                 The accounting code for the payment or invoice line item that the refund applies to. If there is no accounting code, then this value is null. Accounting codes group transactions that contain similar accounting attributes.
                **Character limit**: 50 **Values**: automatically generated 
              type: string
            Amount:
              description: |2-
                 The amount of the refund. The amount can't exceed the amount of the associated payment. If the original payment was applied to a single invoice, you can create a partial refund by specifying an amount in this field or through the UI. If the payment was applied to multiple invoices, you can create a partial refund by using the `RefundInvoicePaymentData` field of this operation or through the UI.
                **Character limit**: 16 **Values**: a valid currency amount 
              format: double
              type: number
            CancelledOn:
              description: |2-
                 The date the refund was cancelled.
                **Values**: automatically generated 
              format: date-time
              type: string
            Comment:
              description: |2-
                 Use this field to record comments about the refund.
                **Character limit**: 255 **Values**: a string of 255 characters or fewer 
              type: string
            CreatedById:
              description: |2-
                 The ID of the Zuora user who created the `Refund` object.
                **Character limit**: 32 **Values**: automatically generated 
              type: string
            CreatedDate:
              description: |2-
                 The date when the `Refund` object was created.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
              type: string
            Gateway:
              description: |2-
                 The gateway that processed the original payment. Zuora uses this same gateway for the corresponding refund. If this payment gateway is no longer active, then the electronic refund fails. A gateway is an online service provider that connects an online shopping cart to a payment processor.
                **Values**: automatically inherited from the `Payment` object 
              type: string
            GatewayResponse:
              description: |2-
                 The message returned from the payment gateway for the refund. This message is gateway-dependent.
                **Character limit**: 500 **Values**: automatically generated 
              type: string
            GatewayResponseCode:
              description: |2-
                 The code returned from the payment gateway for the payment. This code is gateway-dependent.
                **Character limit**: 20 **System****Values**: automatically generated 
              type: string
            GatewayState:
              description: |2-
                 The status of the payment in the gateway.
                **Character limit**: 19 **Values**: automatically generated 
              type: string
            Id:
              description: Object identifier.
              type: string
            MarkedForSubmissionOn:
              description: " The date when a payment was marked and waiting for batch submission to the payment process. **Character limit**: 29 **Values**: automatically generated "
              format: date-time
              type: string
            MethodType:
              description: |2
                 Indicates how an external refund was issued to a customer. This field is required for an external refund. You can issue an external refund on an electronic payment. **Character limit**: 30 **Values**:

                - `ACH`
                - `Cash`
                - `Check`
                - `CreditCard`
                - `Other`
                - `PayPal`
                - `WireTransfer`
                - `DebitCard`
                - `CreditCardReferenceTransaction`
              type: string
            PaymentId:
              description: |2-
                 The unique ID of the payment associated with this refund. Don't specify a value for this field if you're creating an electronic non-referenced refund.
                **Character limit**: 32 **Values**: a valid payment ID 
            PaymentMethodId:
              description: |2-
                 The unique ID of the payment method that the customer used to make the payment. Specify a value for this field only if you're creating an electronic non-referenced refund.
                **Character limit**: 32 **V****alues**: a valid payment method ID 
              type: string
            PaymentMethodSnapshotId:
              description: |2-
                 The unique ID of the payment method snapshot which is a copy of the particular Payment Method used in a transaction.
                **Character limit**: 32 **V****alues**: a valid payment method snapshot ID 
              type: string
            ReasonCode:
              description: |2-
                 A code identifying the reason for the transaction. Must be an existing reason code or empty. If you do not specify a value, Zuora uses the default reason code.
                **Character limit**: 32 **V****alues**: a valid reason code 
              type: string
            ReferenceID:
              description: |2-
                 The transaction ID returned by the payment gateway for an electronic refund. Use this field to reconcile refunds between your gateway and Zuora Payments.
                **Character limit**: 60 **Values**: a string of 60 characters or fewer 
              type: string
            RefundDate:
              description: |2-
                 The date of the refund, in `yyyy-mm-dd` format. The date of the refund cannot be before the payment date. Specify this field only for external refunds. Zuora automatically generates this field for electronic refunds.
                **Character limit**: 29 
              format: date
              type: string
            RefundNumber:
              description: |2-
                 The unique identifier of the refund.
                **Character limit**: 50 **Values**: automatically generated 
              type: string
            RefundTransactionTime:
              description: |2-
                 The date and time when the refund was issued.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
              type: string
            SecondRefundReferenceId:
              description: |2-
                 The transaction ID returned by the payment gateway if there is an additional transaction for the payment. Use this field to reconcile payments between your gateway and Zuora Payments.
                **Character limit**: 60 **Values**: a string of 60 characters or fewer 
              type: string
            SettledOn:
              description: |2-
                 The date when the payment was settled in the payment processor. This field is used by the Spectrum gateway only and not applicable to other gateways.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
              type: string
            SoftDescriptor:
              description: |2
                 A payment gateway-specific field that maps Zuora to other gateways . **Character limit**: 35 **Values**:

                - 3-byte company identifier &quot;*&quot; 18-byte descriptor
                - 7-byte company identifier &quot;*&quot; 14-byte descriptor
                - 12-byte company identifier &quot;*&quot; 9-byte descriptor
              type: string
            SoftDescriptorPhone:
              description: |2
                 A payment gateway-specific field that maps Zuora to other gateways . **Character limit**: 20 **Values**:

                - Customer service phone number formatted as: `NNN-NNN-NNNN` or `NNN-AAAAAAA`
                - URL (non-e-Commerce): Transactions sent with a URL do not qualify for the best interchange rate
                - Email address
              type: string
            SourceType:
              description: |2
                 Specifies whether the refund is a refund payment or a credit balance. This field is required when creating an non-referenced refund. If you creating an non-referenced refund, then set this value to `CreditBalance`.
                **Character limit**: 13 **Values**:

                - `Payment`
                - `CreditBalance`
              type: string
            Status:
              description: |2
                 The status of the refund.
                **Character limit**: 10 **Values**: automatically generated:

                - `Canceled`
                - `Error`
                - `Processed`
                - `Processing`
              type: string
            SubmittedOn:
              description: |2-
                 The date when the payment was submitted.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
              type: string
            TransferredToAccounting:
              description: |2
                 Specifies whether or not the object has been transferred to an external accounting system. Use this field for integrations with accounting systems such as NetSuite.
                **Character limit**: 10 **Values**: automatically generated:

                - `Processing`
                - `Yes`
                - `Error`
                - `Ignore`
              type: string
            Type:
              description: |2
                 Specifies if the refund is electronic or external.
                **Character limit**: 10 **Values**:

                - `Electronic`
                - External
              type: string
            UpdatedById:
              description: |2-
                 The ID of the last user to update the object.
                **Character limit**: 32 **Values**: automatically generated 
              type: string
            UpdatedDate:
              description: |2-
                 The date when the object was last updated.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/RefundObjectNSFields"
        - $ref: "#/components/schemas/RefundObjectCustomFields"
    ProxyGetRefundInvoicePayment:
      properties:
        CreatedById:
          description: |2-
             The ID of the Zuora user who created the RefundInvoicePayment object.
            **Character limit**: 32 **Values**: automatically generated 
          type: string
        CreatedDate:
          description: |2-
             The date when the RefundInvoicePayment object was created.
            **Character limit**: 29 **Values**: automatically generated 
          format: date-time
          type: string
        Id:
          description: Object identifier.
          type: string
        InvoiceId:
          description: |2-
             The unique ID of the invoice associated with this refund invoice payment.
            **Character limit**: 32 **Values**: a valid invoice ID 
          type: string
        InvoicePaymentId:
          description: " The ID of the `InvoicePayment.Id` "
          type: string
        RefundAmount:
          description: "Specifies the amount of a refund applied against a payment. **Character limit**: 16 **Values**: automatically generated "
          format: double
          type: number
        RefundId:
          description: |2-
             The ID of the Refund object
            **Character limit**: 32 **Values**: inherited from `Refund.Id` 
          type: string
        UpdatedById:
          description: |2-
             The ID of the last user to update the object.
            **Character limit**: 32 **Values**: automatically generated 
          type: string
        UpdatedDate:
          description: |2-
             The date when the object was last updated.
            **Character limit**: 29 **Values**: automatically generated 
          format: date-time
          type: string
      type: object
    ProxyGetRefundTransactionLog:
      properties:
        BatchId:
          description: ""
          type: string
        Gateway:
          description: ""
          type: string
        GatewayReasonCode:
          description: ""
          type: string
        GatewayReasonCodeDescription:
          description: ""
          type: string
        GatewayState:
          description: ""
          type: string
        GatewayTransactionType:
          description: ""
          type: string
        Id:
          description: Object identifier.
          type: string
        RefundId:
          description: ""
          type: string
        RequestString:
          description: ""
          type: string
        ResponseString:
          description: ""
          type: string
        TransactionDate:
          description: ""
          format: date-time
          type: string
        TransactionId:
          description: ""
          type: string
      type: object
    ProxyGetSubscription:
      allOf:
        - properties:
            AccountId:
              description: " This field can be updated when **Status** is `Draft`. The ID of a valid account ID. "
              type: string
            AutoRenew:
              description: |2-
                 This field can be updated when **Status** is `Draft`. Indicates if the subscription automatically renews at the end of the term.
                **Values**: `true`, `false` 
              type: boolean
            CancelledDate:
              description: " The date on which the subscription was canceled. "
              format: date
              type: string
            ContractAcceptanceDate:
              description: " The date when the customer accepts the contract. This field can be updated when **Status** is `Draft`. "
              format: date
              type: string
            ContractEffectiveDate:
              description: |2-
                 The date when the contract takes effect. This field can be updated when **Status** is `Draft`.
                **Note**: This field is required in the subscribe call. If you set the value of this field to null and both the ServiceActivationDate and ContractAcceptanceDate fields are not required, the subscribe call still returns success, but the new subscription is in `DRAFT` status. To activate the subscription, you must set a valid date to this field. 
              format: date
              type: string
            CreatedById:
              description: "The user ID of the person who created the subscription. **Character limit**: 32 **Values**: automatically generated "
              type: string
            CreatedDate:
              description: |2-
                 The date the subscription was created. This value is the same as the OriginalCreatedDate value until the subscription is amended.
                **Values**: automatically generated 
              format: date-time
              type: string
            CreatorAccountId:
              description: |2-
                 The account ID that created the subscription or the amended subscription.
                **Character limit**: 32 **Values**: automatically generated 
              type: string
            CreatorInvoiceOwnerId:
              description: |2-
                 The account ID that owns the invoices associated with the subscription or the amended subscription.
                **Character limit**: 32 **Values**: automatically generated 
              type: string
            CurrentTerm:
              description: |2-
                 The length of the period for the current subscription term. If TermType is set to `TERMED`, this field is required and must be greater than `0`. If TermType is set to `EVERGREEN`, this value is ignored. Default is `0`.
                **Character limit**: 20 **Values**: automatically generated 
              format: int32
              type: integer
            CurrentTermPeriodType:
              description: |2
                 The period type for the current subscription term. This field is used with the CurrentTerm field to specify the current subscription term.
                **Values**:

                - `Month` (default)
                - `Year`
                - `Day`
                - `Week`
              type: string
            Id:
              description: Object identifier.
              type: string
            InitialTerm:
              description: |2-
                 The length of the period for the first subscription term. This field can be updated when Status is `Draft`.
                **Required**: If TermType is Termed **Character limit**: 20 **Values**: any valid number. The default value is 0. 
              format: int32
              type: integer
            InitialTermPeriodType:
              description: |2
                 The period type for the first subscription term.
                **Values**:

                - `Month` (default)
                - `Year`
                - `Day`
                - `Week`
                **Note**:

                - This field can be updated when Status is `Draft`.
                - This field is used with the InitialTerm field to specify the initial subscription term.
              type: string
            InvoiceOwnerId:
              description: " This field can be updated when **Status** is `Draft`. A valid account ID. "
              type: string
            IsInvoiceSeparate:
              description: |2-
                 Determines if the subscription is invoiced separately. If `TRUE`, then all charges for this subscription are collected into the subscription's own invoice.
                **V****alues**: `TRUE`, `FALSE `(default) 
              type: boolean
            Name:
              description: |2
                 The unique identifier of the subscription. If you don't specify a value, then Zuora generates a name automatically. Whether auto-generated or manually specified, the subscription name must be unique. Otherwise an error will occur.
                **Character limit**: 100 **Values**: one of the following:

                - leave null to automatically generate
                - a string of 100 characters or fewer
              type: string
            Notes:
              description: |2-
                 Use this field to record comments about the subscription.
                **Character limit**: 500 **Values**: a string of 500 characters or fewer 
              type: string
            OriginalCreatedDate:
              description: |2-
                 The date when the subscription was originally created. This value is the same as the CreatedDate value until the subscription is amended.
                **Values**: automatically generated 
              format: date-time
              type: string
            OriginalId:
              description: |2-
                 The original ID of this subscription.
                **Values**: automatically generated 
              type: string
            PreviousSubscriptionId:
              description: |2-
                 The subscription ID immediately prior to the current subscription.
                **Character limit**: 32 **Values**: automatically generated 
              type: string
            RenewalSetting:
              description: |2-
                 This field can be updated when **Status** is `Draft`. Specifies whether a termed subscription will remain termed or change to evergreen when it is renewed.
                **Required**: If TermType is Termed **Values**: `RENEW_WITH_SPECIFIC_TERM `(default), `RENEW_TO_EVERGREEN` 
              type: string
            RenewalTerm:
              description: |2
                 The length of the period for the subscription renewal term. This field can be updated when **Status** is `Draft`.
                **Required**: If TermType is Termed.
                **Character limit**: 20 **Values**: one of the following:

                - leave null to default to `0`
                - any number
              format: int32
              type: integer
            RenewalTermPeriodType:
              description: |2
                 The period type for the subscription renewal term.
                **Values**:

                - `Month` (default)
                - `Year`
                - `Day`
                - `Week`
                **Note**:

                - This field is used with the RenewalTerm field to specify the subscription renewal term.
                - This field can be updated when Status is `Draft`.
              type: string
            Revision:
              description: |
                An auto-generated decimal value uniquely tagged with a subscription. The value always contains one decimal place, for example, the revision of a new subscription is 1.0. If a further version of the subscription is created, the Revision value will be increased by 1. Also, the Revision value is always incremental regardless of deletion of subscription versions.
                **Note:** To get this field, you must set the Zuora WSDL version to 107.0 or over in the `X-Zuora-WSDL-Version` header parameter.
              type: string
            ServiceActivationDate:
              description: " The date when the subscription is activated. This field can be updated when **Status** is `Draft`. "
              format: date
              type: string
            Status:
              description: |2
                 The status of the subscription.
                **Character limit**: 17 **Values**: automatically generated **Possible values**: one of the following:

                - `Draft`
                - `Pending Activation`
                - `Pending Acceptance`
                - `Active`
                - `Cancelled`
                - `Expired`
                - `Suspended` (This value is in **Limited Availability**.)
              type: string
            SubscriptionEndDate:
              description: |2-
                 The date when the subscription term ends, where the subscription ends at midnight the day before. For example, if the SubscriptionEndDate is 12/31/2016, the subscriptions ends at midnight (00:00:00 hours) on 12/30/2016. This date is the same as the term end date or the cancelation date, as appropriate.
                **Character limit**: 29 **Values**: automatically generated 
              format: date
              type: string
            SubscriptionStartDate:
              description: |2-
                 The date when the subscription term starts. This date is the same as the start date of the original term, which isn't necessarily the start date of the current or new term.
                **Character limit**: 29 **Values**: automatically generated 
              format: date
              type: string
            TermEndDate:
              description: " This field can be updated when **Status** is `Draft`. The date when the subscription term ends. If the subscription is evergreen, the TermEndDate value is null or is the cancelation date, as appropriate. **Character limit**: 29 **Values**: automatically generated "
              format: date
              type: string
            TermStartDate:
              description: |2-
                 This field can be updated when **Status** is `Draft`. The date when the subscription term begins. If this is a renewal subscription, then this date is different from the subscription start date.
                **Character limit**: 29 **Version notes**: -- 
              format: date
              type: string
            TermType:
              description: |2-
                 This field can be updated when **Status** is `Draft`. Indicates if a subscription is termed or evergreen.
                **Character limit**: 9 **Values**: `TERMED`, `EVERGREEN` 
              type: string
            UpdatedById:
              description: |2-
                 The ID of the user who last updated the subscription.
                **Character limit:** 32 **Values: **automatically generated 
              type: string
            UpdatedDate:
              description: |2-
                 The date when the subscription was last updated.
                **Character limit:** 29 **Values**: automatically generated 
              format: date-time
              type: string
            Version:
              description: |2-
                 The version number of the subscription.
                **Values**: automatically generated 
              format: int32
              type: integer
          type: object
        - $ref: "#/components/schemas/SubscriptionObjectQTFields"
        - $ref: "#/components/schemas/SubscriptionObjectNSFields"
        - $ref: "#/components/schemas/SubscriptionObjectCustomFields"
    ProxyGetSubscriptionProductFeature:
      allOf:
        - properties:
            CreatedById:
              description: ""
              type: string
            CreatedDate:
              description: |2-
                 Date and time when the product feature was added to the subscription.
                **Character limit**: 29 **Values**: 
              format: date-time
              type: string
            Description:
              description: |2-
                 Description of the subscription product feature.
                **Character limit**: 500 **Values**: 
              type: string
            FeatureCode:
              description: |2-
                 Unique code of the feature.
                **Character limit**: 255 **Values**: 
              type: string
            FeatureId:
              description: |2-
                 Internal Zuora ID of the feature.
                **Character limit**: 32 **Values**: 
              type: string
            Id:
              description: Object identifier.
              type: string
            Name:
              description: |2-
                 Name of the feature.
                **Character limit**: 255 **Values**: 
              type: string
            RatePlanId:
              description: |2-
                 Id of the product rate plan to which the feature belongs.
                **Character limit**: 32 **Values**: 
              type: string
            UpdatedById:
              description: |2-
                 Internal Zuora ID of the user who last updated the subscription product feature.
                **Character limit**: 32 **Values**: 
              type: string
            UpdatedDate:
              description: |2-
                 Date and time when the subscription product feature was last updated.
                **Character limit**: 29 **Values**: 
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/SubscriptionProductFeatureObjectCustomFields"
    ProxyGetTaxationItem:
      allOf:
        - properties:
            AccountingCode:
              description: " The Chart of Accounts "
              type: string
            CreatedById:
              description: |2-
                 The ID of the user who created the taxation item.
                **Character limit**: 32 **Values**: automatically generated 
              type: string
            CreatedDate:
              description: |2-
                 The date when the payment was created in the Zuora system.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
              type: string
            ExemptAmount:
              description: |2-
                 The calculated tax amount excluded due to the exemption.
                **Character limit**: 16 **Values**: a decimal value 
              format: double
              type: number
            Id:
              description: Object identifier.
              type: string
            InvoiceItemId:
              description: |2-
                 The ID of the specific invoice item that the taxation information applies to.
                **Character limit**: 32 **Values**: a valid invoice item ID 
              type: string
            Jurisdiction:
              description: |2-
                 The jurisdiction that applies the tax or VAT. This value is typically a state, province, county, or city.
                **Character limit**: 32 **Values**: a string of 32 characterrs or fewer 
              type: string
            LocationCode:
              description: |2-
                 The identifier for the location based on the value of the `TaxCode` field.
                **Character limit**: 32 **Values**: automatically generated 
              type: string
            Name:
              description: |2-
                 The name of the tax rate, such as sales tax or GST. This name is displayed on invoices.
                **Character limit**: 128 **Values**: a string of 128 characters or fewer 
              type: string
            TaxAmount:
              description: |2-
                 The amount of the tax applied to the charge.
                **Character limit**: 16 **Values**: a decimal value 
              format: double
              type: number
            TaxCode:
              description: |2-
                 The tax code identifies which tax rules and tax rates to apply to a specific charge.
                **Character limit**: 32 **Values**: a string of 32 characters or fewer 
              type: string
            TaxCodeDescription:
              description: |2-
                 The description for the tax code.
                **Character limit**: 255 **Values**: a string of 255 characters or fewer 
              type: string
            TaxDate:
              description: |2-
                 The date that the tax is applied to the charge, in `yyyy-mm-dd` format.
                **Character limit**: 29 
              format: date
              type: string
            TaxRate:
              description: |2-
                 The tax rate applied to the charge.
                **Character limit**: 16 **Values**: a valid decimal value 
              format: double
              type: number
            TaxRateDescription:
              description: |2-
                 The description of the tax rate.
                **Character limit**: 255 **Values**: a string of 255 characters or fewer 
              type: string
            TaxRateType:
              description: |2-
                 The type of the tax rate applied to the charge.
                **Character limit**: 10 **Values**: `Percentage`, `FlatFee` 
              type: string
            UpdatedById:
              description: |2-
                 The ID of the user who last updated the taxation item.
                **Character limit**: **Values**: automatically generated 
              type: string
            UpdatedDate:
              description: "The date when the taxation item was last updated. **Character limit**: **Values**: automatically generated "
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/TaxationItemObjectCustomFields"
    ProxyGetUnitOfMeasure:
      properties:
        Active:
          description: |2-
             Indicates if the UOM is available for new product rate plans. The default value is `true`.
            **Character limit**: 5 **Values**: `true`, `false ` 
          type: boolean
        CreatedById:
          description: |2-
             The ID of the Zuora user who created the UOM.
            **Character limit**: 32 **Values**: automatically generated 
          type: string
        CreatedDate:
          description: |2-
             The date when the UOM was created.
            **Character limit**: 29 **Values**: automatically generated 
          format: date-time
          type: string
        DecimalPlaces:
          description: "The number of digits to the right of the decimal point that you want to measure for the unit. To use whole numbers only, set this value to 0. You can't change this value after this `UOM` is used in any product, subscription, or usage. **Character limit**: 1 **Values**: an integer between 0 and 9, exclusive "
          format: int64
          type: integer
        DisplayedAs:
          description: "The name of the UOM that you want displayed on invoices. The default value is the `UomName` field value. **Character limit**: 50 **Values**: A string of 50 characters or fewer "
          type: string
        Id:
          description: Object identifier.
          type: string
        RoundingMode:
          description: |2-
             Specifies whether to round the UOM value up or down when the value exceeds the `DecimalPlaces` field value. The default value is `Up`.
            **Character limit**: 4 **Values**: `Up`, `Down` 
          type: string
        UomName:
          description: |2-
             The name of the UOM, such as license or GB. This name is displayed in query results and in the web-based UI labels. If you want a different name to be displayed on invoices, then use the `DisplayedAs` field to provide the invoice label.
            **Character limit**: 50 **Values**: a string of 50 characters or fewer 
          type: string
        UpdatedById:
          description: "The ID of the user who lasted updated the UOM. **Character limit**: 32 **Values**: automatically generated "
          type: string
        UpdatedDate:
          description: |2-
             The date when the UOM was last updated.
            **Character limit**: 29 **Values**: automatically generated 
          format: date-time
          type: string
      type: object
    ProxyGetUsage:
      allOf:
        - properties:
            AccountId:
              description: |2-
                 The ID of the account associated with the usage data. This field is required if no value is specified for the `AccountNumber` field.
                **Character limit**: 32 **Values**: a valid account ID 
              type: string
            AccountNumber:
              description: |2-
                 The number of the account associated with the usage data. This field is required if no value is specified for the `AccountId` field.
                **Character limit**: 50 **Values**: a valid account number 
              type: string
            ChargeId:
              description: " The OrginalId of the rate plan charge related to the usage record, e.g., `2c9081a03c63c94c013c6873357a0117` **Character limit**: 32 **Values**: a valid rate plan charge OriginalID "
              type: string
            CreatedById:
              description: |2-
                 The user ID of the person who uploaded the usage records.
                **Character limit**: 32 **Values**: automatically generated 
              type: string
            CreatedDate:
              description: |2-
                 The date when the usage was generated.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
              type: string
            Description:
              description: |
                A description of the usage record.
              type: string
            EndDateTime:
              description: |2-
                 The end date and time of a range of time when usage is tracked. Use this field for reporting; this field doesn't affect usage calculation.
                **Character limit**: 29 **Values**: a valid date and time value 
              format: date-time
              type: string
            Id:
              description: Object identifier.
              type: string
            Quantity:
              description: |2-
                 Indicates the number of units used.
                **Character limit**: 16 **Values**: a valid decimal amount equal to or greater than 0 
              format: double
              type: number
            RbeStatus:
              description: |2-
                 Indicates if the rating and billing engine (RBE) processed usage data for an invoice.
                **Character limit**: 9 **Values**: automatically generated to be one of the following values: `Importing`, `Pending`, `Processed` 
              type: string
            SourceType:
              description: |2-
                 Indicates if the usage records were imported from the web-based UI or the API.
                **Character limit**: 6 **Values**: automatically generated to be one of the following values: `API`, `Import` 
              type: string
            StartDateTime:
              description: |2-
                 The start date and time of a range of time when usage is tracked. Zuora uses this field value to determine the usage date. Unlike the `EndDateTime`, the `StartDateTime` field does affect usage calculation.
                **Character limit**: 29 **Values**: a valid date and time value 
              format: date-time
              type: string
            SubmissionDateTime:
              description: |2-
                 The date when usage was submitted.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
              type: string
            SubscriptionId:
              description: |2-
                 The ID of the subscription that contains the fees related to the usage data.
                **Character limit**: 32 **Values**: a valid subscription ID 
              type: string
            SubscriptionNumber:
              description: |
                The unique identifier number of the subscription that contains the fees related to the usage data.
              type: string
            UOM:
              description: |2-
                 Specifies the units to measure usage. Units of measure are configured in the web-based UI. Your values depend on your configuration in **Billing Settings**.
                **Character limit**: **Values**: a valid unit of measure 
              type: string
            UpdatedById:
              description: |2-
                 The ID of the user who last updated the usage upload.
                **Character limit**: 32 **Values**: automatically generated 
              type: string
            UpdatedDate:
              description: |2-
                 The date when the usage upload was last updated.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/UsageObjectCustomFields"
    ProxyModifyAccount:
      allOf:
        - properties:
            AccountNumber:
              description: |
                Unique account number assigned to the account. You can modify the account number of a customer account only if the account has no subscriptions or draft subscriptions only. Otherwise, the account number cannot be modified. **Character limit**: 50 **Values**: one of the following:

                - null to auto-generate
                - a string of 50 characters or fewer that doesn't begin with the default account number prefix
              type: string
            AdditionalEmailAddresses:
              description: "List of additional email addresses to receive emailed invoices. **Character limit**: 120 **Values**: comma-separated list of email addresses "
              type: string
            AllowInvoiceEdit:
              description: |2-
                 Indicates if associated invoices can be edited.
                **Character limit**: 5 **Values**: `true`, `false` (default if left null) 
              type: boolean
            AutoPay:
              description: |2-
                 Indicates if future payments are automatically collected when they're due during a Payment Run.
                **Character limit**: 5 **Values**: `true`, `false` (default) 
              type: boolean
            Batch:
              description: |2-
                 Organizes your customer accounts into groups to optimize your billing and payment operations. Required if you use the Subscribe call.
                **Character limit**: 20 **Values**:any system-defined batch (`Batch1` - `Batch50 `or by name). 
              type: string
            BcdSettingOption:
              description: "Billing cycle day setting option. **Character limit**: 9 **Values**: `AutoSet`, `ManualSet` "
              type: string
            BillCycleDay:
              description: "Billing cycle day (BCD) on which bill runs generate invoices for the account. **Character limit**: 2 **Values**: any activated system-defined bill cycle day (`1` - `31`) "
              format: int32
              type: integer
            BillToId:
              description: "ID of the person to bill for the account. **Character limit**: 32 **Values**: a valid contact ID for the account "
              type: string
            CrmId:
              description: "CRM account ID for the account. A CRM is a customer relationship management system, such as Salesforce.com. **Character limit**: 100 **Values**: a string of 100 characters or fewer "
              type: string
            Currency:
              description: |
                Currency that the customer is billed in. 

                You can update this field only when an account is in Draft status. After the account is activated, you cannot update this field.
              type: string
            CustomerServiceRepName:
              description: "Name of the account's customer service representative, if applicable. **Character limit**: 50 **Values**: a string of 50 characters or fewer "
              type: string
            DefaultPaymentMethodId:
              description: "ID of the default payment method for the account. This field is required if the AutoPay field is set to `true`. **Character limit**: 32 **Values**: a valid ID for an existing payment method "
              type: string
            InvoiceDeliveryPrefsEmail:
              description: "Indicates if the customer wants to receive invoices through email.  **Character limit**: 5 **Values**: `true`, `false` (default if left null) "
              type: boolean
            InvoiceDeliveryPrefsPrint:
              description: "Indicates if the customer wants to receive printed invoices, such as through postal mail. **Character limit**: 5 **Values**: `true`, `false` (default if left null) "
              type: boolean
            InvoiceTemplateId:
              description: "The ID of the invoice template. Each customer account can use a specific invoice template for invoice generation. **Character limit**: 32 **Values**: a valid template ID configured in Zuora Billing Settings "
              type: string
            Name:
              description: "Name of the account as displayed in the Zuora UI. **Character limit**: 255 **Values**: a string of 255 characters or fewer "
              type: string
            Notes:
              description: " Comments about the account. **Character limit**: 65,535 **Values**: a string of 65,535 characters "
              type: string
            ParentId:
              description: "Identifier of the parent customer account for this Account object. Use this field if you have customer hierarchy enabled. **Character limit**: 32 **Values**: a valid account ID "
              type: string
            PaymentGateway:
              description: |
                Gateway used for processing electronic payments and refunds. **Character limit**: 40 **Values**: one of the following:

                - a valid configured gateway name
                - Null to inherit the default value set in Zuora Payment Settings
              type: string
            PaymentTerm:
              description: "Indicates when the customer pays for subscriptions. **Character limit**: 100 **Values**: a valid, active payment term defined in the web-based UI administrative settings "
              type: string
            PurchaseOrderNumber:
              description: "The number of the purchase order associated with this account. Purchase order information generally comes from customers. **Character limit**: 100 **Values**: a string of 100 characters or fewer "
              type: string
            SalesRepName:
              description: "The name of the sales representative associated with this account, if applicable. **Character limit**: 50 **Values**: a string of 50 characters or fewer "
              type: string
            SoldToId:
              description: "ID of the person who bought the subscription associated with the account. **Character limit**: 32 **Values**: a valid contact ID for the account "
              type: string
            Status:
              description: |
                Status of the account in the system.

                Follow the following rules to update the status of accounts:
                - Include contact IDs in the `BillToId` and `SoldToId` fields when you change the `Status` field value to `Active`.
                - Before changing the status of an account to `Canceled`, cancel all subscriptions associated with this account. You cannot cancel an account that has active subscriptions.
                - You can update a Draft account to Active, assuming the Bill To/Sold To Contacts are assigned. 
                - You can update a Canceled account to the Active status at any time.
                - You cannot update the Active or Cancelled status of an account to `Draft`.
              enum:
                - Draft
                - Active
                - Canceled
              maxLength: 8
              type: string
            TaxCompanyCode:
              description: |2-
                 Unique code that identifies a company account in Avalara. Use this field to calculate taxes based on origin and sold-to addresses in Avalara.
                This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).

                **Character limit**: 50 **Values**: a valid company code 
              type: string
            TaxExemptCertificateID:
              description: "ID of your customer's tax exemption certificate. **Character limit**: 32 **Values**: a string of 32 characters or fewer "
              type: string
            TaxExemptCertificateType:
              description: "Type of the tax exemption certificate that your customer holds.  **Character limit**: 32 **Values**: a string of 32 characters or fewer "
              type: string
            TaxExemptDescription:
              description: "Description of the tax exemption certificate that your customer holds. **Character limit**: 500 **Values**: a string of 500 characters or fewer "
              type: string
            TaxExemptEffectiveDate:
              description: "Date when the the customer's tax exemption starts. **Character limit**: 29 **Version notes**: requires Zuora Tax "
              format: date
              type: string
            TaxExemptExpirationDate:
              description: "Date when the customer's tax exemption certificate expires  **Character limit**: 29 **Version notes**: requires Zuora Tax "
              format: date
              type: string
            TaxExemptIssuingJurisdiction:
              description: "Indicates the jurisdiction in which the customer's tax exemption certificate was issued. **Character limit**: 32 **Values**: a string of 32 characters or fewer "
              type: string
            TaxExemptStatus:
              description: |2
                 Status of the account's tax exemption. Required if you use Zuora Tax.
                **Character limit**: 19 **Values**: one of the following:

                - `Yes`
                - `No`
                - `PendingVerification`
              type: string
            VATId:
              description: |2-
                 EU Value Added Tax ID.
                This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).

                **Character limit**: 25 **Values**: a valid Value Added Tax ID 
              type: string
            communicationProfileId:
              description: "Associates the account with a specified communication profile. **Character limit**: 32 **Values**: a valid communication profile ID "
              type: string
          type: object
        - $ref: "#/components/schemas/AccountObjectNSFields"
        - $ref: "#/components/schemas/AccountObjectCustomFields"
      example:
        AccountNumber: AN_1476935163869
        AutoPay: true
        Batch: Batch1
        BillCycleDay: 1
        BillToId: 2c93808457d787030157e03220684fac
        CrmId: crmid
        Currency: USD
        DefaultPaymentMethodId: 2c93808457d787030157e03220ec4fad
        Id: 2c93808457d787030157e0321fdf4fab
        InvoiceTemplateId: 2c93808457d787030157e03208864f97
        Name: AC_1476935163869
        Notes: this is notes
        PaymentTerm: Due Upon Receipt
        SoldToId: 2c93808457d787030157e03220684fac
        Status: Active
    ProxyModifyAmendment:
      allOf:
        - properties:
            AutoRenew:
              description: |2-
                 Determines whether the subscription is automatically renewed, or whether it expires at the end of the term and needs to be manually renewed. This field can be updated when Status is `Draft`. **Required:** For amendment of type TermsAndConditions when changing the automatic renewal status of a subscription.
                **Values**: true, false 
              type: boolean
            ContractEffectiveDate:
              description: |2-
                 The date when the amendment's changes become effective for billing purposes.
                **Version notes**: -- 
              format: date
              type: string
            CurrentTerm:
              description: |2-
                 The length of the period for the current subscription term. This field can be updated when Status is `Draft`.
                **Required**: Only if the value of the Type field is set to `TermsAndConditions` and TermType is set to `TERMED`. This field is not required if TermType is set to `EVERGREEN`.
                **Character limit**: **Values**: a valid number 
              format: int64
              type: integer
            CurrentTermPeriodType:
              description: |2
                 The period type for the current subscription term. This field can be updated when Status is `Draft`. **Values**:

                - `Month` (default)
                - `Year`
                - `Day`
                - `Week`
                **Note**:

                - This field can be updated when Status is `Draft`.
                - This field is used with the CurrentTerm field to specify the current subscription term.
              type: string
            CustomerAcceptanceDate:
              description: |
                The date when the customer accepts the amendment's changes to the subscription.

                This field is only required if [Zuora is configured to require customer acceptance in Z-Billing](https://knowledgecenter.zuora.com/CB_Billing/W_Billing_and_Payments_Settings/Define_Default_Subscription_Settings) and the subscription is currently in the Pending Acceptance status (the value of the `Status` field is currently `PendingAcceptance`).

                Use this field together with the `Status` field. When you set a date in this field as a customer acceptance date, you should also set the `Status` field as `Completed`.
              format: date
              type: string
            Description:
              description: |2-
                 A description of the amendment. This field can be updated when Status is `Draft`.
                **Character limit**: 500 **Values**: maximum 500 characters 
              type: string
            EffectiveDate:
              description: |2-
                 The date when the amendment's changes take effective. This field validates that the amendment's changes are within valid ranges of products and product rate plans.
                **Required**: For the cancellation amendments. Optional for other types of amendments.
                **Version notes**: -- 
              format: date
              type: string
            Name:
              description: |2-
                 The name of the amendment. This field can be updated when Status is `Draft`.
                **Character limit**: 100 **Values**: a string of 100 characters or fewer 
              type: string
            RenewalSetting:
              description: |2-
                 Specifies whether a termed subscription will remain termed or change to evergreen when it is renewed.
                **Required**: If TermType is Termed **Values**: RENEW_WITH_SPECIFIC_TERM (default), RENEW_TO_EVERGREEN 
              type: string
            RenewalTerm:
              description: |2-
                 The term of renewal for the amended subscription. This field can be updated when Status is `Draft`.
                **Required**: Only if the value of the Type field is set to `TermsAndConditions`.
                **Character limit**: **Values:** a valid number 
              format: int64
              type: integer
            RenewalTermPeriodType:
              description: |2
                 The period type for the subscription renewal term. This field can be updated when Status is `Draft`.
                **Required**: Only if the value of the Type field is set to `TermsAndConditions`. This field is used with the RenewalTerm field to specify the subscription renewal term.
                **Values**:

                - `Month` (default)
                - `Year`
                - `Day`
                - `Week`
              type: string
            ServiceActivationDate:
              description: |
                The date when service is activated.

                This field is only required if [Zuora is configured to require service activation in Z-Billing](https://knowledgecenter.zuora.com/CB_Billing/W_Billing_and_Payments_Settings/Define_Default_Subscription_Settings) and the subscription is currently in the Pending Activation status (the value of the `Status` field is currently `PendingActivation`).

                Use this field together with the `Status` field. When you set a date in this field as a service activation date, you should also set the `Status` field as the expected next phase status: `Completed` or `PendingAcceptance`.
              format: date
              type: string
            SpecificUpdateDate:
              description: |2
                 The date when the UpdateProduct amendment takes effect. This field is only applicable if there is already a future-dated UpdateProduct amendment on the subscription.
                **Required**: Only for the UpdateProduct amendments if there is already a future-dated UpdateProduct amendment on the subscription.
              format: date
              type: string
            Status:
              description: |2
                 The status of the amendment. Type: string (enum) **Character limit**: 17 **Values**: one of the following:

                - Draft (default, if left null)
                - Pending Activation
                - Pending Acceptance
                - Completed
              type: string
            SubscriptionId:
              description: |2-
                 The ID of the subscription that the amendment changes. This field can be updated when Status is `Draft`.
                **Character limit**: 32 **Values**: a valid subscription ID 
              type: string
            TermStartDate:
              description: |2-
                 The date when the new terms and conditions take effect.
                **Required**: Only if the value of the Type field is set to TermsAndConditions.
                **Version notes**: -- 
              format: date
              type: string
            TermType:
              description: |2-
                 Indicates if the subscription is TERMED or EVERGREEN. This field can be updated when Status is `Draft`.

                - A TERMED subscription has an expiration date, and must be manually renewed.
                - An EVERGREEN subscription doesn't have an expiration date, and must be manually ended.

                **Required**: Only when as part of an amendment of type TermsAndConditions &#65279;to change the term type of a subscription. Type: string **Character limit**: 9 **Values**: TERMED, EVERGREEN 
              type: string
            Type:
              description: |2
                 The type of amendment. This field can be updated when Status is `Draft`.
                **Character limit**: 18 **Values**: one of the following:

                - Cancellation
                - NewProduct
                - OwnerTransfer
                - RemoveProduct
                - Renewal
                - UpdateProduct
                - TermsAndConditions
                - SuspendSubscription
                - ResumeSubscription
              type: string
          type: object
        - $ref: "#/components/schemas/AmendmentObjectCustomFields"
      example:
        Id: 2c93808457d787030157e02e430c1f15
        Name: AMtssl1bnuq1_new
    ProxyModifyBillRun:
      example:
        InvoiceDate: 2020-02-18
        Status: Posted
      properties:
        InvoiceDate:
          description: |
            The new invoice date of all invoices invloved in the bill run, or the new memo date of all credit memos invloved in the bill run. The date cannot fall in a closed accounting period.

            This field takes effect only when `Status` is set to `Posted`.

            **Note**: The Credit and Debit Memos feature is only available if you have [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement/Invoice_Settlement_Migration_Checklist_and_Guide) for more information. 
          format: date
          type: string
        Status:
          description: |
            The status for this bill run. See [Status Types](https://knowledgecenter.zuora.com/CB_Billing/J_Billing_Operations/G_Bill_Runs#Status_Types) for more information.

            To cancel a bill run, specify `Canceled`. To post a bill run, specify `Posted`.

            **Character limit:** 20

            **Values:** 

              * `Pending`
              * `Processing`
              * `Completed`
              * `Error`
              * `Canceled`
              * `Posted`
          type: string
      required:
        - Status
      type: object
    ProxyModifyContact:
      allOf:
        - properties:
            AccountId:
              description: |2-
                 The Zuora account ID associated with this contact. This field is not required when you use the Subscribe call. This field is required for all other calls.
                **Character limit: **32 **Values: **a valid account ID 
              type: string
            Address1:
              description: |2-
                 The first line of the contact's address, which is often a street address or business name.
                **Character limit**: 255 **Values**: a string of 255 characters or fewer 
              type: string
            Address2:
              description: |2-
                 The second line of the contact's address.
                **Character limit**: 255 **Values**: a string of 255 characters or fewer 
              type: string
            City:
              description: |2-
                 The city of the contact's address.
                **Character limit**: 40 **Values: **a string of 40 characters or fewer 
              type: string
            Country:
              description: " The country of the contact's address. "
              type: string
            County:
              description: |2-
                 The county. May optionally be used by Zuora Tax to calculate county tax.
                **Character limit**: 32 **Values**: a string of 32 characters or fewer 
              type: string
            Description:
              description: |2-
                 A description for the contact.
                **Character limit**: 100 **Values**: a string of 100 characters or fewer 
              type: string
            Fax:
              description: |2-
                 The contact's fax number.
                **Character limit**: 40 **Values**: a string of 40 characters or fewer 
              type: string
            FirstName:
              description: |2-
                 The contact's first name.
                **Character limit**: 100 **Values**: a string of the contact's first name 
              type: string
            HomePhone:
              description: |2-
                 The contact's home phone number.
                **Character limit**: 40 **Values**: a string of 40 characters or fewer 
              type: string
            LastName:
              description: |2-
                 The contact's last name.
                **Character limit**: 100 **Values**: a string of 100 characters or fewer 
              type: string
            MobilePhone:
              description: |2-
                 The contact's mobile phone number.
                **Character limit**: 40 **Values**: a string of 40 characters or fewer 
              type: string
            NickName:
              description: |2-
                 A nickname for the contact.
                **Character limit**: 100 **Values**: a string of 100 characters or fewer 
              type: string
            OtherPhone:
              description: |2-
                 An additional phone number for the contact.
                **Character limit**: 40 **Values**: a string of 40 characters or fewer 
              type: string
            OtherPhoneType:
              description: "The type of the `OtherPhone`. **Character limit**: 20 **Values**: `Work`, `Mobile`, `Home`, `Other` "
              type: string
            PersonalEmail:
              description: |2-
                 The contact's personal email address.
                **Character limit**: 80 **Values**: a string of 80 characters or fewer 
              type: string
            PostalCode:
              description: |2-
                 The zip code for the contact's address.
                **Character limit:** 20 **Values: **a string of 20 characters or fewer 
              type: string
            State:
              description: " The state or province of the contact's address. "
              type: string
            TaxRegion:
              description: "If using Zuora Tax rules "
              type: string
            WorkEmail:
              description: |2-
                 The contact's business email address.
                **Character limit**: 80 **Values**: a string of 80 characters or fewer 
              type: string
            WorkPhone:
              description: |2-
                 The contact's business phone number.
                **Character limit**: 40 **notes**: -- **Values**: a string of 40 characters or fewer 
              type: string
          type: object
        - $ref: "#/components/schemas/ContactObjectCustomFields"
      example:
        FirstName: FN1476934918260_new
        Id: 2c93808457d787030157e02e606e2095
    ProxyModifyCreditBalanceAdjustment:
      allOf:
        - properties:
            ReasonCode:
              description: |
                A code identifying the reason for the transaction. Must be an existing [reason code](https://knowledgecenter.zuora.com/CB_Billing/K_Payment_Operations/Reason_Codes_for_Payment_Operations) or empty.
              maxLength: 32
              type: string
            Status:
              description: |
                The status of the credit balance adjustment.
              enum:
                - Processed
                - Canceled
              type: string
            TransferredToAccounting:
              description: |
                Status of the credit balance adjustment's transfer to an external accounting system, such as NetSuite.
              enum:
                - Processing
                - Yes
                - Error
                - Ignore
              type: string
          type: object
        - $ref: "#/components/schemas/CreditBalanceAdjustmentObjectNSFields"
        - $ref: "#/components/schemas/CreditBalanceAdjustmentObjectCustomFields"
      example:
        Status: Canceled
    ProxyModifyFeature:
      allOf:
        - properties:
            Description:
              description: |
                Description of the feature.
              maxLength: 1000
              type: string
            FeatureCode:
              description: |
                Unique code of the feature.
              maxLength: 255
              type: string
            Name:
              description: |
                Name of the feature.
              maxLength: 255
              type: string
            Status:
              description: |
                Status of the feature.
              enum:
                - Active
                - Inactive
              type: string
          type: object
        - $ref: "#/components/schemas/FeatureObjectCustomFields"
      example:
        Description: This feature has been discontinued
        Status: Inactive
    ProxyModifyInvoice:
      allOf:
        - properties:
            RegenerateInvoicePDF:
              description: |
                Whether to regenerate a PDF file for an invoice that already has PDF files generated. 

                This field is valid only if you enable the billing document file generation feature. To enable this feature, you have to select the **Enable the billing document generation** check box after navigating to **Billing** > **Manage Billing Document Configuration** through the Zuora UI. Otherwise, the request is rejected. 

                For one specific invoice, you can use this field to regenerate PDF files for a maximum of 100 times.

                **Note**: If you set this field to `true`, you cannot update any other fields in the same update request. Otherwise, you will receive the following INVALID_VALUE error:

                "When field RegenerateInvoicePDF is set to true to regenerate the invoice PDF file, changes on other fields of the invoice are not allowed."
              type: boolean
            Status:
              description: |
                The status of the invoice in the system. This status is not the status of the payment of the invoice, just the status of the invoice itself.

                With the [Cancel Posted Billing Documents](https://knowledgecenter.zuora.com/Billing/Tenant_Management/A_Administrator_Settings/User_Roles/d_Billing_Roles#Billing_Permissions) billing permission, you can directly update the status of an invoice from Posted to Draft.

                 **Character limit**: 8
                 **Values**: one of the following:
                   -  Draft (default, automatically set upon invoice creation)
                   -  Posted
                   -  Canceled
              type: string
            TransferredToAccounting:
              description: |2-
                 Specifies whether or not the invoice was transferred to an external accounting system, such as NetSuite.
                **Character limit**: 10 **Values**: Processing, Yes, Error, Ignore 
              type: string
          type: object
        - $ref: "#/components/schemas/InvoiceObjectNSFields"
        - $ref: "#/components/schemas/InvoiceObjectCustomFields"
      example:
        Status: Posted
    ProxyModifyInvoiceAdjustment:
      allOf:
        - properties:
            ReasonCode:
              description: |2-
                 A code identifying the reason for the transaction. Must be an existing reason code or empty. If you do not specify a value, Zuora uses the default reason code.
                **Character limit**: 32 **V****alues**: a valid reason code 
              type: string
            Status:
              description: |2-
                 The status of the invoice adjustment. This field is required in the Query call, but is automatically generated in other calls.
                **Character limit**: 9 **Values**: `Canceled`, `Processed` 
              type: string
            TransferredToAccounting:
              description: |
                Indicates the status of the adjustment's transfer to an external accounting system, such as NetSuite.
              enum:
                - Processing
                - Yes
                - No
                - Error
                - Ignore
              type: string
          type: object
        - $ref: "#/components/schemas/InvoiceAdjustmentObjectCustomFields"
    ProxyModifyInvoicePayment:
      properties:
        Amount:
          description: |2-
             The amount of the payment.
            **Character limit**: 16 **Values**: a valid currency amount 
          format: double
          type: number
      type: object
    ProxyModifyPayment:
      allOf:
        - properties:
            AccountId:
              description: |
                The unique account ID for the customer that the payment is for.
              maxLength: 32
              minLength: 0
              type: string
            AccountingCode:
              description: |
                The accounting code for the payment. Accounting codes group transactions that contain similar accounting attributes.
              maxLength: 100
              minLength: 0
              type: string
            Amount:
              description: |
                The amount of the payment.
              format: double
              maxLength: 16
              minLength: 0
              type: number
            EffectiveDate:
              description: |
                The date when the payment takes effect.
              format: date
              maxLength: 29
              minLength: 0
              type: string
            PaymentMethodId:
              description: |
                The ID of the payment method used for the payment. 
              maxLength: 32
              minLength: 0
              type: string
            ReferenceId:
              description: |
                The transaction ID returned by the payment gateway. Use this field to reconcile payments between your gateway and Zuora Payments.
              maxLength: 100
              minLength: 0
              type: string
            Status:
              description: |
                The status of the payment in Zuora. The value depends on the type of payments.

                - If you have the Invoice Settlement feature disabled, for electronic payments, the status can be `Processed`, `Processing`, `Error`, or `Voided`. For external payments, the status can be `Processed` or `Canceled`.
                - If you have the Invoice Settlement feature enabled, for electronic payments, the status can be `Processed`, `Processing`, `Error`, or `Canceled`. For external payments, the status can be `Processed` or `Canceled`.
              enum:
                - Processed
                - Error
                - Voided
                - Canceled
              type: string
            TransferredToAccounting:
              description: |
                Whether the refund was transferred to an external accounting system. Use this field for integration with accounting systems, such as NetSuite.
              enum:
                - Processing
                - Yes
                - Error
                - Ignore
              type: string
            Type:
              description: |
                The type of the payment, whether the payment is external or electronic.
              enum:
                - External
                - Electronic
              type: string
          type: object
        - $ref: "#/components/schemas/PaymentObjectNSFields"
        - $ref: "#/components/schemas/PaymentObjectCustomFields"
    ProxyModifyPaymentMethod:
      allOf:
        - properties:
            AccountId:
              description: |2-
                 The ID of the customer account associated with this payment method.

                **Note:** If a payment method was created without an account ID associated, you can update the payment method to specify an account ID in this operation. However, if a payment method is already associated with a customer account, you cannot update the payment method to associate it with another account ID. You cannot remove the previous account ID and leave the `AccountId` filed empty in this operation. 
              type: string
            AchAbaCode:
              description: |2-
                 The nine-digit routing number or ABA number used by banks. Use this field for ACH payment methods.

                **Character limit**: 9 **Values**: a string of 9 characters or fewer 
              type: string
            AchAccountName:
              description: |2-
                 The name of the account holder, which can be either a person or a company. Use this field for ACH payment methods.

                **Character limit**: 70 **Values**: a string of 70 characters or fewer 
              type: string
            AchAccountType:
              description: |2
                 The type of bank account associated with the ACH payment. Use this field for ACH payment methods.

                **Character limit**: 16 **Values**:

                - `BusinessChecking`
                - `Checking`
                - `Saving`
              type: string
            AchAddress1:
              description: |2-
                 Line 1 for the ACH address. Required on create for the Vantiv payment gateway. Optional for other gateways.

                **Character limit:** **Values:** an address 
              type: string
            AchAddress2:
              description: |2-
                 Line 2 for the ACH address. Required on create for the Vantiv payment gateway. Optional for other gateways.

                **Character limit:** **Values:** an address 
              type: string
            AchBankName:
              description: |2-
                 The name of the bank where the ACH payment account is held. Use this field for ACH payment methods.

                **Character limit**: 70 **Values**: a string of 70 characters or fewer 
              type: string
            AchCity:
              description: |-
                The city of the ACH address. Use this field for ACH payment methods. **Note**: This field is only specific to the NMI payment gateway.

                **Character limit**: 40 **Values**: a string of 40 characters or fewer 
              type: string
            AchCountry:
              description: |-
                The country of the ACH address. See [Country Names and Their ISO Standard 2- and 3-Digit Codes](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/D_Country%2C_State%2C_and_Province_Codes/A_Country_Names_and_Their_ISO_Codes) for the list of supported country names. Use this field for ACH methods.

                **Note**: This field is only specific to the NMI payment gateway.

                **Character limit**: 44 **Values**: a supported country name 
              type: string
            AchPostalCode:
              description: |-
                The billing address's zip code. This field is required only when you define an ACH payment method. **Note**: This field is only specific to the NMI payment gateway.

                **Character limit**: 20 **Values**: a string of 40 characters or fewer 
              type: string
            AchState:
              description: |-
                The billing address's state. Use this field is if the `ACHCountry` value is either `Canada` or the `US`. State names must be spelled in full. For more information, see the list of [supported state names](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/D_Country%2C_State%2C_and_Province_Codes/B_State_Names_and_2-Digit_Codes). This field is required only when you define an ACH payment method. **Note**: This field is only specific to the NMI payment gateway.

                **Character limit**: 50 **Values**: a valid state name 
              type: string
            BankBranchCode:
              description: |2-
                 The branch code of the bank used for direct debit. Use this field for direct debit payment methods.

                **Character limit**: 10 **Values**:  string of 10 characters or fewer 
              type: string
            BankCheckDigit:
              description: |-
                The check digit in the international bank account number, which confirms the validity of the account. Use this field for direct debit payment methods.

                **Character limit**: 4 **Values**:  string of 4 characters or fewer 
              type: string
            BankTransferType:
              description: |
                The type of direct debit transfer. The value of this field is dependent on the country of the user. This field is only required if the `Type` field is set to `BankTransfer`.

                 **Values**: 
                   
                   - `SEPA`

                   - `AutomatischIncasso` (NL)

                   - `LastschriftDE` (Germany)

                   - `LastschriftAT` (Austria)

                   - `DemandeDePrelevement` (FR)

                   - `DirectDebitUK` (UK)

                   - `Domicil` (Belgium)

                   - `LastschriftCH` (CH)

                   - `RID` (Italy)

                   - `OrdenDeDomiciliacion` (Spain)
                   - `Autogiro` (Sweden)
                   - `Betalingsservice` (Denmark)
              maxLength: 20
              type: string
            BusinessIdentificationCode:
              description: |2-
                 The business identification code for Swiss direct payment methods that use the Global Collect payment gateway. Use this field only for direct debit payments in Switzerland with Global Collect.

                **Character limit**: 11 **Values**: string of 11 characters or fewer 
              type: string
            City:
              description: |2-
                 The city of the customer's address. Use this field for direct debit payment methods.

                **Character limit**:80 **Values**:  string of 80 characters or fewer 
              type: string
            CompanyName:
              description: |
                The name of the company.

                Zuora does not recommend that you use this field.
              maxLength: 80
              type: string
            Country:
              description: |2-
                 The two-letter country code of the customer's address. Use this field for direct debit payment methods.

                **Character limit**: 2 **Values**: a valid country code 
              type: string
            CreditCardAddress1:
              description: |2-
                 The first line of the card holder's address, which is often a street address or business name. Use this field for credit card and direct debit payment methods.

                **Character limit**: 255 **Values**: a string of 255 characters or fewer 
              type: string
            CreditCardAddress2:
              description: |2-
                 The second line of the card holder's address. Use this field for credit card and direct debit payment methods.

                **Character limit**: 255 **Values**: a string of 255 characters or fewer 
              type: string
            CreditCardCity:
              description: |2-
                 The city of the card holder's address. Use this field for credit card and direct debit payment methods

                **Character limit**: 40 **Values**: a string of 40 characters or fewer 
              type: string
            CreditCardCountry:
              description: " The country of the card holder's address. "
              type: string
            CreditCardExpirationMonth:
              description: |2-
                 The expiration month of the credit card or debit card. Use this field for credit card and direct debit payment methods.

                **Character limit**: 2 **Values**: a two-digit number, 01 - 12 
              format: int32
              type: integer
            CreditCardExpirationYear:
              description: |2-
                 The expiration month of the credit card or debit card. Use this field for credit card and direct debit payment methods.

                **Character limit**: 4 **Values**: a four-digit number 
              format: int32
              type: integer
            CreditCardHolderName:
              description: |2-
                 The full name of the card holder. Use this field for credit card and direct debit payment methods.

                **Character limit**: 50 **Values**: a string of 50 characters or fewer 
              type: string
            CreditCardPostalCode:
              description: |2-
                 The billing address's zip code. This field is required only when you define a debit card or credit card payment.
                **Character limit**: 20 **Values**: a string of 20 characters or fewer 
              type: string
            CreditCardSecurityCode:
              description: |2-
                 The CVV or CVV2 security code. See [How do I control what information Zuora sends over to the Payment Gateway?](https://knowledgecenter.zuora.com/kb/How_do_I_control_information_sent_to_payment_gateways_when_verifying_payment_methods%3F) for more information. To ensure PCI compliance, this value is not stored and cannot be queried.
                **Values**: a valid CVV or CVV2 security code 
              type: string
            CreditCardState:
              description: " The billing address's state. Use this field is if the `CreditCardCountry' value is either Canada or the US. State names must be spelled in full. "
              type: string
            CreditCardType:
              description: |
                The type of the credit card.

                Possible values  include `Visa`, `MasterCard`, `AmericanExpress`, `Discover`, `JCB`, and `Diners`. For more information about credit card types supported by different payment gateways, see [Supported Payment Gateways](https://knowledgecenter.zuora.com/CB_Billing/M_Payment_Gateways/Supported_Payment_Gateways).
              type: string
            DeviceSessionId:
              description: |2-
                 The session ID of the user when the `PaymentMethod` was created or updated. Some gateways use this field for fraud prevention. If this field is passed to Zuora, then Zuora passes this field to supported gateways. Currently only Verifi supports this field.
                **Character limit**: 255 **Values**: 
              type: string
            Email:
              description: |2-
                 An email address for the payment method in addition to the bill to contact email address.
                **Character limit**: 80 **Values**: a string of 80 characters or fewer 
              type: string
            ExistingMandate:
              description: |2-
                 Indicates if the customer has an existing mandate or a new mandate. A mandate is a signed authorization for UK and NL customers. When you are migrating mandates from another system, be sure to set this field correctly. If you indicate that a new mandate is an existing mandate or vice-versa, then transactions fail. This field is used only for the direct debit payment method.
                **Character limit**: 3 **Values**: `Yes`, `No` 
              type: string
            FirstName:
              description: |2-
                 The customer's first name. This field is used only for the direct debit payment method.
                **Character limit**: 30 **Values**: a string of 30 characters or fewer 
              type: string
            IBAN:
              description: |2-
                 The International Bank Account Number. This field is used only for the direct debit payment method.
                **Character limit**: 42 **Values**: a string of 42 characters or fewer 
              type: string
            IPAddress:
              description: |2-
                 The IP address of the user when the payment method was created or updated. Some gateways use this field for fraud prevention. If this field is passed to Zuora, then Zuora passes this field to supported gateways. Currently PayPal, CyberSource, Authorize.Net, Verifi, and WorldPay support this field.
                **Character limit**: 15 **Values**: a string of 15 characters or fewer 
              type: string
            IdentityNumber:
              description: |
                The unique identity number of the customer account. 

                This field is required only if the `BankTransferType` field is set to `Autogiro` or `Betalingsservice`. It is a string of 12 characters for a Swedish identity number, and a string of 10 characters for a Denish identity number.
              type: string
            IsCompany:
              default: false
              description: |
                Whether the customer account is a company.

                Zuora does not recommend that you use this field.
              type: boolean
            LastName:
              description: |2-
                 The customer's last name. This field is used only for the direct debit payment method.
                **Character limit**: 70 **Values**: a string of 70 characters or fewer 
              type: string
            LastTransactionDateTime:
              description: |2-
                 The date of the most recent transaction.
                **Character limit**: 29 **Values**: a valid date and time value 
              format: date-time
              type: string
            MandateCreationDate:
              description: |2-
                 The date when the mandate was created, in `yyyy-mm-dd` format. A mandate is a signed authorization for UK and NL customers. This field is used only for the direct debit payment method.
                **Character limit**: 29 
              format: date
              type: string
            MandateID:
              description: |2-
                 The ID of the mandate. A mandate is a signed authorization for UK and NL customers. This field is used only for the direct debit payment method.
                **Character limit**: 36 **Values**: a string of 36 characters or fewer 
              type: string
            MandateReceived:
              description: |2-
                 Indicates if  the mandate was received. A mandate is a signed authorization for UK and NL customers. This field is used only for the direct debit payment method.
                **Character limit**: 3 **Values**: `Yes`, `No `(case-sensitive) 
              type: string
            MandateUpdateDate:
              description: |2-
                 The date when the mandate was last updated, in `yyyy-mm-dd` format. A mandate is a signed authorization for UK and NL customers. This field is used only for the direct debit payment method.
                **Character limit**: 29 
              format: date
              type: string
            MaxConsecutivePaymentFailures:
              description: |2-
                 Specifies the number of allowable consecutive failures Zuora attempts with the payment method before stopping.
                **Values**: a valid number 
              type: integer
            NumConsecutiveFailures:
              description: |
                The number of consecutive failed payments for this payment method. It is reset to `0` upon successful payment. 
              maximum: 100
              minimum: 0
              type: integer
            PaymentMethodStatus:
              description: |2-
                 This field is used to indicate the status of the payment method created within an account. It is set to `Active` on creation.
                **Character limit**: 6 **Values**: `Active` or `Closed` 
              type: string
            PaymentRetryWindow:
              description: |2-
                 The retry interval setting, which prevents making a payment attempt if the last failed attempt was within the last specified number of hours. This field is required if the `UseDefaultRetryRule` field value is set to `false`.
                **Character limit**: 4 **Values**: a whole number between 1 and 1000, exclusive 
              type: integer
            Phone:
              description: |2-
                 The phone number that the account holder registered with the bank. This field is used for credit card validation when passing to a gateway.
                **Character limit**: 40 **Values**: a string of 40 characters or fewer 
              type: string
            PostalCode:
              description: |2-
                 The zip code of the customer's address. This field is used only for the direct debit payment method.
                **Character limit**: 20 **Values**: a string of 20 characters or fewer 
              type: string
            SecondTokenId:
              description: |-
                A gateway unique identifier that replaces sensitive payment method data. `SecondTokenId` is conditionally required only when `TokenId` is being used to represent a gateway customer profile. `TokenID` is being used to represent a gateway customer profile. `SecondTokenId` is used in the CC Reference Transaction payment method.
                **Character limit**: 64 **Values**: a string of 64 characters or fewer 
              type: string
            State:
              description: |2-
                 The state of the customer's address. This field is used only for the direct debit payment method.
                **Character limit**: 70 **Values**: a string of 70 characters or fewer 
              type: string
            StreetName:
              description: |2-
                 The street name of the customer's address. This field is used only for the direct debit payment method.
                **Character limit**: 100 **Values**: a string of 100 characters or fewer 
              type: string
            StreetNumber:
              description: |2-
                 The street number of the customer's address. This field is used only for the direct debit payment method.
                **Character limit**: 30 **Values**: a string of 30 characters or fewer 
              type: string
            UseDefaultRetryRule:
              description: |2-
                 Determines whether to use the default retry rules configured in the Zuora Payments settings. Set this to `true` to use the default retry rules. Set this to `false` to set the specific rules for this payment method. If you set this value to `false`, then the fields, `PaymentRetryWindow` and `MaxConsecutivePaymentFailures`, are required.
                **Character limit**: 5 **Values**: `true` or `false` 
              type: boolean
          type: object
        - $ref: "#/components/schemas/PaymentMethodObjectCustomFields"
      example:
        CreditCardAddress1: 312 2nd Ave W_new
        Id: 2c93808457d787030157e02fced332a2
      required:
        - UseDefaultRetryRule
    ProxyModifyProduct:
      allOf:
        - properties:
            AllowFeatureChanges:
              description: |2-
                 Controls whether to allow your users to add or remove features while creating or amending a subscription.
                **Character** **limit**: n/a
                **Values**: true, false (default) 
              type: boolean
            Category:
              description: |2
                 Category of the product. Used by Zuora Quotes Guided Product Selector.
                **Character** **limit**: 100
                **Values**: One of the following:

                - Base Products
                - Add On Services
                - Miscellaneous Products
              type: string
            Description:
              description: " A descriptionof the product. **Character limit**: 500 **Values**: a string of 500 characters or fewer "
              type: string
            EffectiveEndDate:
              description: |
                The date when the product expires and can't be subscribed to anymore, in `yyyy-mm-dd` format.
              format: date
              type: string
            EffectiveStartDate:
              description: |
                The date when the product becomes available and can be subscribed to, in `yyyy-mm-dd` format.
              format: date
              type: string
            Name:
              description: "The name of the product. This information is displayed in the product catalog pages in the web-based UI. **Character limit**: 100 **Values**: a string of 100 characters or fewer "
              type: string
            SKU:
              description: |
                The unique SKU for the product. **Character limit**: 50 **Values**: one of the following:

                - leave null for automatic generated
                - an alphanumeric string of 50 characters or fewer
              type: string
          type: object
        - $ref: "#/components/schemas/ProductObjectNSFields"
        - $ref: "#/components/schemas/ProductObjectCustomFields"
      example:
        Description: Create product via API_new
        EffectiveEndDate: 2066-10-20
        EffectiveStartDate: 1966-10-20
        Id: 2c93808457d787030157e02e7be22210
        Name: P_1476934925293_new
        SKU: API-SKU1476934925293
    ProxyModifyProductRatePlan:
      allOf:
        - properties:
            ActiveCurrencies:
              description: |
                A list of 3-letter currency codes representing active currencies for the product rate plan. Use a comma to separate each currency code.

                If the request body contains this field, the value of this field must contain the desired list of active currencies. The new list can never have more than four differences from the existing list.

                This field cannot be used to modify the status of more than four currencies in a single request. For example, in a single request, you can only activate four currencies, or deactivate four currencies, or activate two and deactivate two. Making more than four changes to currencies always requires more than one call.

                When specifying this field in the update request, you must provide the full list of active currencies you want, not just incremental changes. For each active currency update, provide the following currencies in the list:

                Current active currencies + at most four changes (additions or deletions)
              items:
                type: string
              type: array
            Description:
              description: "A description of the product rate plan. **Character limit**: 500 **Values**: a string of 500 characters or fewer "
              type: string
            EffectiveEndDate:
              description: |2-
                 The date when the product rate plan expires and can't be subscribed to, in `yyyy-mm-dd` format.
                **Character limit**: 29 
              format: date
              type: string
            EffectiveStartDate:
              description: |2-
                 The date when the product rate plan becomes available and can be subscribed to, in `yyyy-mm-dd` format.
                **Character limit**: 29 
              format: date
              type: string
            Name:
              description: "The name of the product rate plan. The name doesn't have to be unique in a Product Catalog, but the name has to be unique within a product. **Character limit**: 100 **Values**: a string of 100 characters or fewer "
              type: string
            ProductId:
              description: "The ID of the product that contains the product rate plan. **Character limit**: 32 **Values**: a string of 32 characters or fewer "
              type: string
          type: object
        - $ref: "#/components/schemas/ProductRatePlanObjectNSFields"
        - $ref: "#/components/schemas/ProductRatePlanObjectCustomFields"
      example:
        Id: 2c93808457d787030157e02da0d91852
        Name: ProductRatePlan1476934869186_new
    ProxyModifyProductRatePlanCharge:
      allOf:
        - properties:
            AccountingCode:
              description: "The accounting code for the charge. Accounting codes group transactions that contain similar accounting attributes. **Character limit**: 100 **Values**: an active accounting code in your Zuora Chart of Accounts "
              type: string
            ApplyDiscountTo:
              description: |
                Specifies the type of charges that you want a specific discount to apply to. All field values are case sensitive: note that these values are in all-caps. **Character limit**: 21 **Values**: one of the following:

                - `ONETIME (1)`
                - `RECURRING (2)`
                - `USAGE (4)`
                - `ONETIMERECURRING (3)`
                - `ONETIMEUSAGE (5)`
                - `RECURRINGUSAGE (6)`
                - `ONETIMERECURRINGUSAGE (7)`
              type: string
            BillCycleDay:
              description: |2-
                 Sets the bill cycle day (BCD) for the charge. The BCD determines which day of the month customer is billed. The BCD value in the account can override the BCD in this object.
                **Character limit**: 2 **Values**: a valid BCD integer, 1 - 31 
              format: int32
              type: integer
            BillCycleType:
              description: |2
                 Specifies how to determine the billing day for the charge. **Character limit**: 20 **Values**: one of the following:

                - `DefaultFromCustomer`
                - `SpecificDayofMonth:`
                - `SubscriptionStartDay`
                - `ChargeTriggerDay`
                - `SpecificDayofWeek`
                **Note**:

                - If you set this field to `SpecificDayofMonth`, you must specify which day of the month as the billing day for the charge in the BillCycleDay field.
                - If you set this field to `SpecificDayofWeek`, you must specify which day of the week as the billing day for the charge in the WeeklyBillCycleDay field.
              type: string
            BillingPeriod:
              description: |2-
                 The billing period for the charge. The start day of the billing period is also called the bill cycle day (BCD).
                **Character limit**: 15 **Values**: one of the following

                - `Month`
                - `Quarter`
                - `Annual`
                - `Semi-Annual`
                - `Specific Months`
                - `Subscription Term` (This value is in **Limited Availability**.)
                - `Week`
                - `Specific Weeks`
                **Note**: Specify the number of months or weeks in the SpecificBillingPeriod field if you set this field to `Specific Months` or `Specific Weeks`. 
              type: string
            BillingPeriodAlignment:
              description: |2
                 Aligns charges within the same subscription if multiple charges begin on different dates.
                **Character limit**: 24 **Values**: one of the following:

                - `AlignToCharge`
                - `AlignToSubscriptionStart`
                - `AlignToTermStart`
              type: string
            BillingTiming:
              description: |2+
                 The billing timing for the charge. You can choose to bill in advance or in arrears for recurring charge types. This field is not used in one-time or usage based charge types.
                **Character limit**: **Values**: one of the following:

                - `In Advance`
                - `In Arrears`

                This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).

              type: string
            ChargeModel:
              description: |2+
                 Determines how to calculate charges. Charge models must be individually activated in Zuora Billing administration.
                **Character limit**: 27 **Values**: one of the following:

                - `Discount-Fixed Amount`
                - `Discount-Percentage`
                - `Flat Fee Pricing`
                - `Per Unit Pricing`
                - `Overage Pricing`
                - `Tiered Pricing`
                - `Tiered with Overage Pricing`
                - `Volume Pricing`
                - `MultiAttributePricing` (available only if you have the Multi-Attribute Pricing charge model enabled. The charge model is available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information.)
                - `PreratedPerUnit` (available only if you have the Pre-rated Per Unit Pricing charge model enabled. The charge model is available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information.)
                - `PreratedPricing` (available only if you have the Pre-rated Pricing charge model enabled. The charge model is available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information.)
                - `HighWatermarkVolumePricing` (available only if you have the High Water Mark Volume Pricing charge model enabled. The charge model is available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information.)
                - `HighWatermarkTieredPricing` (available only if you have the High Water Mark Tiered Pricing charge model enabled. The charge model is available for customers with Enterprise and Nine editions by default. If you are a Growth customer, see [Zuora Editions](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/C_Zuora_Editions) for pricing information.)

              type: string
            ChargeModelConfiguration:
              $ref: "#/components/schemas/ProxyCreateOrModifyProductRatePlanChargeChargeModelConfiguration"
            DefaultQuantity:
              description: |2-
                 The default quantity of units, such as the number of authors in a hosted wiki service. This field is required if you use a per-unit pricing model.
                **Character limit**: 16 **Values**: a valid quantity value 
              format: double
              type: number
            DeferredRevenueAccount:
              description: |2+
                 The name of the deferred revenue account for this charge.
                **Character limit**: 100 **Values**: an active accounting code in your Zuora Chart of Accounts
                This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).

              type: string
            Description:
              description: "A description of the charge. **Character limit**: 500 **Values**: a string of 500 characters or fewer "
              type: string
            DiscountLevel:
              description: |2
                 Specifies if the discount applies to just the product rate plan, the entire subscription, or to any activity in the account.
                **Character limit**: 12 **Values**: one of the following:

                - `rateplan`
                - `subscription`, `account`
              type: string
            EndDateCondition:
              description: |2-
                 Defines when the charge ends after the charge trigger date.
                **Values**: one of the following:

                - `SubscriptionEnd`: The charge ends on the subscription end date after a specified period based on the trigger date of the charge. This is the default value.
                - `FixedPeriod`: The charge ends after a specified period based on the trigger date of the charge. If you set this field to `FixedPeriod`, you must specify the length of the period and a period type by defining the `UpToPeriods` and `UpToPeriodsType` fields.
                **Note**: If the subscription ends before the charge end date, the charge ends when the subscription ends. But if the subscription end date is subsequently changed through a Renewal, or Terms and Conditions amendment, the charge will end on the charge end date. 
              type: string
            IncludedUnits:
              description: "Specifies the number of units in the base set of units. **Character limit**: 16 **Values**: a positive decimal value "
              format: double
              type: number
            LegacyRevenueReporting:
              description: ""
              type: boolean
            ListPriceBase:
              description: |
                The list price base for the product rate plan charge. **Values**: one of the following:

                - `Per Month`
                - `Per Billing Period`
                - `Per Week`
              type: string
            MaxQuantity:
              description: |2-
                 Specifies the maximum number of units for this charge. Use this field and the `MinQuantity` field to create a range of units allowed in a product rate plan charge.
                **Character limit**: 16 **Values**: a positive decimal value 
              format: double
              type: number
            MinQuantity:
              description: "Specifies the minimum number of units for this charge. Use this field and the `MaxQuantity` field to create a range of units allowed in a product rate plan charge. **Character limit**: 16 **Values**: a positive decimal value "
              format: double
              type: number
            Name:
              description: "The name of the product rate plan charge. **Character limit**: 100 **Values**: a string of 100 characters or fewer "
              type: string
            NumberOfPeriod:
              description: "Specifies the number of periods to use when calculating charges in an overage smoothing charge model. **Character limit**: **Values**: a positive whole number "
              format: int64
              type: integer
            OverageCalculationOption:
              description: |
                Determines when to calculate overage charges. If the value of the SmoothingMode field is not specified, the value of this field is ignored. **Character limit**: 20 **Values**: one of the following:

                - `EndOfSmoothingPeriod`: This option is used by default. The overage is charged at the end of the smoothing period.
                - `PerBillingPeriod`: The overage is charged on-demand rather than waiting until the end of the smoothing period.
              type: string
            OverageUnusedUnitsCreditOption:
              description: |2
                 Determines whether to credit the customer with unused units of usage.
                **Character limit**: 20 **Values**: one of the following:

                - `NoCredit`
                - `CreditBySpecificRate`
              type: string
            PriceChangeOption:
              description: |2
                 Applies an automatic price change when a termed subscription is renewed.
                **Character limit**: **Values**: one of the following:

                - `NoChange` (default)
                - `SpecificPercentageValue`
                - `UseLatestProductCatalogPricing`
              type: string
            PriceIncreaseOption:
              description: |
                Applies an automatic price change when a termed subscription is renewed.
              enum:
                - FromTenantPercentageValue
                - SpecificPercentageValue
              type: string
            PriceIncreasePercentage:
              description: |2-
                 Specifies the percentage to increase or decrease the price of a termed subscription's renewal. Use this field if you set the value to `SpecificPercentageValue`.
                **Character limit**: 16 **Values**: a decimal value between -100 and 100 
              format: double
              type: number
            ProductRatePlanChargeTierData:
              $ref: "#/components/schemas/ProxyCreateOrModifyProductRatePlanChargeTierData"
            ProductRatePlanId:
              description: |2-
                 The ID of the product rate plan associated with this product rate plan charge.
                **Character limit**: 32 **Values**: a valid product rate plan ID 
              type: string
            RatingGroup:
              description: |
                Specifies a rating group based on which usage records are rated.

                Possible values:

                - `ByBillingPeriod` (default): The rating is based on all the usages in a billing period.
                - `ByUsageStartDate`: The rating is based on all the usages on the same usage start date. 
                - `ByUsageRecord`: The rating is based on each usage record.
                - `ByUsageUpload`: The rating is based on all the  usages in a uploaded usage file (`.xls` or `.csv`).
                - `ByGroupId`: The rating is based on all the usages in a custom group.

                **Note:** 
                - The `ByBillingPeriod` value can be applied for all charge models. 
                - The `ByUsageStartDate`, `ByUsageRecord`, and `ByUsageUpload` values can only be applied for per unit, volume pricing, and tiered pricing charge models. 
                - The `ByGroupId` value is only available if you have the Active Rating feature enabled.
                - Use this field only for Usage charges. One-Time Charges and Recurring Charges return `NULL`.
              type: string
            RecognizedRevenueAccount:
              description: |2+
                 The name of the recognized revenue account for this charge.

                - Required when the Allow Blank Accounting Code setting is No.
                - Optional when the Allow Blank Accounting Code setting is Yes.

                **Character limit**: 100 **Values**: an active accounting code in your Zuora Chart of Accounts
                This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).

              type: string
            RevRecCode:
              description: "Associates this product rate plan charge with a specific revenue recognition code. **Character limit**: 70 **Values**: a valid revenue recognition code "
              type: string
            RevRecTriggerCondition:
              description: |2
                 Specifies when revenue recognition begins.
                **Character limit**: 22 **Values**: one of the following:

                - `ContractEffectiveDate`
                - `ServiceActivationDate`
                - `CustomerAcceptanceDate`
              type: string
            RevenueRecognitionRuleName:
              description: |
                Determines when to recognize the revenue for this charge. **Character limit**: 25 **Values**: one of the following:

                - `Recognize upon invoicing`
                - `Recognize daily over time`
              type: string
            SmoothingModel:
              description: |2
                 Specifies the smoothing model for an overage smoothing charge model.
                **Character limit**: 22 **Values**: one of the following:

                - `RollingWindow`
                - `Rollover`
              type: string
            SpecificBillingPeriod:
              description: |2-
                 Customizes the number of months or weeks for the charges billing period. This field is required if you set the value of the BillingPeriod field to `Specific Months` or `Specific Weeks`.
                **Values**: a positive integer 
              format: int64
              type: integer
            TaxCode:
              description: |2-
                 Specifies the tax code for taxation rules. Required when the Taxable field is set to `True`.

                **Character limit**: 64

                **Values**: a valid tax code

                **Note**: This value affects the tax calculation of rate plan charges that come from the `ProductRatePlanCharge`. 
              type: string
            TaxMode:
              description: |2-
                 Determines how to define taxation for the charge. Required when the Taxable field is set to `True`.

                **Character limit**: 12

                **Values**: one of the following:

                - `TaxExclusive`
                - `TaxInclusive`

                **Note**: This value affects the tax calculation of rate plan charges that come from the `ProductRatePlanCharge`. 
              type: string
            Taxable:
              description: |2-
                 Determines whether the charge is taxable. When set to `True`, the TaxMode and TaxCode fields are required when creating or updating th ProductRatePlanCharge object.

                **Character limit**: 5

                **Values**: `True`, `False`

                **Note**: This value affects the tax calculation of rate plan charges that come from the `ProductRatePlanCharge`. 
              type: boolean
            TriggerEvent:
              description: |2
                 Specifies when to start billing the customer for the charge.
                **Character limit**: 18 **Values**: one of the following:

                - `ContractEffective` is the date when the subscription's contract goes into effect and the charge is ready to be billed.
                - `ServiceActivation` is the date when the services or products for a subscription have been activated and the customers have access.
                - `CustomerAcceptance` is when the customer accepts the services or products for a subscription.
              type: string
            UOM:
              description: |2
                 Specifies the units to measure usage.
                **Character limit**: 25 **Values**: a configured unit of measure **Note**: You must specify this field when creating the following charge models:

                - Per Unit Pricing
                - Volume Pricing
                - Overage Pricing
                - Tiered Pricing
                - Tiered with Overage Pricing
              type: string
            UpToPeriods:
              description: |2
                 Specifies the length of the period during which the charge is active. If this period ends before the subscription ends, the charge ends when this period ends.
                **Character limit**: 5 **Values**: a whole number between 0 and 65535, exclusive **Note**:

                - You must use this field together with the `UpToPeriodsType` field to specify the time period. This field is applicable only when the `EndDateCondition` field is set to `FixedPeriod`.
                - If the subscription end date is subsequently changed through a Renewal, or Terms and Conditions amendment, the charge end date will change accordingly up to the original period end.
              format: int64
              type: integer
            UpToPeriodsType:
              description: |2
                 The period type used to define when the charge ends.
                **Character limit**: -- **Values**: one of the following:

                - `Billing Periods` (default)
                - `Days`
                - `Weeks`
                - `Months`
                - `Years`

                **Note**:

                - You must use this field together with the `UpToPeriods` field to specify the time period.
                - This field is applicable only when the `EndDateCondition` field is set to `FixedPeriod`.
              type: string
            UsageRecordRatingOption:
              default: EndOfBillingPeriod
              description: |
                Determines how Zuora processes usage records for per-unit usage charges. 
              enum:
                - EndOfBillingPeriod
                - OnDemand
              type: string
            UseDiscountSpecificAccountingCode:
              description: "Determines whether to define a new accounting code for the new discount charge. **Character limit**: 5 **Values**: `True`, `False` "
              type: boolean
            UseTenantDefaultForPriceChange:
              description: " Applies the tenant-level percentage uplift value for an automatic price change to a termed subscription's renewal. **Character limit**: 5 **Values**: `true`, `false` "
              type: boolean
            WeeklyBillCycleDay:
              description: |2
                 Specifies which day of the week as the bill cycle day (BCD) for the charge.
                This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).

                **Values**: one of the following:

                - `Sunday`
                - `Monday`
                - `Tuesday`
                - `Wednesday`
                - `Thursday`
                - `Friday`
                - `Saturday`
              type: string
          type: object
        - $ref: "#/components/schemas/ProductRatePlanChargeObjectNSFields"
        - $ref: "#/components/schemas/ProductRatePlanChargeObjectCustomFields"
      example:
        AccountingCode: Deferred Revenue
        BillCycleType: DefaultFromCustomer
        BillingPeriod: Month
        ChargeModel: Flat fee Pricing
        DeferredRevenueAccount: Deferred Revenue
        Name: Recurring flat fee
        ProductRatePlanChargeTierData:
          ProductRatePlanChargeTier:
            - Currency: USD
              Price: 10
        ProductRatePlanId: 2c92c0f8628e007901628f1dc06a453d
        RecognizedRevenueAccount: Accounts Receivable
        TriggerEvent: ContractEffective
        UOM: each
        UseDiscountSpecificAccountingCode: false
    ProxyModifyProductRatePlanChargeTier:
      example:
        Price: 1.99
      properties:
        Price:
          description: |
            The price of the tier if the charge is a flat fee, or the price of each unit in the tier if the charge model is tiered pricing.
          format: double
          type: number
      type: object
    ProxyModifyRatePlanCharge:
      allOf:
        - properties:
            BillingTiming:
              description: |2+
                 The billing timing for the charge. You can choose to bill in advance or in arrears for recurring charge types. This field is not used in one-time or usage based charge types.
                **Character limit**: **Values**: one of the following:

                - `In Advance`
                - `In Arrears`
                **Note:** You can override the value inherited from the Product Rate Plan Charge when a subscription has a recurring charge type.
                This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).

              type: string
            DiscountAmount:
              description: |
                Specifies the amount of a fixed-amount discount. You can provide a value for this field if the `ChargeModel` field value is `Discount-Fixed Amount`. **Character limit**: 16 **Values**: A valid currency amount
              format: decimal
              type: number
            DiscountPercentage:
              description: |
                The percentage of discount for a percentage discount. Use this field if the value for `ProductRatePlanCharge.ChargeModel` is `Discount-Percentage` and you want to override the value in `ProductRatePlanChargeTier.DiscountPercentage`. **Character limit**: 16 **Values**: a decimal value between -100 and 100, exclusive
              format: decimal
              type: number
            EndDateCondition:
              description: |2-
                 Defines when the charge ends after the charge trigger date. This field can be updated when **Status** is `Draft`.
                **Values**: one of the following:

                - `SubscriptionEnd`: The charge ends on the subscription end date after the charge trigger date. This is the default value.
                - `FixedPeriod`: The charge ends after a specified period based on the trigger date of the charge. If you set this field to `FixedPeriod`, you must specify the length of the period and a period type by defining the `UpToPeriods` and `UpToPeriodsType` fields.
                - `SpecificEndDate`: The specific date on which the charge ends. If you set this field to `SpecificEndDate`, you must specify the specific date by defining the `SpecificEndDate` field.

                **Note**: If the subscription ends before the charge end date, the charge ends when the subscription ends. But if the subscription end date is subsequently changed through a Renewal, or Terms and Conditions amendment, the charge will end on the charge end date. 
              type: string
            ListPriceBase:
              description: |
                The list price base for the product rate plan charge. **Values**: one of the following:

                - `Per Month`
                - `Per Billing Period`
                - `Per Week`
              type: string
            PriceChangeOption:
              description: |2
                 Applies an automatic price change when a termed subscription is renewed.
                **Character limit**: **Values**: one of the following:

                - `NoChange` (default)
                - `SpecificPercentageValue`
                - `UseLatestProductCatalogPricing`
              type: string
            PriceIncreasePercentage:
              description: |2-
                 Specifies the percentage to increase or decrease the price of renewed subscriptions.
                **Character limit**: 16 **Values**: a decimal value between -100 and 100 
              format: double
              type: number
            RatingGroup:
              description: |
                Specifies a rating group based on which usage records are rated. 

                * `ByBillingPeriod` (default) - The rating is based on all the usages in a billing period. 
                * `ByUsageStartDate` - The rating is based on all the usages on the same usage start date.
                * `ByUsageRecord` - The rating is based on each usage record.
                * `ByUsageUpload` - The rating is based on all the usages in a uploaded usage file (`.xls` or `.csv`). If you import a mass usage in a single upload, which contains multiple usage files in `.xls` or `.csv` format, usage records are grouped for each usage file.
                * `ByGroupId` - The rating is based on all the usages in the same custom group. 


                **Note:** 
                - The `ByBillingPeriod` value can be applied for all charge models. 
                - The `ByUsageStartDate`, `ByUsageRecord`, and `ByUsageUpload` values can only be applied for per unit, volume pricing, and tiered pricing charge models. 
                - The `ByGroupId` value is only available if you have the Active Rating feature enabled.
                - Use this field only for Usage charges. One-Time Charges and Recurring Charges return `NULL`.


                See [Usage Rating by Group](https://knowledgecenter.zuora.com/CB_Billing/J_Billing_Operations/Usage/Usage_Rating_by_Group) for more information.
              enum:
                - ByBillingPeriod
                - ByUsageStartDate
                - ByUsageRecord
                - ByUsageUpload
                - ByGroupId
              type: string
            RevRecCode:
              description: |2-
                 Associates this product rate plan charge with a specific revenue recognition code.

                **Character limit**: 70

                **Values**: inherited from `ProductRatePlanCharge.RevRecCode` or a valid revenue recognition code

                **Note**: Unless overridden, this value changes if `ProductRatePlanCharge.RevRecCode` is updated. The values of `UpdatedById` and `UpdatedDate` for the `RatePlanCharge` do not change when `ProductRatePlanCharge.RevRecCode` is updated. 
              type: string
            RevRecTriggerCondition:
              description: |2-
                 Specifies when revenue recognition begins.

                **Character limit**: 22

                **Values**: inherited from `ProductRatePlanCharge.RevRecTriggerCondition` or one of the following:

                -  `ContractEffectiveDate`

                -  `ServiceActivationDate`

                -  `CustomerAcceptanceDate`

                Note: Unless overridden, this value changes if `ProductRatePlanCharge.RevRecTriggerCondition` is updated. The values of `UpdatedById` and `UpdatedDate` for the `RatePlanCharge` do not change when `ProductRatePlanCharge.RevRecTriggerCondition` is updated. 
              type: string
            RevenueRecognitionRuleName:
              description: |2-
                 Specifies the Revenue Recognition Rule that you want the Rate Plan Charge to use. This field can be updated when **Status** is `Draft`. By default, the Revenue Recognition Rule is inherited from the Product Rate Plan Charge. For Amend calls, you can use this field only for NewProduct amendments. For Update calls, you can use this field only to update subscriptions in draft status. Note that if you use this field to specify a Revenue Recognition Rule for the Rate Plan Charge, the rule will remain as specified even if you later change the rule used by the corresponding Product Rate Plan Charge.

                **Character limit**: n/a

                **Values**: inherited from `ProductRatePlanCharge.RevenueRecognitionRuleName` or the name of an active Revenue Recognition Rule

                **Note**: Unless overridden, this value changes if `ProductRatePlanCharge.RevenueRecognitionRuleName` is updated. The values of `UpdatedById` and `UpdatedDate` for the `RatePlanCharge` do not change when `ProductRatePlanCharge.RevenueRecognitionRuleName` is updated. 
              type: string
            SpecificEndDate:
              description: |2
                 The specific date on which the charge ends, in `yyyy-mm-dd` format.
                **Character limit**: 29 **Note**:

                - This field is only applicable when the `EndDateCondition` field is set to `SpecificEndDate`.
                - If the subscription ends before the specific end date, the charge ends when the subscription ends. But if the subscription end date is subsequently changed through a Renewal, or Terms and Conditions amendment, the charge will end on the specific end date.
              format: date
              type: string
            TriggerDate:
              description: |2-
                 The date when the charge becomes effective and billing begins, in `yyyy-mm-dd` format. This field is required if the `TriggerEvent` field value is `SpecificDate`.
                **Character limit**: 29 
              format: date
              type: string
            TriggerEvent:
              description: |
                Specifies when to start billing the customer for the charge.

                **Note:** This field can be passed through the Subscribe and Amend calls and will override the default value set on the Product Rate Plan Charge.

                **Note:** When the [Update rate plan charge trigger condition?](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Billing_Settings/Define_Default_Subscription_Settings) setting is set to `Yes`, this field can be passed through the update() call and override the previous value. You can use this feature to directly update the trigger condition of a rate plan charge without creating an order action (or amendment). 

                **Character limit**: 18
                **Values**: inherited from
                `ProductRatePlanCharge.TriggerEvent` and can be one of the following values:


                 - `ContractEffective` is the date when the subscription's contract goes into effect and the charge is ready to be billed.

                 - `ServiceActivation` is when the services or products for a subscription have been activated and the customers have access.

                 - `CustomerAcceptance` is when the customer accepts the services or products for a subscription.

                 - `SpecificDate` is valid only on the RatePlanCharge. When this value is specified, use the `TriggerDate` field to set the specific date.
              type: string
            UpToPeriodsType:
              description: |2
                 The period type used to define when the charge ends. This field can be updated when **Status** is `Draft`. **Values**: one of the following:

                - `Billing Periods` (default)
                - `Days`
                - `Weeks`
                - `Months`
                - `Years`
                **Note**:

                - You must use this field together with the `UpToPeriods` field to specify the time period.
                - This field is only applicable only when the `EndDateCondition` field is set to `FixedPeriod`.
              type: string
            WeeklyBillCycleDay:
              description: |2
                 Specifies which day of the week as the bill cycle day (BCD) for the charge.
                This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).

                **Values**: one of the following:

                - `Sunday`
                - `Monday`
                - `Tuesday`
                - `Wednesday`
                - `Thursday`
                - `Friday`
                - `Saturday`
              type: string
          type: object
        - $ref: "#/components/schemas/RatePlanChargeObjectCustomFields"
      example:
        PriceIncreasePercentage: 10
    ProxyModifyRefund:
      allOf:
        - properties:
            ReasonCode:
              description: |2-
                 A code identifying the reason for the transaction. Must be an existing reason code or empty. If you do not specify a value, Zuora uses the default reason code.
                **Character limit**: 32 **V****alues**: a valid reason code 
              type: string
            Status:
              description: |2
                 The status of the refund.
                **Character limit**: 10 **Values**: automatically generated:

                - `Canceled`
                - `Error`
                - `Processed`
                - `Processing`
              type: string
            TransferredToAccounting:
              description: |2
                 Specifies whether or not the object has been transferred to an external accounting system. Use this field for integrations with accounting systems such as NetSuite.
                **Character limit**: 10 **Values**: automatically generated:

                - `Processing`
                - `Yes`
                - `Error`
                - `Ignore`
              type: string
          type: object
        - $ref: "#/components/schemas/RefundObjectNSFields"
        - $ref: "#/components/schemas/RefundObjectCustomFields"
      example:
        Id: 2c93808457d787030157e03198c84918
        Status: Canceled
    ProxyModifySubscription:
      allOf:
        - properties:
            AccountId:
              description: " This field can be updated when **Status** is `Draft`. The ID of a valid account ID. "
              type: string
            AutoRenew:
              description: |2-
                 This field can be updated when **Status** is `Draft`. Indicates if the subscription automatically renews at the end of the term.
                **Values**: `true`, `false` 
              type: boolean
            CancelledDate:
              description: |2-
                 The date of the Amendment object.
                **Values**: inherited from `Amendment.EffectiveDate` 
              format: date
              type: string
            ContractAcceptanceDate:
              description: |
                The date when the customer accepts the contract.

                This field can be updated when **Status** is `Pending Acceptance`.

                **Note** : This field is only required in the Subscribe call if the [Require Customer Acceptance of Orders?](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Billing_Settings/Define_Default_Subscription_and_Order_Settings#Require_Customer_Acceptance_of_Orders.3F) setting is set to `Yes`. If this setting is set to `Yes`:

                 * If the `ServiceActivationDate` field is required, you must set this field, `ServiceActivationDate`, and `ContractEffectiveDate` fields in the Subscribe call to activate a subscription.
                 * If the `ServiceActivationDate` field is not required, you must set both this field and the `ContractEffectiveDate` field in the Subscribe call to activate a subscription. If you only set a valid date in the `ContractEffectiveDate` field, the Subscribe call still returns success, but the subscription is in `Pending Acceptance` status.

                This field can also be updated when the subscription is still on version one (has not been amended before) and the [Allow update Subscription trigger dates?](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Billing_Settings/Define_Default_Subscription_and_Order_Settings#Allow_update_Subscription_trigger_dates.3F) setting in Billing Settings is set to `Yes`. 
              format: date
              type: string
            ContractEffectiveDate:
              description: |
                The date when the contract takes effect.

                This field can be updated when **Status** is `Draft`.

                **Note**: This field is required in the Subscribe call. If you set the value of this field to null and both the ServiceActivationDate and ContractAcceptanceDate fields are not required, the Subscribe call still returns success, but the new subscription is in `DRAFT` status. To activate the subscription, you must set a valid date to this field.

                This field can also be updated when the subscription is still on version one (has not been amended before) and the [Allow update Subscription trigger dates?](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Billing_Settings/Define_Default_Subscription_and_Order_Settings#Allow_update_Subscription_trigger_dates.3F) setting in Billing Settings is set to "Yes".
              format: date
              type: string
            CurrentTermPeriodType:
              description: |2
                 The period type for the current subscription term. This field is used with the CurrentTerm field to specify the current subscription term.
                **Values**:

                - `Month` (default)
                - `Year`
                - `Day`
                - `Week`
              type: string
            InitialTerm:
              description: |2-
                 The length of the period for the first subscription term. This field can be updated when Status is `Draft`.
                **Required**: If TermType is Termed **Character limit**: 20 **Values**: any valid number. 
              format: int32
              type: integer
            InitialTermPeriodType:
              description: |2
                 The period type for the first subscription term.
                **Values**:

                - `Month` (default)
                - `Year`
                - `Day`
                - `Week`
                **Note**:

                - This field can be updated when Status is `Draft`.
                - This field is used with the InitialTerm field to specify the initial subscription term.
              type: string
            InvoiceOwnerId:
              description: " This field can be updated when **Status** is `Draft`. A valid account ID. "
              type: string
            IsInvoiceSeparate:
              description: |2-
                 Determines if the subscription is invoiced separately. If `TRUE`, then all charges for this subscription are collected into the subscription's own invoice.
                **Values**: `TRUE`, `FALSE `(default) 
              type: boolean
            Name:
              description: |2
                 The unique identifier of the subscription. If you don't specify a value, then Zuora generates a name automatically. Whether auto-generated or manually specified, the subscription name must be unique. Otherwise an error will occur.
                **Character limit**: 100 **Values**: one of the following:

                - leave null to automatically generate
                - a string of 100 characters or fewer
              type: string
            Notes:
              description: |2-
                 Use this field to record comments about the subscription.
                **Character limit**: 500 **Values**: a string of 500 characters or fewer 
              type: string
            RenewalSetting:
              description: |2-
                 This field can be updated when **Status** is `Draft`. Specifies whether a termed subscription will remain termed or change to evergreen when it is renewed.
                **Required**: If TermType is Termed **Values**: `RENEW_WITH_SPECIFIC_TERM `(default), `RENEW_TO_EVERGREEN` 
              type: string
            RenewalTerm:
              description: |2
                 The length of the period for the subscription renewal term. This field can be updated when **Status** is `Draft`. **Required**: If TermType is Termed.
                **Character limit**: 20 **Values**: one of the following:

                - leave null to default to `0`
                - any number
              format: int32
              type: integer
            RenewalTermPeriodType:
              description: |2
                 The period type for the subscription renewal term.
                **Values**:

                - `Month` (default)
                - `Year`
                - `Day`
                - `Week`
                **Note**:

                - This field is used with the RenewalTerm field to specify the subscription renewal term.
                - This field can be updated when Status is `Draft`.
              type: string
            ServiceActivationDate:
              description: |
                The date when the subscription is activated. 

                **Character limit**: 29

                This field can be updated when **Status** is `Pending Activation`.

                **Note**: This field is only required in the Subscribe call if the [Require Service Activation of Orders?](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Billing_Settings/Define_Default_Subscription_and_Order_Settings#Require_Service_Activation_of_Orders.3F) setting is set to `Yes`. If this setting is set to `Yes`:

                 * If the `ContractAcceptanceDate` field is required, you must set this field, `ContractAcceptanceDate`, and `ContractEffectiveDate` fields in the Subscribe call to activate a subscription.
                 * If the `ContractAcceptanceDate` field is not required, you must set both this field and the `ContractEffectiveDate` field in the Subscribe call to activate a subscription. If you only set a valid date in the `ContractEffectiveDate` field, the Subscribe call still returns success, but the subscription is in `Pending Activation` status.

                This field can also be updated when the subscription is still on version one (has not been amended before) and the [Allow update Subscription trigger dates?](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Billing_Settings/Define_Default_Subscription_and_Order_Settings#Allow_update_Subscription_trigger_dates.3F) setting in Billing Settings is set to "Yes". 
              format: date
              type: string
            Status:
              description: |2
                 The status of the subscription.
                **Character limit**: 17 **Values**: automatically generated **Possible values**: one of the following:

                - `Draft`
                - `Pending Activation`
                - `Pending Acceptance`
                - `Active`
                - `Cancelled`
                - `Expired`
                - `Suspended` (This value is in **Limited Availability**.)
              type: string
            TermStartDate:
              description: |2-
                 This field can be updated when **Status** is `Draft`. The date when the subscription term begins. If this is a renewal subscription, then this date is different from the subscription start date.
                **Character limit**: 29 **Version notes**: -- 
              format: date
              type: string
            TermType:
              description: |2-
                 This field can be updated when **Status** is `Draft`. Indicates if a subscription is termed or evergreen.
                **Character limit**: 9 **Values**: `TERMED`, `EVERGREEN` 
              type: string
            Version:
              description: |2-
                 The version number of the subscription.
                **Values**: automatically generated 
              format: int32
              type: integer
          type: object
        - $ref: "#/components/schemas/SubscriptionObjectQTFields"
        - $ref: "#/components/schemas/SubscriptionObjectNSFields"
        - $ref: "#/components/schemas/SubscriptionObjectCustomFields"
      example:
        Name: S_1476934934547_name
        Notes: this is notes_new
    ProxyModifyTaxationItem:
      allOf:
        - properties:
            AccountingCode:
              description: " The Chart of Accounts "
              type: string
            ExemptAmount:
              description: |2-
                 The calculated tax amount excluded due to the exemption.
                **Character limit**: 16 **Values**: a decimal value 
              format: double
              type: number
            Jurisdiction:
              description: |2-
                 The jurisdiction that applies the tax or VAT. This value is typically a state, province, county, or city.
                **Character limit**: 32 **Values**: a string of 32 characterrs or fewer 
              type: string
            LocationCode:
              description: |2-
                 The identifier for the location based on the value of the `TaxCode` field.
                **Character limit**: 32 **Values**: automatically generated 
              type: string
            Name:
              description: |2-
                 The name of the tax rate, such as sales tax or GST. This name is displayed on invoices.
                **Character limit**: 128 **Values**: a string of 128 characters or fewer 
              type: string
            TaxAmount:
              description: |2-
                 The amount of the tax applied to the charge.
                **Character limit**: 16 **Values**: a decimal value 
              format: double
              type: number
            TaxCode:
              description: |2-
                 The tax code identifies which tax rules and tax rates to apply to a specific charge.
                **Character limit**: 32 **Values**: a string of 32 characters or fewer 
              type: string
            TaxCodeDescription:
              description: |2-
                 The description for the tax code.
                **Character limit**: 255 **Values**: a string of 255 characters or fewer 
              type: string
            TaxDate:
              description: |2-
                 The date that the tax is applied to the charge, in `yyyy-mm-dd` format.
                **Character limit**: 29 
              format: date
              type: string
            TaxRate:
              description: |2-
                 The tax rate applied to the charge.
                **Character limit**: 16 **Values**: a valid decimal value 
              format: double
              type: number
            TaxRateDescription:
              description: |2-
                 The description of the tax rate.
                **Character limit**: 255 **Values**: a string of 255 characters or fewer 
              type: string
            TaxRateType:
              description: |2-
                 The type of the tax rate applied to the charge.
                **Character limit**: 10 **Values**: `Percentage`, `FlatFee` 
              type: string
          type: object
        - $ref: "#/components/schemas/TaxationItemObjectCustomFields"
    ProxyModifyUnitOfMeasure:
      properties:
        Active:
          description: |2-
             Indicates if the UOM is available for new product rate plans. The default value is `true`.
            **Character limit**: 5 **Values**: `true`, `false ` 
          type: boolean
        DecimalPlaces:
          description: "The number of digits to the right of the decimal point that you want to measure for the unit. To use whole numbers only, set this value to 0. You can't change this value after this `UOM` is used in any product, subscription, or usage. **Character limit**: 1 **Values**: an integer between 0 and 9, exclusive "
          format: int64
          type: integer
        DisplayedAs:
          description: "The name of the UOM that you want displayed on invoices. The default value is the `UomName` field value. **Character limit**: 50 **Values**: A string of 50 characters or fewer "
          type: string
        RoundingMode:
          description: |2-
             Specifies whether to round the UOM value up or down when the value exceeds the `DecimalPlaces` field value. The default value is `Up`.
            **Character limit**: 4 **Values**: `Up`, `Down` 
          type: string
        UomName:
          description: |2-
             The name of the UOM, such as license or GB. This name is displayed in query results and in the web-based UI labels. If you want a different name to be displayed on invoices, then use the `DisplayedAs` field to provide the invoice label.
            **Character limit**: 50 **Values**: a string of 50 characters or fewer 
          type: string
      type: object
    ProxyModifyUsage:
      allOf:
        - properties:
            EndDateTime:
              description: |2-
                 The end date and time of a range of time when usage is tracked. Use this field for reporting; this field doesn't affect usage calculation.
                **Character limit**: 29 **Values**: a valid date and time value 
              format: date-time
              type: string
            Quantity:
              description: |2-
                 Indicates the number of units used.
                **Character limit**: 16 **Values**: a valid decimal amount equal to or greater than 0 
              format: double
              type: number
            RbeStatus:
              description: |2-
                 Indicates if the rating and billing engine (RBE) processed usage data for an invoice.
                **Character limit**: 9 **Values**: automatically generated to be one of the following values: `Importing`, `Pending`, `Processed` 
              type: string
            StartDateTime:
              description: |2-
                 The start date and time of a range of time when usage is tracked. Zuora uses this field value to determine the usage date. Unlike the `EndDateTime`, the `StartDateTime` field does affect usage calculation.
                **Character limit**: 29 **Values**: a valid date and time value 
              format: date-time
              type: string
            SubmissionDateTime:
              description: |2-
                 The date when usage was submitted.
                **Character limit**: 29 **Values**: automatically generated 
              format: date-time
              type: string
            UOM:
              description: |2-
                 Specifies the units to measure usage. Units of measure are configured in the web-based UI. Your values depend on your configuration in **Billing Settings**.
                **Character limit**: **Values**: a valid unit of measure 
              type: string
          type: object
        - $ref: "#/components/schemas/UsageObjectCustomFields"
    ProxyNoDataResponse:
      properties:
        done:
          description: ""
          type: boolean
        records:
          description: ""
          items:
            type: object
          type: array
        size:
          description: ""
          type: integer
      type: object
    ProxyPostImport:
      properties:
        Id:
          description: |
            The ID of the Import object that was created.
          type: string
        Success:
          description: |
            Indicates whether the call succeeded.
          type: boolean
      type: object
    ProxyUnauthorizedResponse:
      properties:
        message:
          description: |
            Error message.

            If the error message is "Authentication error", ensure that the `Authorization` request header contains valid authentication credentials, then retry the request. See [Authentication](https://www.zuora.com/developer/api-reference/#section/Authentication) for more information.

            If the error message is "Failed to get user info", retry the request.
          type: string
      type: object
    PutBatchInvoiceType:
      example:
        invoices:
          - autoPay: false
            dueDate: 2017-12-16
            id: 2c93808457d787030157e031d86c4c57
            transferredToAccounting: Yes
          - autoPay: false
            dueDate: 2017-12-27
            id: 2c92c8955bd63cc1015bd7c151af02ab
            transferredToAccounting: Yes
          - id: 2c92c8955bd63cc1015bd7c151af02dc
            invoiceDate: 2017-11-27
      properties:
        invoices:
          description: |
            Container for invoice update details.
          items:
            $ref: "#/components/schemas/BatchInvoiceType"
          type: array
      type: object
    PutCreditMemoTaxItemType:
      allOf:
        - properties:
            amount:
              description: |
                The amount of the taxation item in the credit memo item.
              format: double
              type: number
            financeInformation:
              description: |
                Container for the finance information related to the taxation item in the credit memo item.
              properties:
                onAccountAccountingCode:
                  description: |
                    The accounting code that maps to an on account in your accounting system.
                  maxLength: 100
                  minLength: 0
                  type: string
                salesTaxPayableAccountingCode:
                  description: |
                    The accounting code for the sales taxes payable.
                  maxLength: 100
                  minLength: 0
                  type: string
              type: object
            id:
              description: |
                The ID of the taxation item in the credit memo item.
              type: string
            jurisdiction:
              description: |
                The jurisdiction that applies the tax or VAT. This value is typically a state, province, county, or city.
              type: string
            locationCode:
              description: |
                The identifier for the location based on the value of the `taxCode` field.
              type: string
            taxCode:
              description: |
                The tax code identifies which tax rules and tax rates to apply to a specific credit memo.
              type: string
            taxCodeDescription:
              description: |
                The description of the tax code.
              type: string
            taxDate:
              description: |
                The date that the tax is applied to the credit memo, in `yyyy-mm-dd` format.
              format: date
              type: string
            taxExemptAmount:
              description: |
                The amount of taxes or VAT for which the customer has an exemption.
              format: double
              type: number
            taxName:
              description: |
                The name of taxation.
              type: string
            taxRate:
              description: |
                The tax rate applied to the credit memo.
              format: double
              type: number
            taxRateDescription:
              description: |
                The description of the tax rate. 
              type: string
            taxRateType:
              description: |
                The type of the tax rate applied to the credit memo.
              enum:
                - Percentage
                - FlatFee
              type: string
          required:
            - id
          type: object
        - $ref: "#/components/schemas/CreditTaxationItemObjectCustomFields"
      title: taxItems
    PutDebitMemoTaxItemType:
      allOf:
        - properties:
            amount:
              description: |
                The amount of the taxation item in the debit memo item.
              format: double
              type: number
            financeInformation:
              description: |
                Container for the finance information related to the taxation item in the debit memo item.
              properties:
                salesTaxPayableAccountingCode:
                  description: |
                    The accounting code for the sales taxes payable.
                  maxLength: 100
                  minLength: 0
                  type: string
              type: object
            id:
              description: |
                The ID of the taxation item in the debit memo item.
              type: string
            jurisdiction:
              description: |
                The jurisdiction that applies the tax or VAT. This value is typically a state, province, county, or city.
              type: string
            locationCode:
              description: |
                The identifier for the location based on the value of the `taxCode` field.
              type: string
            taxCode:
              description: |
                The tax code identifies which tax rules and tax rates to apply to a specific debit memo.
              type: string
            taxCodeDescription:
              description: |
                The description of the tax code.
              type: string
            taxDate:
              description: |
                The date that the tax is applied to the debit memo, in `yyyy-mm-dd` format.
              format: date
              type: string
            taxExemptAmount:
              description: |
                The amount of taxes or VAT for which the customer has an exemption.
              format: double
              type: number
            taxName:
              description: |
                The name of taxation.
              type: string
            taxRate:
              description: |
                The tax rate applied to the debit memo.
              format: double
              type: number
            taxRateDescription:
              description: |
                The description of the tax rate.
              type: string
            taxRateType:
              description: |
                The type of the tax rate applied to the debit memo.
              enum:
                - Percentage
                - FlatFee
              type: string
          required:
            - id
          type: object
        - $ref: "#/components/schemas/DebitTaxationItemObjectCustomFields"
      title: taxItems
    PutEventTriggerRequest:
      example:
        condition: changeType == 'UPDATE' && Invoice.Status == 'Posted' && Invoice.Status_old != 'Posted' && Invoice.Amount > 5000
        description: Trigger an event when an invoice is posted with amount over 5000
        eventType:
          description: An invoice is posted with amount over 5000
      properties:
        active:
          description: The status of the trigger.
          type: boolean
        condition:
          description: The JEXL expression to be evaluated against object changes. See above for more information and an example.
          maxLength: 5000
          minLength: 1
          type: string
        description:
          description: The description of the trigger.
          maxLength: 1000
          type: string
        eventType:
          description: The type of events to be triggered.
          properties:
            description:
              description: The description for the event type.
              maxLength: 1000
              type: string
            displayName:
              description: The display name for the event type.
              maxLength: 500
              minLength: 1
              type: string
          type: object
      type: object
    PutInvoiceItemType:
      allOf:
        - properties:
            accountingCode:
              description: |
                The accounting code associated with the invoice item.
              type: string
            amount:
              description: |
                The amount of the invoice item. 

                - For tax-inclusive invoice items, the amount indicates the invoice item amount including tax. 
                - For tax-exclusive invoice items, the amount indicates the invoice item amount excluding tax.
              format: number
              type: string
            chargeDate:
              description: |
                The date when the invoice item is charged.
              format: date-time
              type: string
            chargeName:
              description: |
                The name of the charge associated with the invoice item. 

                This field is required if the `productRatePlanChargeId` field is not specified in the request.
              type: string
            deferredRevenueAccountingCode:
              description: |
                The accounting code for the deferred revenue, such as Monthly Recurring Liability.

                **Note:** This field is only available if you have Zuora Finance enabled.
              type: string
            description:
              description: |
                The description of the invoice item.
              type: string
            id:
              description: |
                The unique ID of the invoice item.
              type: string
            itemType:
              description: |
                The type of the invoice item.
              type: string
            purchaseOrderNumber:
              description: |
                The purchase order number associated the invoice item.
              type: string
            quantity:
              description: |
                The number of units for the invoice item.
              format: number
              type: string
            recognizedRevenueAccountingCode:
              description: |
                The accounting code for the recognized revenue, such as Monthly Recurring Charges or Overage Charges.

                **Note:** This field is only available if you have Zuora Finance enabled.
              type: string
            revRecCode:
              description: |
                The revenue recognition code.
              type: string
            revRecTriggerCondition:
              description: |
                The date when revenue recognition is triggered.
              enum:
                - ContractEffectiveDate
                - ServiceActivationDate
                - CustomerAcceptanceDate
              type: string
            revenueRecognitionRuleName:
              description: |
                The name of the revenue recognition rule governing the revenue schedule.

                **Note:** This field is only available if you have Zuora Finance enabled.
              type: string
            serviceEndDate:
              description: |
                The service end date of the invoice item.
              format: date
              type: string
            serviceStartDate:
              description: |
                The service start date of the invoice item.
              format: date
              type: string
            sku:
              description: |
                The SKU of the invoice item.
              type: string
            taxCode:
              description: |
                The tax code identifies which tax rules and tax rates to apply to the invoice item.

                **Note:** This field is only available if you have Taxation enabled.
              type: string
            taxMode:
              description: |
                The tax mode of the invoice item, indicating whether the amount of the invoice item includes tax.

                **Note:** This field is only available if you have Taxation enabled.
              enum:
                - TaxInclusive
                - TaxExclusive
              type: string
            unitPrice:
              description: |
                The per-unit price of the invoice item.
              format: number
              type: string
            uom:
              description: |
                The unit of measure.
              type: string
          type: object
        - $ref: "#/components/schemas/InvoiceItemObjectNSFields"
        - $ref: "#/components/schemas/InvoiceItemObjectCustomFields"
    PutInvoiceResponseType:
      allOf:
        - properties:
            accountId:
              description: |
                The ID of the customer account associated with the invoice.
              type: string
            amount:
              description: |
                The total amount of the invoice.
              format: BigDecimal
              type: number
            autoPay:
              description: |
                Whether invoices are automatically picked up for processing in the corresponding payment run. 
              type: boolean
            balance:
              description: |
                The balance of the invoice.
              format: BigDecimal
              type: number
            cancelledById:
              description: |
                The ID of the Zuora user who cancelled the invoice.
              type: string
            cancelledOn:
              description: |
                The date and time when the invoice was cancelled, in `yyyy-mm-dd hh:mm:ss` format.
              format: date-time
              type: string
            comment:
              description: |
                Comments about the invoice. 
              type: string
            createdById:
              description: |
                The ID of the Zuora user who created the invoice.
              type: string
            createdDate:
              description: |
                The date and time when the invoice was created, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-01 15:31:10.
              format: date-time
              type: string
            creditBalanceAdjustmentAmount:
              description: |
                **Note:** This filed is only available if you have the Credit Balance feature enabled and the Invoice Settlement feature disabled.

                The currency amount of the adjustment applied to the customer's credit balance.
              format: BigDecimal
              type: number
            currency:
              description: |
                A currency defined in the web-based UI administrative settings.
              type: string
            dueDate:
              description: |
                The date by which the payment for this invoice is due. 
              format: date
              type: string
            id:
              description: |
                The unique ID of the invoice.
              type: string
            invoiceDate:
              description: |
                The date on which to generate the invoice.
              format: date
              type: string
            number:
              description: |
                The unique identification number of the invoice.
              type: string
            postedById:
              description: |
                The ID of the Zuora user who posted the invoice.
              type: string
            postedOn:
              description: |
                The date and time when the invoice was posted, in `yyyy-mm-dd hh:mm:ss` format. 
              format: date-time
              type: string
            status:
              description: |
                The status of the invoice.
              enum:
                - Draft
                - Posted
                - Canceled
                - Error
              type: string
            success:
              description: |
                Returns `true` if the request was processed successfully.
              type: boolean
            targetDate:
              description: |
                The target date for the invoice, in `yyyy-mm-dd` format. For example, 2017-07-20. 
              format: date
              type: string
            taxAmount:
              description: |
                The amount of taxation.
              format: BigDecimal
              type: number
            totalTaxExemptAmount:
              description: |
                The total amount of taxes or VAT, for which the customer has an exemption.
              format: BigDecimal
              type: number
            transferredToAccounting:
              description: |
                Whether the invoice was transferred to an external accounting system.
              enum:
                - Processing
                - Yes
                - Error
                - Ignore
              type: string
            updatedById:
              description: |
                The ID of the Zuora user who last updated the invoice.
              type: string
            updatedDate:
              description: |
                The date and time when the invoice was last updated, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-02 15:36:10.
              format: date-time
              type: string
          type: object
        - $ref: "#/components/schemas/InvoiceObjectNSFields"
        - $ref: "#/components/schemas/InvoiceObjectCustomFields"
    PutInvoiceType:
      allOf:
        - properties:
            autoPay:
              description: |
                Whether invoices are automatically picked up for processing in the corresponding payment run.

                By default, invoices are automatically picked up for processing in the corresponding payment run.
              type: boolean
            comments:
              description: |
                Additional information related to the invoice that a Zuora user added to the invoice.
              maxLength: 255
              type: string
            dueDate:
              description: |
                The date by which the payment for this invoice is due.
              format: date
              type: string
            invoiceDate:
              description: |
                The new invoice date of the invoice. The new invoice date cannot fall in a closed accounting period.

                You can only specify `invoiceDate` or `dueDate` in one request. Otherwise, an error occurs.
              format: date
              type: string
            invoiceItems:
              description: |
                Container for invoice items, The maximum number of items is 1,000.
                **Note:** Invoice items can only be updated when Unified Invoice is enabled and the invoice is a standalone invoice.
              items:
                $ref: "#/components/schemas/PutInvoiceItemType"
              type: array
            transferredToAccounting:
              description: |
                Whether the invoice was transferred to an external accounting system.
              enum:
                - Processing
                - Yes
                - Error
                - Ignore
              type: string
          type: object
        - $ref: "#/components/schemas/InvoiceObjectNSFields"
        - $ref: "#/components/schemas/InvoiceObjectCustomFields"
      example:
        autoPay: false
        invoiceDate: 2017-02-20
        transferredToAccounting: Yes
    PutOrderLineItemResponseType:
      $ref: "#/components/schemas/CommonResponseType"
    PutOrderLineItemUpdateType:
      allOf:
        - $ref: "#/components/schemas/OrderLineItemCommon"
    PutReverseInvoiceResponseType:
      properties:
        creditMemo:
          description: |
            Container for the credit memo that is auto-generated when reversing invoices.
          properties:
            id:
              description: ID of the credit memo.
              type: string
          type: object
        success:
          description: |
            Returns `true` if the request was processed successfully.
          type: boolean
      type: object
    PutReverseInvoiceType:
      example:
        applyEffectiveDate: 2017-02-20
        memoDate: 2017-02-20
      properties:
        applyEffectiveDate:
          description: |
            The date when the credit memo was applied to the invoice that will be reversed, in `yyyy-mm-dd` format. The effective date must be later than or equal to the memo date.

            Default value is today's date.
          format: date
          type: string
        memoDate:
          description: |
            The date when the credit memo was created, in `yyyy-mm-dd` format. The memo date must be later than or equal to the invoice date.

            Default value is today's date.
          format: date
          type: string
      type: object
    PutTasksRequest:
      example:
        data:
          - action_type: If
            call_type: SOAP
            concurrent_limit: 9999999
            id: 2771
            name: If
            object: null
            object_id: null
            status: Success
            tags: []
            workflow_id: 476
      properties:
        data:
          description: |
            The list of tasks to update.
          items:
            $ref: "#/components/schemas/UpdateTask"
          maximum: 50
          minimum: 1
          type: array
      type: object
    QueryCustomObjectRecordsResponse:
      properties:
        count:
          description: The record count of the given custom object type
          example: 1
          type: integer
        records:
          example:
            - CreatedById: 58bcc694-0b01-4c38-83d9-679891aee4dc
              CreatedDate: 2017-06-07T17:26:47.501Z
              Id: f4f3d0a8-9d45-43d6-956c-4820f2de7559
              UpdatedById: 58bcc694-0b01-4c38-83d9-679891aee4dc
              UpdatedDate: 2017-06-07T17:26:47.501Z
              age__c: 32
              email__c: smith123@example.com
              home_address__c: 59b38ad1-27d4-40e8-af66-8c138bc382ee
              last_name__c: Smith
              marital_status__c: Married
              type: person
              version: 1
              work_address__c: 8a19f16a-2b5e-4a26-bb20-c79cd6984714
          items:
            $ref: "#/components/schemas/CustomObjectRecordWithAllFields"
          type: array
      required:
        - count
        - records
      type: object
    QuoteObjectFields:
      description: |
        The fields populated for a quote when a quote is sent to Zuora Billing from Zuora Quote.
      properties:
        OpportunityCloseDate__QT:
          description: |
            The closing date of the Opportunity.

            This field is used in Zuora Reporting Data Sources to report on Subscription metrics.

            If the subscription was originated from Zuora Quotes, the value is populated with the value from Zuora Quotes.
          type: string
        OpportunityName__QT:
          description: |
            The unique identifier of the Opportunity. 

            This field is used in the Zuora Reporting Data Sources to report on Subscription metrics.

            If the subscription was originated from Zuora Quotes, the value is populated with the value from Zuora Quotes.

            **Character limit**: 100
          type: string
        QuoteBusinessType__QT:
          description: |
            The specific identifier for the type of business transaction the Quote represents such as New, Upsell, Downsell, Renewal or Churn.

            This field is used in the Zuora Reporting Data Sources to report on Subscription metrics.

            If the subscription was originated from Zuora Quotes, the value is populated with the value from Zuora Quotes.

            **Character limit**: 32
          type: string
        QuoteNumber__QT:
          description: |
            The unique identifier of the Quote.

            This field is used in the Zuora Reporting Data Sources to report on Subscription metrics.

            If the subscription was originated from Zuora Quotes, the value is populated with the value from Zuora Quotes.

            **Character limit**: 32
          type: string
        QuoteType__QT:
          description: |
            The Quote type that represents the subscription lifecycle stage such as New, Amendment, Renew or Cancel.

            This field is used in the Zuora Reporting Data Sources to report on Subscription metrics.

            If the subscription was originated from Zuora Quotes, the value is populated with the value from Zuora Quotes.

            **Character limit**: 32
          type: string
      title: quote
      type: object
    RampChargeRequest:
      properties:
        chargeNumber:
          description: The number of the rate plan charge.
          type: string
        uniqueToken:
          description: |
            Unique identifier for the charge. This identifier enables you to refer to the charge before the charge has an internal identifier in Zuora.
          type: string
      title: RampCharge
      type: object
    RampChargeResponse:
      properties:
        chargeNumber:
          description: The number of the rate plan charge.
          type: string
      title: charges
      type: object
    RampIntervalChargeDeltaMetrics:
      properties:
        chargeNumber:
          description: The number of the rate plan charge.
          type: string
        deltaDiscountTcb:
          description: The discount delta amount for the TCB.
          type: number
        deltaDiscountTcv:
          description: The discount delta amount for the TCV.
          type: number
        deltaGrossTcb:
          description: The TCB delta value before discount charges are applied.
          type: number
        deltaGrossTcv:
          description: The TCV delta value before discount charges are applied.
          type: number
        deltaMrr:
          description: The MRR changing history of the current rate plan charge in the current ramp interval.
          items:
            properties:
              discount:
                description: The discount delta amount for the MRR.
                type: number
              endDate:
                description: The end date.
                format: date
                type: string
              gross:
                description: The MRR delta amount before discounts charges are applied.
                type: number
              net:
                description: The MRR delta amount after discounts charges are applied.
                type: number
              startDate:
                description: The start date.
                format: date
                type: string
            type: object
          type: array
        deltaNetTcb:
          description: The TCB delta value after discount charges are applied.
          type: number
        deltaNetTcv:
          description: The TCV delta value after discount charges are applied.
          type: number
        deltaQuantity:
          description: The charge quantity changing history of the current rate plan charge in the current ramp interval.
          items:
            properties:
              amount:
                description: The delta amount of the charge quantity.
                type: number
              endDate:
                description: The end date.
                format: date
                type: string
              startDate:
                description: The start date.
                format: date
                type: string
            type: object
          type: array
        productRatePlanChargeId:
          description: The ID of the corresponding product rate plan charge.
          type: string
        subscriptionNumber:
          description: The number of the subscription that the current rate plan charge belongs to.
          type: string
      title: intervalDeltaMetrics
      type: object
    RampIntervalChargeMetrics:
      properties:
        chargeNumber:
          description: The number of the charge.
          type: string
        discountTcb:
          description: The discount amount for the TCB.
          type: number
        discountTcv:
          description: The discount amount for the TCV.
          type: number
        endDate:
          description: The end date of the rate plan charge in the current ramp interval.
          format: date
          type: string
        grossTcb:
          description: The gross TCB value before discount charges are applied.
          type: number
        grossTcv:
          description: The gross TCV value before discount charges are applied.
          type: number
        mrr:
          description: The MRR changing history of the current rate plan charge in the current ramp interval.
          items:
            properties:
              discount:
                description: The discount amount for the MRR.
                type: number
              endDate:
                description: The end date.
                format: date
                type: string
              gross:
                description: The gross MRR amount before discounts charges are applied.
                type: number
              net:
                description: The net MRR amount after discounts charges are applied.
                type: number
              startDate:
                description: The start date.
                format: date
                type: string
            type: object
          type: array
        netTcb:
          description: The net TCB value after discount charges are applied.
          type: number
        netTcv:
          description: The net TCV value after discount charges are applied.
          type: number
        productRatePlanChargeId:
          description: The ID of the corresponding product rate plan charge.
          type: string
        quantity:
          description: The quantity of the rate plan charge.
          type: number
        ratePlanChargeId:
          description: The ID of the rate plan charge.
          type: string
        startDate:
          description: The start date of the rate plan charge in the current ramp interval.
          format: date
          type: string
        subscriptionNumber:
          description: The number of the subscription that the current rate plan charge belongs to.
          type: string
      title: intervalMetrics
      type: object
    RampIntervalMetrics:
      properties:
        description:
          description: The short description of the interval.
          type: string
        discountTcb:
          description: The discount amount for the TCB.
          type: number
        discountTcv:
          description: The discount amount for the TCV.
          type: number
        endDate:
          description: The end date of the interval.
          format: date
          type: string
        grossTcb:
          description: The gross TCB value before discount charges are applied.
          type: number
        grossTcv:
          description: The gross TCV value before discount charges are applied.
          type: number
        intervalMetrics:
          description: Container for the detailed metrics for each rate plan charge in each ramp interval.
          items:
            $ref: "#/components/schemas/RampIntervalChargeMetrics"
          type: array
        name:
          description: The name of the interval.
          type: string
        netTcb:
          description: The net TCB value after discount charges are applied.
          type: number
        netTcv:
          description: The net TCV value after discount charges are applied.
          type: number
        startDate:
          description: The start date of the interval.
          format: date
          type: string
      type: object
    RampIntervalRequest:
      description: |
        Container for the intervals that the ramp is split into in its timeline. Zuora can report metrics for this specific period.
      properties:
        description:
          description: The short description of the interval.
          type: string
        endDate:
          description: The end date of the interval.
          format: date
          type: string
        name:
          description: The name of the interval.
          type: string
        startDate:
          description: The start date of the interval.
          format: date
          type: string
      required:
        - startDate
        - endDate
      title: intervals
      type: object
    RampIntervalResponse:
      properties:
        description:
          description: The short description of the interval.
          type: string
        endDate:
          description: The end date of the interval.
          format: date
          type: string
        name:
          description: The name of the interval.
          type: string
        startDate:
          description: The start date of the interval.
          format: date
          type: string
      title: intervals
      type: object
    RampMetrics:
      properties:
        description:
          description: The short description of the ramp.
          type: string
        discountTcb:
          description: The discount amount for the TCB.
          type: number
        discountTcv:
          description: The discount amount for the TCV.
          type: number
        grossTcb:
          description: The gross TCB value before discount charges are applied.
          type: number
        grossTcv:
          description: The gross TCV value before discount charges are applied.
          type: number
        intervals:
          description: Container for the intervals that the ramp is split into in its timeline.
          items:
            $ref: "#/components/schemas/RampIntervalMetrics"
          type: array
        name:
          description: The name of the ramp.
          type: string
        netTcb:
          description: The net TCB value after discount charges are applied.
          type: number
        netTcv:
          description: The net TCV value after discount charges are applied.
          type: number
        number:
          description: The number of the ramp. It is automaticcally generated by the billing system.
          type: string
      type: object
    RampRequest:
      description: |
        Container of the ramp definitions. It is used to create, update, or remove the ramp definition for the new subscription.
      properties:
        charges:
          description: |
            Container for the rate plan charges that are considered as part of the ramp deal.

            * If this field is not specified, all the one-time and recurring regular charges of the new subscription are automatically considered as part of the ramp deal.
            * If this field is specified, either 'chargeNumber' or 'uniqueToken' must be specified.
          items:
            $ref: "#/components/schemas/RampChargeRequest"
          type: array
        delete:
          description: |
            Whether to remove the ramp definition from the new subscription. If you want to remove the ramp definition, this field is the only required field for the `ramp` object.  
          type: boolean
        description:
          description: The short description of the ramp.
          type: string
        intervals:
          description: |
            Container for the intervals that the ramp is split into in its timeline. 

            It is required when you want to create or update the ramp definition. The ramp intervals cannot have any overlap or gap between each other.
          items:
            $ref: "#/components/schemas/RampIntervalRequest"
          type: array
        name:
          description: The name of the ramp.
          type: string
      title: Ramp
      type: object
    RampResponse:
      properties:
        charges:
          description: Container for the rate plan charges that are considered as part of the ramp deal.
          items:
            $ref: "#/components/schemas/RampChargeResponse"
          type: array
        description:
          description: The short description of the ramp.
          type: string
        id:
          description: The ID of the ramp.
          type: string
        intervals:
          description: Container for the intervals that the ramp is split into in its timeline.
          items:
            $ref: "#/components/schemas/RampIntervalResponse"
          type: array
        name:
          description: The name of the ramp.
          type: string
        number:
          description: The number of the ramp. It is automaticcally generated by the billing system.
          type: string
        subscriptionNumber:
          description: The number of the subscription that is considered as part of the ramp deal.
          type: string
      title: Ramp
      type: object
    RatePlan:
      properties:
        AmendmentId:
          description: |2-
             The ID of the amendment associated with the rate plan. This field only applies to amendment rate plans.


            **Character limit**: 32

            **Values**: a valid amendment ID 
          type: string
        AmendmentSubscriptionRatePlanId:
          description: |-
            The ID of the subscription rate plan modified by the amendment. This field only applies to amendment rate plans.

            **Character limit**: 32

            **Values**: a valid rate plan ID 
          type: string
        AmendmentType:
          description: |-
            The type of amendment associated with the rate plan. This field only applies to amendment rate plans.

            **Character limit**: 18

            **Values**: inherited from `Amendment.Type` 
          type: string
        CreatedById:
          description: |-
            The ID of the Zuora user who created the RatePlan object.

            **Character limit**: 32

            **Values**: automatically generated 
          type: string
        CreatedDate:
          description: |-
            The date when the `RatePlan` object was last updated.

            **Character limit**: 29

            **Values**: automatically generated 
          format: date-time
          type: string
        Name:
          description: |-
            The name of the rate plan. Leave this null in a subscribe call to inherited the `ProductRatePlan.Name` field value.

            **Character limit**: 100

            **Values**: a string of 100 characters or fewer or inherited from ProductRatePlan.Name 
          type: string
        ProductRatePlanId:
          description: |-
            The ID of the associated product rate plan.

            **Character limit**: 32

            **Values**: a valid product rate plan ID 
          type: string
        SubscriptionId:
          description: |-
            The ID of the subscription that the rate plan belongs to.

            **Character limit**: 32

            **Values**: a valid subscription ID 
          type: string
        UpdatedById:
          description: |2-
             The ID of the user who last updated the rate plan.


            **Character limit**: 32

            **Values**: automatically generated 
          type: string
        UpdatedDate:
          description: |2-
             The date when the rate plan was last updated.


            **Character limit**: 29

            **Values**: automatically generated 
          format: date-time
          type: string
      required:
        - ProductRatePlanId
      type: object
    RatePlanChargeData:
      properties:
        RatePlanCharge:
          $ref: "#/components/schemas/RatePlanChargeDataRatePlanCharge"
        RatePlanChargeTier:
          description: ""
          items:
            $ref: "#/components/schemas/RatePlanChargeTier"
          type: array
      required:
        - RatePlanCharge
      type: object
    RatePlanChargeDataInRatePlanData:
      properties:
        RatePlanCharge:
          description: ""
          properties:
            AccountingCode:
              description: |-
                The accounting code for the charge. Accounting codes group transactions that contain similar accounting attributes.

                **Character limit**: 100


                **Values**: inherited from `ProductRatePlanCharge.AccountingCode` 
              type: string
            ApplyDiscountTo:
              description: |2-
                 Specifies the type of charges a specific discount applies to.

                **Character limit**: 21


                **Values**: inherited from `ProductRatePlanCharge.ApplyDiscountTo` 
              type: string
            BillCycleDay:
              description: |2-
                 Indicates the charge's billing cycle day (BCD), which is when bill runs generate invoices for charges associated with the product rate plan charge or the account.


                **Character limit**: 2


                **Values**: inherited from `ProductRatePlanCharge.BillCycleDay` 
              format: int32
              type: integer
            BillCycleType:
              description: |2-
                 Specifies how to determine the billing day for the charge.


                **Character limit**: 20


                **Values**: inherited from `ProductRatePlanCharge.BillCycleType` **Note:** You can override the value inherited from the Product Rate Plan Charge, but only when creating a new subscription or a New Product amendment. 
              type: string
            BillingPeriod:
              description: |2-
                 Allows billing period to be overridden on rate plan charge.



                **Values**: inherited from `ProductRatePlanCharge.BillingPeriod` **Note:** You can override the value inherited from the Product Rate Plan Charge, but only when creating a new subscription or a New Product amendment. 
              type: string
            BillingPeriodAlignment:
              description: |2-
                 Aligns charges within the same subscription if multiple charges begin on different dates.


                **Character limit**: 24


                **Values**: inherited from `ProductRatePlanCharge.BillingPeriodAlignment` 
              type: string
            BillingTiming:
              description: |2+
                 The billing timing for the charge. You can choose to bill in advance or in arrears for recurring charge types. This field is not used in one-time or usage based charge types.


                **Character limit**:


                **Values**: one of the following:

                - `In Advance`
                - `In Arrears`
                **Note:** You can override the value inherited from the Product Rate Plan Charge when a subscription has a recurring charge type.
                This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).

              type: string
            ChargeModel:
              description: |2-
                 Determines how to evaluate charges. Charge models must be individually activated in the web-based UI.


                **Character limit**: 29


                **Values**: inherited from `ProductRatePlanCharge.ChargeModel` 
              type: string
            ChargeNumber:
              description: |2
                 A unique number that identifies the charge. This number is returned as a string.


                **Character limit**: 50


                **Values**: one of the following:

                - automatically generated if left null
                - a unique number of 50 characters or fewer
              type: string
            ChargeType:
              description: |2-
                 Specifies the type of charge.


                **Character limit**: 9


                **Values**: inherited from `ProductRatePlanCharge.ChargeType` 
              type: string
            ChargedThroughDate:
              description: |2-
                 The date through which a customer has been billed for the charge.


                **Character limit**: 29


                **Values**: automatically generated 
              format: date
              type: string
            CreatedById:
              description: |-
                The ID of the Zuora user who created the `RatePlanCharge` object.

                **Character limit**: 32


                **Values**: automatically generated 
              type: string
            CreatedDate:
              description: |2-
                 The date when the `RatePlanCharge` object was created.


                **Character limit**: 29


                **Values**: automatically generated 
              format: date-time
              type: string
            DMRC:
              description: |-
                A delta monthly recurring charge is the change in monthly recurring revenue caused by an amendment or a new subscription.

                **Character limit**: 16


                **Values**: automatically generated 
              format: double
              type: number
            DTCV:
              description: |2-
                 After an Amendment, the change in the total contract value (TCV) amount for this charge, compared with its previous value.


                **Character limit**: 16


                **Values**: automatically generated 
              format: double
              type: number
            Description:
              description: |2-
                 A description of the charge.


                **Character limit**: 500


                **Values**: inherited from `ProductRatePlanCharge.Description` 
              type: string
            DiscountAmount:
              description: |2-
                 Specifies the amount of a fixed-amount discount. You can provide a value for this field if the `ChargeModel` field value is `Discount-Fixed Amount`. If this field is included in a query, the query will filter out the rate plans whose `ChargeModel` field is not of a Discount type. You cannot query this field with the following fields in a single query:

                - Price
                - IncludedUnits
                - DiscountPercentage
                - OveragePrice


                **Character limit**: 16


                **Values**: a valid currency amount 
              format: double
              type: number
            DiscountLevel:
              description: |-
                Specifies if the discount applies to just the product rate plan, the entire subscription, or to any activity in the account. This field is only required if the `ChargeModel` field is set to `DiscountFixedAmount` or `DiscountPercentage`.

                **Character limit**: 12


                **Values**: inherited from `ProductRatePlanCharge.DiscountLevel` 
              type: string
            DiscountPercentage:
              description: " Query Filter "
              format: double
              type: number
            EffectiveEndDate:
              description: |2-
                 The date when the segmented charge ends or ended.


                **Character limit**: 16


                **Values**: automatically generated 
              format: date
              type: string
            EffectiveStartDate:
              description: |2-
                 The date when the segmented charge starts or started.


                **Character limit**: 16


                **Values**: automatically generated 
              format: date
              type: string
            EndDateCondition:
              description: |2-
                 Defines when the charge ends after the charge trigger date. This field can be updated when **Status** is `Draft`.



                **Values**: one of the following:

                - `SubscriptionEnd`: The charge ends on the subscription end date after the charge trigger date. This is the default value.
                - `FixedPeriod`: The charge ends after a specified period based on the trigger date of the charge. If you set this field to `FixedPeriod`, you must specify the length of the period and a period type by defining the `UpToPeriods` and `UpToPeriodsType` fields.
                - `SpecificEndDate`: The specific date on which the charge ends. If you set this field to `SpecificEndDate`, you must specify the specific date by defining the `SpecificEndDate` field.



                **Note**: If the subscription ends before the charge end date, the charge ends when the subscription ends. But if the subscription end date is subsequently changed through a Renewal, or Terms and Conditions amendment, the charge will end on the charge end date. 
              type: string
            IncludedUnits:
              description: " Query Filter "
              format: double
              type: number
            IsLastSegment:
              description: |-
                Indicates if the segment of the rate plan charge is the most recent segment.

                **Character limit**: 5


                **Values**: automatically generated: `true`, `false` 
              type: boolean
            ListPriceBase:
              description: |
                The list price base for the product rate plan charge.

                You can only change the value of this field if the amendment type is NewProduct.

                **Values**: one of the following:

                - `Per Month`
                - `Per Billing Period`
                - `Per Week`
              type: string
            MRR:
              description: |-
                Monthly recurring revenue (MRR) is the amount of recurring charges in a given month. The MRR calculation doesn't include one-time charges nor usage charges.

                **Character limit**: 16


                **Values**: automatically generated 
              format: double
              type: number
            Name:
              description: |-
                The name of the rate plan charge.

                **Character limit**: 100


                **Values**: automatically generated 
              type: string
            NumberOfPeriods:
              description: |-
                Specifies the number of periods to use when calculating charges in an overage smoothing charge model.

                **Character limit**: 5


                **Values**: inherited from `ProductRatePlanCharge.NumberOfPeriod` 
              format: int64
              type: integer
            OriginalId:
              description: |-
                The original ID of the rate plan charge.

                **Character limit**: 32


                **Values**: automatically generated 
              type: string
            OverageCalculationOption:
              description: |-
                Determines when to calculate overage charges. If the value of the SmoothingMode field is null (not specified and not inherited from ProductRatePlanCharge.SmoothingMode), the value of this field is ignored.

                **Character limit**: 20


                **Values**: inherited from `ProductRatePlanCharge.OverageCalculationOption` 
              type: string
            OveragePrice:
              description: " Query Filter "
              format: double
              type: number
            OverageUnusedUnitsCreditOption:
              description: |2-
                 Determines whether to credit the customer with unused units of usage.


                **Character limit**: 20


                **Values**: inherited from `ProductRatePlanCharge.OverageUnusedUnitsCreditOption` 
              type: string
            Price:
              description: " Query Filter "
              format: double
              type: number
            PriceChangeOption:
              description: |2
                 Applies an automatic price change when a termed subscription is renewed.


                **Character limit**:


                **Values**: one of the following:

                - `NoChange` (default)
                - `SpecificPercentageValue`
                - `UseLatestProductCatalogPricing`
              type: string
            PriceIncreasePercentage:
              description: |2-
                 Specifies the percentage to increase or decrease the price of renewed subscriptions. Use this field if the `ProductRatePlanCharge`.`PriceChangeOption` value is set to `SpecificPercentageValue`.


                **Character limit**: 16


                **Values**: a decimal value between -100 and 100 
              format: double
              type: number
            ProcessedThroughDate:
              description: |2-
                 The date until when charges have been processed. When billing in arrears, such as usage, this field value is the the same as the `ChargedThroughDate` value. This date is the earliest date when a charge can be amended.


                **Character limit**: 29


                **Values**: automatically generated 
              format: date
              type: string
            ProductRatePlanChargeId:
              description: |2-
                 The ID of the product rate plan charge associated with the subscription rate plan charge,

                **Character limit**: 32


                **Values**: inherited from `ProductRatePlanCharge.Id` 
              type: string
            Quantity:
              description: |2-
                 The default quantity of units, such as the number of authors in a hosted wiki service. Valid for all charge models except for Flat Fee pricing. This field is only rquired if the charge model is tiered pricing or volume pricing.



                **Character limit**: 16


                **Values**: a valid quantity value 
              format: double
              type: number
            RatePlanId:
              description: |2-
                 The ID of the rate plan associated with the rate plan charge.


                **Character limit**: 32


                **Values**: inherited from `RatePlan.Id` 
              type: string
            RevRecCode:
              description: |2-
                 Associates this product rate plan charge with a specific revenue recognition code.


                **Character limit**: 70


                **Values**: a valid revenue recognition code 
              type: string
            RevRecTriggerCondition:
              description: |2+
                 Specifies when revenue recognition begins.


                **Character limit**: 22


                **Values**: one of the following:

                -  `ContractEffectiveDate`

                -  `ServiceActivationDate`

                -  `CustomerAcceptanceDate`

              type: string
            RevenueRecognitionRuleName:
              description: |2-
                 Specifies the Revenue Recognition Rule that you want the Rate Plan Charge to use. This field can be updated when **Status** is `Draft`. By default, the Revenue Recognition Rule is inherited from the Product Rate Plan Charge. For Amend
                calls, you can use this field only for NewProduct amendments. For Update
                calls, you can use this field only to update subscriptions in draft status. Note that if you use this field to specify a Revenue Recognition Rule for the Rate Plan Charge, the rule will remain as specified even if you later change the rule used by the corresponding Product Rate Plan Charge. See [Z-Billing User Role](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/A_Administrator_Settings/User_Roles/d_Billing_Roles) permission enabled to use this field.



                **Character limit**: n/a


                **Values**: name of an active Revenue Recognition Rule 
              type: string
            RolloverBalance:
              description: |2
                 Specifies the number of units of measure (UOM) rolled over from previous periods. This field is applicable only to usage charges with overage models.


                **Character limit**: 16


                **Values**: automatically generated

                **Note**:

                - You cannot query or filter this field with other fields in a single query.
                - To query or filter this field, you must specify and only specify the rate plan charge Id in the condition.
                - You cannot use this field in the query or filter condition.
              format: double
              type: number
            Segment:
              description: |2-
                 The identifying number of the subscription rate plan segment. Segments are numbered sequentially, starting with 1.


                **Character limit**: 2


                **Values**: automatically generated 
              format: int32
              type: integer
            SpecificBillingPeriod:
              description: |2-
                 Customizes the number of months or weeks for the charges billing period. This field is only required if you set the value of the `BillingPeriod` field to `Specific Months` or `Specific Weeks`.


                **Character limit**: 5


                **Values**: inherited from `ProductRatePlanCharge.BillingPeriod` **Note:** You can override the value inherited from the Product Rate Plan Charge, but only when creating a new subscription or a New Product amendment. 
              format: int64
              type: integer
            SpecificEndDate:
              description: |2
                 The specific date on which the charge ends, in `yyyy-mm-dd` format.


                **Character limit**: 29



                **Note**:

                - This field is only applicable when the `EndDateCondition` field is set to `SpecificEndDate`.
                - If the subscription ends before the specific end date, the charge ends when the subscription ends. But if the subscription end date is subsequently changed through a Renewal, or Terms and Conditions amendment, the charge will end on the specific end date.
              format: date
              type: string
            TCV:
              description: |2-
                 The total contract value (TCV) is the value of a single rate plan charge in a subscription over the lifetime of the subscription. This value does not represent all charges on the subscription. The TCV includes recurring charges and one-time charges, but it doesn't include usage charge.


                **Character limit**: 16


                **Values**: automatically generated 
              format: double
              type: number
            TriggerDate:
              description: |2+
                 The date when the charge becomes effective and billing begins, in `yyyy-mm-dd` format. This field is only required if the `TriggerEvent` field is set to `SpecificDate`.


                **Character limit**: 29

              format: date
              type: string
            TriggerEvent:
              description: |2
                 Specifies when to start billing the customer for the charge.
                **Note: **This field can be passed through the subscribe
                and amend
                calls and will override the default value set on the Product Rate Plan Charge.


                **Character limit**: 18


                **Values**: inherited from `ProductRatePlanCharge.TriggerEvent` and can be one of the following values:

                - `ContractEffective `is the date when the subscription's contract goes into effect and the charge is ready to be billed.
                - `ServiceActivationDate `is when the services or products for a subscription have been activated and the customers have access.
                - `CustomerAcceptance `is when the customer accepts the services or products for a subscription.
                - SpecificDate is valid only on the RatePlanCharge.
              type: string
            UOM:
              description: |2-
                 Specifies the units to measure usage. Units of measure are configured in the web-based UI: **Z-Billing > Settings**.


                **Character limit**: 25


                **Values**: inherited from `ProductRatePlanCharge.UOM` 
              type: string
            UnusedUnitsCreditRates:
              description: |2-
                 Specifies the rate to credit a customer for unused units of usage. This field is applicable only for overage charge models when the `OverageUnusedUnitsCreditOption` field value is CreditBySpecificRate.


                **Character limit**: 16


                **Values**: a valid decimal value 
              format: double
              type: number
            UpToPeriods:
              description: |2
                 Specifies the length of the period during which the charge is active. If this period ends before the subscription ends, the charge ends when this period ends.


                **Character limit**: 5


                **Values**: inherited from `ProductRatePlanCharge.UpToPeriods`

                **Note**:

                - You must use this field together with the `UpToPeriodsType` field to specify the time period. This field is only applicable only when the `EndDateCondition` field is set to `FixedPeriod`.
                - You can override the value inherited from the Product Rate Plan Charge, but only when creating a new subscription or a New Product amendment.
                - Use this field to override the value in `ProductRatePlanCharge.UpToPeriod`.
                - If you override the value in this field, enter a whole number between 0 and 65535, exclusive.
                - If the subscription end date is subsequently changed through a Renewal, or Terms and Conditions amendment, the charge end date will change accordingly up to the original period end.
              format: int64
              type: integer
            UpToPeriodsType:
              description: |2
                 The period type used to define when the charge ends. This field can be updated when **Status** is `Draft`.


                **Values**: one of the following:

                - `Billing Periods` (default)
                - `Days`
                - `Weeks`
                - `Months`
                - `Years`


                **Note**:

                - You must use this field together with the `UpToPeriods` field to specify the time period.
                - This field is only applicable only when the `EndDateCondition` field is set to `FixedPeriod`.
              type: string
            UpdatedById:
              description: |-
                The ID of the last user to update the object.

                **Character limit**: 32


                **Values**: automatically generated 
              type: string
            UpdatedDate:
              description: |2-
                 The date when the object was last updated.


                **Character limit**: 29


                **Values**: automatically generated 
              format: date-time
              type: string
            UsageRecordRatingOption:
              description: |2-
                 Determines how Zuora processes usage records for per-unit usage charges.

                **Character limit**: 18


                **Values**: automatically generated 
              type: string
            UseDiscountSpecificAccountingCode:
              description: |2-
                 Determines whether to define a new accounting code for the new discount charge.


                **Character limit**: 5


                **Values**: inherited from `ProductRatePlanCharge.UseDiscountSpecificAccountingCode` 
              type: boolean
            Version:
              description: |2-
                 The version of the rate plan charge. Each time a charge is amended, Zuora creates a new version of the rate plan charge.

                **Character limit**: 5


                **Values**: automatically generated 
              format: int64
              type: integer
            WeeklyBillCycleDay:
              description: |2
                 Specifies which day of the week as the bill cycle day (BCD) for the charge.
                This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).




                **Values**: one of the following:

                - `Sunday`
                - `Monday`
                - `Tuesday`
                - `Wednesday`
                - `Thursday`
                - `Friday`
                - `Saturday`
              type: string
          required:
            - ProductRatePlanChargeId
          type: object
        RatePlanChargeTier:
          description: ""
          items:
            $ref: "#/components/schemas/RatePlanChargeTier"
          type: array
      required:
        - RatePlanCharge
      title: RatePlanChargeData
      type: object
    RatePlanChargeDataRatePlanCharge:
      allOf:
        - properties:
            AccountingCode:
              description: |-
                The accounting code for the charge. Accounting codes group transactions that contain similar accounting attributes.

                **Character limit**: 100


                **Values**: inherited from `ProductRatePlanCharge.AccountingCode` 
              type: string
            ApplyDiscountTo:
              description: |2-
                 Specifies the type of charges a specific discount applies to.

                **Character limit**: 21


                **Values**: inherited from `ProductRatePlanCharge.ApplyDiscountTo` 
              type: string
            BillCycleDay:
              description: |2-
                 Indicates the charge's billing cycle day (BCD), which is when bill runs generate invoices for charges associated with the product rate plan charge or the account.


                **Character limit**: 2


                **Values**: inherited from `ProductRatePlanCharge.BillCycleDay` 
              format: int32
              type: integer
            BillCycleType:
              description: |2-
                 Specifies how to determine the billing day for the charge.


                **Character limit**: 20


                **Values**: inherited from `ProductRatePlanCharge.BillCycleType` **Note:** You can override the value inherited from the Product Rate Plan Charge, but only when creating a new subscription or a New Product amendment. 
              type: string
            BillingPeriod:
              description: |2-
                 Allows billing period to be overridden on rate plan charge.



                **Values**: inherited from `ProductRatePlanCharge.BillingPeriod` **Note:** You can override the value inherited from the Product Rate Plan Charge, but only when creating a new subscription or a New Product amendment. 
              type: string
            BillingPeriodAlignment:
              description: |2-
                 Aligns charges within the same subscription if multiple charges begin on different dates.


                **Character limit**: 24


                **Values**: inherited from `ProductRatePlanCharge.BillingPeriodAlignment` 
              type: string
            BillingTiming:
              description: |2+
                 The billing timing for the charge. You can choose to bill in advance or in arrears for recurring charge types. This field is not used in one-time or usage based charge types.


                **Character limit**:


                **Values**: one of the following:

                - I`n Advance`
                - `In Arrears`
                **Note:** You can override the value inherited from the Product Rate Plan Charge when a subscription has a recurring charge type.
                This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).

              type: string
            ChargeModel:
              description: |2-
                 Determines how to evaluate charges. Charge models must be individually activated in the web-based UI.


                **Character limit**: 29


                **Values**: inherited from `ProductRatePlanCharge.ChargeModel` 
              type: string
            ChargeNumber:
              description: |2
                 A unique number that identifies the charge. This number is returned as a string.


                **Character limit**: 50


                **Values**: one of the following:

                - automatically generated if left null
                - a unique number of 50 characters or fewer
              type: string
            ChargeType:
              description: |2-
                 Specifies the type of charge.


                **Character limit**: 9


                **Values**: inherited from `ProductRatePlanCharge.ChargeType` 
              type: string
            ChargedThroughDate:
              description: |2-
                 The date through which a customer has been billed for the charge.


                **Character limit**: 29


                **Values**: automatically generated 
              format: date
              type: string
            CreatedById:
              description: |-
                The ID of the Zuora user who created the `RatePlanCharge` object.

                **Character limit**: 32


                **Values**: automatically generated 
              type: string
            CreatedDate:
              description: |2-
                 The date when the `RatePlanCharge` object was created.


                **Character limit**: 29


                **Values**: automatically generated 
              format: date-time
              type: string
            DMRC:
              description: |-
                A delta monthly recurring charge is the change in monthly recurring revenue caused by an amendment or a new subscription.

                **Character limit**: 16


                **Values**: automatically generated 
              format: double
              type: number
            DTCV:
              description: |2-
                 After an Amendment, the change in the total contract value (TCV) amount for this charge, compared with its previous value.


                **Character limit**: 16


                **Values**: automatically generated 
              format: double
              type: number
            Description:
              description: |2-
                 A description of the charge.


                **Character limit**: 500


                **Values**: inherited from `ProductRatePlanCharge.Description` 
              type: string
            DiscountAmount:
              description: |2-
                 Specifies the amount of a fixed-amount discount. You can provide a value for this field if the `ChargeModel` field value is `Discount-Fixed Amount`. If this field is included in a query, the query will filter out the rate plans whose `ChargeModel` field is not of a Discount type. You cannot query this field with the following fields in a single query:

                - Price
                - IncludedUnits
                - DiscountPercentage
                - OveragePrice


                **Character limit**: 16


                **Values**: a valid currency amount 
              format: double
              type: number
            DiscountLevel:
              description: |-
                Specifies if the discount applies to just the product rate plan, the entire subscription, or to any activity in the account. This field is only required if the `ChargeModel` field is set to `DiscountFixedAmount` or `DiscountPercentage`.

                **Character limit**: 12


                **Values**: inherited from `ProductRatePlanCharge.DiscountLevel` 
              type: string
            DiscountPercentage:
              description: " Query Filter "
              format: double
              type: number
            EffectiveEndDate:
              description: |2-
                 The date when the segmented charge ends or ended.


                **Character limit**: 16


                **Values**: automatically generated 
              format: date
              type: string
            EffectiveStartDate:
              description: |2-
                 The date when the segmented charge starts or started.


                **Character limit**: 16


                **Values**: automatically generated 
              format: date
              type: string
            EndDateCondition:
              description: |2-
                 Defines when the charge ends after the charge trigger date. This field can be updated when **Status** is `Draft`.



                **Values**: one of the following:

                - `SubscriptionEnd`: The charge ends on the subscription end date after the charge trigger date. This is the default value.
                - `FixedPeriod`: The charge ends after a specified period based on the trigger date of the charge. If you set this field to `FixedPeriod`, you must specify the length of the period and a period type by defining the `UpToPeriods` and `UpToPeriodsType` fields.
                - `SpecificEndDate`: The specific date on which the charge ends. If you set this field to `SpecificEndDate`, you must specify the specific date by defining the `SpecificEndDate` field.



                **Note**: If the subscription ends before the charge end date, the charge ends when the subscription ends. But if the subscription end date is subsequently changed through a Renewal, or Terms and Conditions amendment, the charge will end on the charge end date. 
              type: string
            IncludedUnits:
              description: " Query Filter "
              format: double
              type: number
            IsLastSegment:
              description: |-
                Indicates if the segment of the rate plan charge is the most recent segment.

                **Character limit**: 5


                **Values**: automatically generated: `true`, `false` 
              type: boolean
            ListPriceBase:
              description: |
                The list price base for the product rate plan charge.


                **Values**: one of the following:

                - `Per Month`
                - `Per Billing Period`
                - `Per Week`
              type: string
            MRR:
              description: |-
                Monthly recurring revenue (MRR) is the amount of recurring charges in a given month. The MRR calculation doesn't include one-time charges nor usage charges.

                **Character limit**: 16


                **Values**: automatically generated 
              format: double
              type: number
            Name:
              description: |-
                The name of the rate plan charge.

                **Character limit**: 100


                **Values**: automatically generated 
              type: string
            NumberOfPeriods:
              description: |-
                Specifies the number of periods to use when calculating charges in an overage smoothing charge model.

                **Character limit**: 5


                **Values**: inherited from `ProductRatePlanCharge.NumberOfPeriod` 
              format: int64
              type: integer
            OriginalId:
              description: |-
                The original ID of the rate plan charge.

                **Character limit**: 32


                **Values**: automatically generated 
              type: string
            OverageCalculationOption:
              description: |-
                Determines when to calculate overage charges. If the value of the SmoothingMode field is null (not specified and not inherited from ProductRatePlanCharge.SmoothingMode), the value of this field is ignored.

                **Character limit**: 20


                **Values**: inherited from `ProductRatePlanCharge.OverageCalculationOption` 
              type: string
            OveragePrice:
              description: " Query Filter "
              format: double
              type: number
            OverageUnusedUnitsCreditOption:
              description: |2-
                 Determines whether to credit the customer with unused units of usage.


                **Character limit**: 20


                **Values**: inherited from `ProductRatePlanCharge.OverageUnusedUnitsCreditOption` 
              type: string
            Price:
              description: " Query Filter "
              format: double
              type: number
            PriceChangeOption:
              description: |2
                 Applies an automatic price change when a termed subscription is renewed.


                **Character limit**:


                **Values**: one of the following:

                - `NoChange` (default)
                - `SpecificPercentageValue`
                - `UseLatestProductCatalogPricing`
              type: string
            PriceIncreasePercentage:
              description: |2-
                 Specifies the percentage to increase or decrease the price of renewed subscriptions. Use this field if the `ProductRatePlanCharge`.`PriceChangeOption` value is set to `SpecificPercentageValue`.


                **Character limit**: 16


                **Values**: a decimal value between -100 and 100 
              format: double
              type: number
            ProcessedThroughDate:
              description: |2-
                 The date until when charges have been processed. When billing in arrears, such as usage, this field value is the the same as the `ChargedThroughDate` value. This date is the earliest date when a charge can be amended.


                **Character limit**: 29


                **Values**: automatically generated 
              format: date
              type: string
            ProductRatePlanChargeId:
              description: |2-
                 The ID of the product rate plan charge associated with the subscription rate plan charge,

                **Character limit**: 32


                **Values**: inherited from `ProductRatePlanCharge.Id` 
              type: string
            Quantity:
              description: |2-
                 The default quantity of units, such as the number of authors in a hosted wiki service. Valid for all charge models except for Flat Fee pricing. This field is only rquired if the charge model is tiered pricing or volume pricing.


                **Character limit**: 16


                **Values**: a valid quantity value 
              format: double
              type: number
            RatePlanId:
              description: |2-
                 The ID of the rate plan associated with the rate plan charge.


                **Character limit**: 32


                **Values**: inherited from `RatePlan.Id` 
              type: string
            RevRecCode:
              description: |2-
                 Associates this product rate plan charge with a specific revenue recognition code.


                **Character limit**: 70


                **Values**: a valid revenue recognition code 
              type: string
            RevRecTriggerCondition:
              description: |2+
                 Specifies when revenue recognition begins.


                **Character limit**: 22


                **Values**: one of the following:

                -  `ContractEffectiveDate`

                -  `ServiceActivationDate`

                -  `CustomerAcceptanceDate`

              type: string
            RevenueRecognitionRuleName:
              description: |2-
                 Specifies the Revenue Recognition Rule that you want the Rate Plan Charge to use. This field can be updated when **Status** is `Draft`. By default, the Revenue Recognition Rule is inherited from the Product Rate Plan Charge. For Amend
                calls, you can use this field only for NewProduct amendments. For Update
                calls, you can use this field only to update subscriptions in draft status. Note that if you use this field to specify a Revenue Recognition Rule for the Rate Plan Charge, the rule will remain as specified even if you later change the rule used by the corresponding Product Rate Plan Charge. See [Z-Billing User Role](https://knowledgecenter.zuora.com/CF_Users_and_Administrators/A_Administrator_Settings/User_Roles/d_Billing_Roles) permission enabled to use this field.



                **Character limit**: n/a


                **Values**: name of an active Revenue Recognition Rule 
              type: string
            RolloverBalance:
              description: |2
                 Specifies the number of units of measure (UOM) rolled over from previous periods. This field is applicable only to usage charges with overage models.


                **Character limit**: 16


                **Values**: automatically generated

                **Note**:

                - You cannot query or filter this field with other fields in a single query.
                - To query or filter this field, you must specify and only specify the rate plan charge Id in the condition.
                - You cannot use this field in the query or filter condition.
              format: double
              type: number
            Segment:
              description: |2-
                 The identifying number of the subscription rate plan segment. Segments are numbered sequentially, starting with 1.


                **Character limit**: 2


                **Values**: automatically generated 
              format: int32
              type: integer
            SpecificBillingPeriod:
              description: |2-
                 Customizes the number of months or weeks for the charges billing period. This field is only required if you set the value of the `BillingPeriod` field to `Specific Months` or `Specific Weeks`.

                **Character limit**: 5


                **Values**: inherited from `ProductRatePlanCharge.BillingPeriod` **Note:** You can override the value inherited from the Product Rate Plan Charge, but only when creating a new subscription or a New Product amendment. 
              format: int64
              type: integer
            SpecificEndDate:
              description: |2
                 The specific date on which the charge ends, in `yyyy-mm-dd` format.


                **Character limit**: 29



                **Note**:

                - This field is only applicable when the `EndDateCondition` field is set to `SpecificEndDate`.
                - If the subscription ends before the specific end date, the charge ends when the subscription ends. But if the subscription end date is subsequently changed through a Renewal, or Terms and Conditions amendment, the charge will end on the specific end date.
              format: date
              type: string
            TCV:
              description: |2-
                 The total contract value (TCV) is the value of a single rate plan charge in a subscription over the lifetime of the subscription. This value does not represent all charges on the subscription. The TCV includes recurring charges and one-time charges, but it doesn't include usage charge.


                **Character limit**: 16


                **Values**: automatically generated 
              format: double
              type: number
            TriggerDate:
              description: |2+
                 The date when the charge becomes effective and billing begins, in `yyyy-mm-dd` format. This field is only required if the `TriggerEvent` field is set to `SpecificDate`.


                **Character limit**: 29

              format: date
              type: string
            TriggerEvent:
              description: |2
                 Specifies when to start billing the customer for the charge.
                **Note: **This field can be passed through the subscribe
                and amend
                calls and will override the default value set on the Product Rate Plan Charge.


                **Character limit**: 18


                **Values**: inherited from `ProductRatePlanCharge.TriggerEvent` and can be one of the following values:

                - `ContractEffective`is the date when the subscription's contract goes into effect and the charge is ready to be billed. When previewing invoices with the subscribe call, if a charge's trigger event is set to `ContractEffective`, you must also set the `subscribes` > `SubscriptionData` > `Subscription` > `ContractEffectiveDate` field to a specific date to complete your preview. You cannot leave this field as blank.
                - `ServiceActivation`is when the services or products for a subscription have been activated and the customers have access. When previewing invoices with the subscribe call, if a charge's trigger event is set to `ServiceActivation`, you must also set the `subscribes` > `SubscriptionData` > `Subscription` > `ServiceActivationDate` field to a specific date to complete your preview. You cannot leave this field as blank.
                - `CustomerAcceptance`is when the customer accepts the services or products for a subscription. When previewing invoices with the subscribe call, if a charge's trigger event is set to `CustomerAcceptance`, you must also set the `subscribes` > `SubscriptionData` > `Subscription` > `CustomerAcceptanceDate` field to a specific date to complete your preview. You cannot leave this field as blank.
                - `SpecificDate` is valid only on the RatePlanCharge.
              type: string
            UOM:
              description: |2-
                 Specifies the units to measure usage. Units of measure are configured in the web-based UI: **Z-Billing > Settings**.


                **Character limit**: 25


                **Values**: inherited from `ProductRatePlanCharge.UOM` 
              type: string
            UnusedUnitsCreditRates:
              description: |2-
                 Specifies the rate to credit a customer for unused units of usage. This field is applicable only for overage charge models when the `OverageUnusedUnitsCreditOption` field value is CreditBySpecificRate.


                **Character limit**: 16


                **Values**: a valid decimal value 
              format: double
              type: number
            UpToPeriods:
              description: |2
                 Specifies the length of the period during which the charge is active. If this period ends before the subscription ends, the charge ends when this period ends.


                **Character limit**: 5


                **Values**: inherited from `ProductRatePlanCharge.UpToPeriods`

                **Note**:

                - You must use this field together with the `UpToPeriodsType` field to specify the time period. This field is only applicable only when the `EndDateCondition` field is set to `FixedPeriod`.
                - You can override the value inherited from the Product Rate Plan Charge, but only when creating a new subscription or a New Product amendment.
                - Use this field to override the value in `ProductRatePlanCharge.UpToPeriod`.
                - If you override the value in this field, enter a whole number between 0 and 65535, exclusive.
                - If the subscription end date is subsequently changed through a Renewal, or Terms and Conditions amendment, the charge end date will change accordingly up to the original period end.
              format: int64
              type: integer
            UpToPeriodsType:
              description: |2
                 The period type used to define when the charge ends. This field can be updated when **Status** is `Draft`.


                **Values**: one of the following:

                - `Billing Periods` (default)
                - `Days`
                - `Weeks`
                - `Months`
                - `Years`


                **Note**:

                - You must use this field together with the `UpToPeriods` field to specify the time period.
                - This field is only applicable only when the `EndDateCondition` field is set to `FixedPeriod`.
              type: string
            UpdatedById:
              description: |-
                The ID of the last user to update the object.

                **Character limit**: 32


                **Values**: automatically generated 
              type: string
            UpdatedDate:
              description: |2-
                 The date when the object was last updated.


                **Character limit**: 29


                **Values**: automatically generated 
              format: date-time
              type: string
            UsageRecordRatingOption:
              description: |2-
                 Determines how Zuora processes usage records for per-unit usage charges.

                **Character limit**: 18


                **Values**: automatically generated 
              type: string
            UseDiscountSpecificAccountingCode:
              description: |2-
                 Determines whether to define a new accounting code for the new discount charge.


                **Character limit**: 5


                **Values**: inherited from `ProductRatePlanCharge.UseDiscountSpecificAccountingCode` 
              type: boolean
            Version:
              description: |2-
                 The version of the rate plan charge. Each time a charge is amended, Zuora creates a new version of the rate plan charge.

                **Character limit**: 5


                **Values**: automatically generated 
              format: int64
              type: integer
            WeeklyBillCycleDay:
              description: |2
                 Specifies which day of the week as the bill cycle day (BCD) for the charge.
                This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).




                **Values**: one of the following:

                - `Sunday`
                - `Monday`
                - `Tuesday`
                - `Wednesday`
                - `Thursday`
                - `Friday`
                - `Saturday`
              type: string
          required:
            - ProductRatePlanChargeId
          type: object
        - $ref: "#/components/schemas/RatePlanChargeObjectCustomFields"
      description: ""
      title: RatePlanCharge
    RatePlanChargeObjectCustomFields:
      additionalProperties:
        description: |
          Custom fields of the Rate Plan Charge object. The name of each custom field has the form <code>*customField*__c</code>. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
      description: |
        Container for custom fields of a Rate Plan Charge object.
      title: ratePlanChargeFieldsCustom
      type: object
    RatePlanChargeTier:
      properties:
        CreatedById:
          description: |-
            The ID of the Zuora user who created the RatePlanChargeTier object.

            **Character limit**: 32


            **Values**: automatically generated 
          type: string
        CreatedDate:
          description: |2-
             The date when the RatePlanChargeTier object was created.


            **Character limit**: 29


            **Values**: automatically generated 
          format: date-time
          type: string
        EndingUnit:
          description: |2-
             The end number of a range of units for the tier. This field is only required if the charge mode is `Tiered Pricing` or `Tierred with Overage Pricing`.


            **Character limit**: 16


            **Values**: any positive decimal value 
          format: double
          type: number
        IsOveragePrice:
          description: |2-
             Indicates if the price is an overage price. An overage occurs when usage surpasses the last defined tier. This field is applicable only to tier pricing and volume pricing models.



            **Values**: true, false 
          type: boolean
        Price:
          description: |2-
             The price of the tier if the charge is a flat fee, or the price of each unit in the tier if the change model is tiered pricing.


            **Character limit**: 16


            **Values**: any positive decimal value 
          format: double
          type: number
        PriceFormat:
          description: |2-
             Indicates if the price is a flat fee or is per unit.


            **Character limit**: 8


            **Values**: `FlatFee`, `PerUnit` 
          enum:
            - FlatFee
            - PerUnit
          type: string
        RatePlanChargeId:
          description: |2-
             The ID of the subscription or amendment rate plan charge associated with this tier. You can't create an unassociated tier.


            **Character limit**: 32


            **Values**: inherited from `RatePlanCharge`.`Id` 
          type: string
        StartingUnit:
          description: |2-
             The start number of a range of units for the tier. This field is only required if the charge mode is `Tiered Pricing` or `Tierred with Overage Pricing`.


            **Character limit**: 16


            **Values**: any positive decimal value 
          format: double
          type: number
        Tier:
          description: |2-
             A unique number that identifies the tier that the price applies to.


            **Character limit**: 20


            **Values**: automatically generated 
          format: int32
          type: integer
        UpdatedById:
          description: |-
            The ID of the last user to update the object.

            **Character limit**: 32


            **Values**: automatically generated 
          type: string
        UpdatedDate:
          description: |2-
             The date when the object was last updated.


            **Character limit**: 29


            **Values**: automatically generated 
          format: date-time
          type: string
      required:
        - RatePlanChargeId
      type: object
    RatePlanData:
      properties:
        RatePlan:
          $ref: "#/components/schemas/RatePlanDataRatePlan"
        RatePlanChargeData:
          description: ""
          items:
            $ref: "#/components/schemas/RatePlanChargeData"
          type: array
        SubscriptionProductFeatureList:
          description: ""
          properties:
            SubscriptionProductFeature:
              description: ""
              items:
                $ref: "#/components/schemas/SubscriptionProductFeature"
              type: array
          type: object
      required:
        - RatePlan
      type: object
    RatePlanDataRatePlan:
      allOf:
        - properties:
            AmendmentId:
              description: |2-
                 The ID of the amendment associated with the rate plan. This field only applies to amendment rate plans.


                **Character limit**: 32


                **Values**: a valid amendment ID 
              type: string
            AmendmentSubscriptionRatePlanId:
              description: |-
                The ID of the subscription rate plan modified by the amendment. This field only applies to amendment rate plans.

                **Character limit**: 32


                **Values**: a valid rate plan ID 
              type: string
            AmendmentType:
              description: |-
                The type of amendment associated with the rate plan. This field only applies to amendment rate plans.

                **Character limit**: 18


                **Values**: inherited from `Amendment.Type` 
              type: string
            CreatedById:
              description: |-
                The ID of the Zuora user who created the RatePlan object.

                **Character limit**: 32


                **Values**: automatically generated 
              type: string
            CreatedDate:
              description: |-
                The date when the `RatePlan` object was last updated.

                **Character limit**: 29


                **Values**: automatically generated 
              format: date-time
              type: string
            Name:
              description: |-
                The name of the rate plan. Leave this null in a subscribe
                call to inherited the `ProductRatePlan.Name` field value.

                **Character limit**: 100


                **Values**: a string of 100 characters or fewer or inherited from ProductRatePlan.Name 
              type: string
            ProductRatePlanId:
              description: |-
                The ID of the associated product rate plan.

                **Character limit**: 32


                **Values**: a valid product rate plan ID 
              type: string
            SubscriptionId:
              description: |-
                The ID of the subscription that the rate plan belongs to.

                **Character limit**: 32


                **Values**: a valid subscription ID 
              type: string
            UpdatedById:
              description: |2-
                 The ID of the user who last updated the rate plan.


                **Character limit**: 32


                **Values**: automatically generated 
              type: string
            UpdatedDate:
              description: |2-
                 The date when the rate plan was last updated.


                **Character limit**: 29


                **Values**: automatically generated 
              format: date-time
              type: string
          required:
            - ProductRatePlanId
          type: object
        - $ref: "#/components/schemas/RatePlanObjectCustomFields"
      description: ""
      title: RatePlan
    RatePlanObjectCustomFields:
      additionalProperties:
        description: |
          Custom fields of the Rate Plan object. The name of each custom field has the form <code>*customField*__c</code>. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
      description: |
        Container for custom fields of a Rate Plan object.
      title: ratePlanFieldsCustom
      type: object
    RatePlanOverride:
      description: |
        Rate plan associated with a subscription.
      properties:
        chargeOverrides:
          description: |
            List of charges associated with the rate plan.
          items:
            $ref: "#/components/schemas/ChargeOverride"
          type: array
        customFields:
          $ref: "#/components/schemas/RatePlanObjectCustomFields"
        newRatePlanId:
          description: |
            Internal identifier of the rate plan.
          type: string
        productRatePlanId:
          description: |
            Internal identifier of the product rate plan that the rate plan is based on.
          type: string
        uniqueToken:
          description: |
            Unique identifier for the rate plan. This identifier enables you to refer to the rate plan before the rate plan has an internal identifier in Zuora.

            For instance, suppose that you want to use a single order to add a product to a subscription and later update the same product. When you add the product, you can set a unique identifier for the rate plan. Then when you update the product, you can use the same unique identifier to specify which rate plan to modify.
          maxLength: 50
          type: string
      required:
        - productRatePlanId
      title: ratePlan
      type: object
    RatePlanOverrideForEvergreen:
      description: |
        Rate plan associated with a subscription.
      properties:
        chargeOverrides:
          description: |
            List of charges associated with the rate plan.
          items:
            $ref: "#/components/schemas/ChargeOverrideForEvergreen"
          type: array
        customFields:
          $ref: "#/components/schemas/RatePlanObjectCustomFields"
        newRatePlanId:
          description: |
            Internal identifier of the rate plan.
          type: string
        productRatePlanId:
          description: |
            Internal identifier of the product rate plan that the rate plan is based on.
          type: string
        uniqueToken:
          description: |
            Unique identifier for the rate plan. This identifier enables you to refer to the rate plan before the rate plan has an internal identifier in Zuora.

            For instance, suppose that you want to use a single order to add a product to a subscription and later update the same product. When you add the product, you can set a unique identifier for the rate plan. Then when you update the product, you can use the same unique identifier to specify which rate plan to modify.
          maxLength: 50
          type: string
      required:
        - productRatePlanId
      title: ratePlan
      type: object
    RatePlanUpdate:
      description: |
        Information about an order action of type `UpdateProduct`.
      properties:
        chargeUpdates:
          items:
            $ref: "#/components/schemas/ChargeUpdate"
          type: array
        customFields:
          $ref: "#/components/schemas/RatePlanObjectCustomFields"
        newRatePlanId:
          description: |
            Internal identifier of the updated rate plan in the new subscription version.
          type: string
        ratePlanId:
          description: |
            Internal identifier of the rate plan that was updated.
          type: string
        specificUpdateDate:
          description: |
            
            The date when the Update Product order action takes effect. This field is only applicable if there is already a future-dated Update Product order action on the subscription. The format of the date is yyyy-mm-dd.

            See [Update a Product on Subscription with Future-dated Updates](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AC_Orders_Tutorials/C_Update_a_Product_in_a_Subscription/Update_a_Product_on_Subscription_with_Future-dated_Updates) for more information about this feature.
          format: date
          type: string
        uniqueToken:
          description: |
            A unique string to represent the rate plan charge in the order. The unique token is used to perform multiple actions against a newly added rate plan. For example, if you want to add and update a product in the same order, you would assign a unique token to the product rate plan when added and use that token in future order actions.
          type: string
      title: updateProduct
      type: object
    RatePlanUpdateForEvergreen:
      description: |
        Information about an order action of type `UpdateProduct`.
      properties:
        chargeUpdates:
          items:
            $ref: "#/components/schemas/ChargeUpdateForEvergreen"
          type: array
        customFields:
          $ref: "#/components/schemas/RatePlanObjectCustomFields"
        newRatePlanId:
          description: |
            Internal identifier of the updated rate plan in the new subscription version.
          type: string
        ratePlanId:
          description: |
            Internal identifier of the rate plan that was updated.
          type: string
        specificUpdateDate:
          description: |
            
            The date when the Update Product order action takes effect. This field is only applicable if there is already a future-dated Update Product order action on the subscription. The format of the date is yyyy-mm-dd.

            See [Update a Product on Subscription with Future-dated Updates](https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AC_Orders_Tutorials/C_Update_a_Product_in_a_Subscription/Update_a_Product_on_Subscription_with_Future-dated_Updates) for more information about this feature.
          format: date
          type: string
        uniqueToken:
          description: |
            A unique string to represent the rate plan charge in the order. The unique token is used to perform multiple actions against a newly added rate plan. For example, if you want to add and update a product in the same order, you would assign a unique token to the product rate plan when added and use that token in future order actions.
          type: string
      title: updateProduct
      type: object
    RecurringFlatFeePricingOverride:
      allOf:
        - $ref: "#/components/schemas/PriceChangeParams"
        - properties:
            listPrice:
              description: |
                Price of the charge in each recurring period.
              type: number
            listPriceBase:
              description: |
                Specifies the duration of each recurring period.
              enum:
                - Per_Billing_Period
                - Per_Month
                - Per_Week
              type: string
          type: object
      description: |
        Pricing information about a recurring charge that uses the "flat fee" charge model. In this charge model, the charge has a fixed price.
      title: recurringFlatFee
    RecurringFlatFeePricingUpdate:
      allOf:
        - $ref: "#/components/schemas/PriceChangeParams"
        - properties:
            listPrice:
              type: number
          type: object
    RecurringPerUnitPricingOverride:
      allOf:
        - $ref: "#/components/schemas/PriceChangeParams"
        - properties:
            listPrice:
              description: |
                Per-unit price of the charge in each recurring period.
              type: number
            listPriceBase:
              description: |
                Specifies the duration of each recurring period.
              enum:
                - Per_Billing_Period
                - Per_Month
                - Per_Week
              type: string
            quantity:
              description: |
                Number of units purchased.
              minimum: 0
              type: number
          type: object
      description: |
        Pricing information about a recurring charge that uses the "per unit" charge model. In this charge model, the charge has a fixed price per unit purchased.
      title: recurringPerUnit
    RecurringPerUnitPricingUpdate:
      allOf:
        - $ref: "#/components/schemas/PriceChangeParams"
        - properties:
            listPrice:
              type: number
            quantity:
              minimum: 0
              type: number
          type: object
    RecurringTieredPricingOverride:
      allOf:
        - $ref: "#/components/schemas/PriceChangeParams"
        - properties:
            listPriceBase:
              description: |
                Specifies the duration of each recurring period.
              enum:
                - Per_Billing_Period
                - Per_Month
                - Per_Week
              type: string
            quantity:
              description: |
                Number of units purchased.
              minimum: 0
              type: number
            tiers:
              description: |
                List of cumulative pricing tiers in the charge.
              items:
                $ref: "#/components/schemas/ChargeTier"
              type: array
          type: object
      description: |
        Pricing information about a recurring charge that uses the "tiered pricing" charge model. In this charge model, the charge has cumulative pricing tiers that become effective as units are purchased.
      title: recurringTiered
    RecurringTieredPricingUpdate:
      allOf:
        - $ref: "#/components/schemas/PriceChangeParams"
        - properties:
            quantity:
              minimum: 0
              type: number
            tiers:
              items:
                $ref: "#/components/schemas/ChargeTier"
              type: array
          type: object
    RecurringVolumePricingOverride:
      allOf:
        - $ref: "#/components/schemas/PriceChangeParams"
        - properties:
            listPriceBase:
              description: |
                Specifies the duration of each recurring period.
              enum:
                - Per_Billing_Period
                - Per_Month
                - Per_Week
              type: string
            quantity:
              description: |
                Number of units purchased.
              minimum: 0
              type: number
            tiers:
              description: |
                List of variable pricing tiers in the charge.
              items:
                $ref: "#/components/schemas/ChargeTier"
              type: array
          type: object
      description: |
        Pricing information about a recurring charge that uses the "volume pricing" charge model. In this charge model, the charge has a variable price per unit, depending on how many units are purchased.
      title: recurringVolume
    RecurringVolumePricingUpdate:
      allOf:
        - $ref: "#/components/schemas/PriceChangeParams"
        - properties:
            quantity:
              minimum: 0
              type: number
            tiers:
              items:
                $ref: "#/components/schemas/ChargeTier"
              type: array
          type: object
    RefundCreditMemoItemType:
      properties:
        amount:
          description: |
            The amount of the refund on the specific item.
          format: double
          type: number
        creditMemoItemId:
          description: |
            The ID of the credit memo item that is refunded.
          type: string
        creditTaxItemId:
          description: |
            The ID of the credit memo taxation item that is refunded.
          type: string
      required:
        - amount
      title: items
      type: object
    RefundEntityPrefix:
      description: |
        Container for the prefix and starting number of refunds.
      properties:
        prefix:
          description: |
            The prefix of refunds.
          example: R-
          type: string
        startNumber:
          description: |
            The starting number of refunds.
          example: 10
          type: integer
      title: refund
      type: object
    RefundInvoicePayment:
      properties:
        InvoiceId:
          description: |
            The ID of the invoice that the payment is applied to.
          type: string
        RefundAmount:
          description: |
            The amount of the payment that is refunded. The value of this field is `0` if no refund is made against the payment.
          format: decimal
          type: string
      required:
        - InvoiceId
        - RefundAmount
      type: object
    RefundObjectCustomFields:
      additionalProperties:
        description: |
          Custom fields of the Refund object. The name of each custom field has the form <code>*customField*__c</code>. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
      description: |
        Container for custom fields of a Refund object.
      title: refundFieldsCustom
      type: object
    RefundObjectNSFields:
      description: |
        Container for Refund fields provided by the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
      properties:
        IntegrationId__NS:
          description: |
            ID of the corresponding object in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        IntegrationStatus__NS:
          description: |
            Status of the refund's synchronization with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        Origin__NS:
          description: |
            Origin of the corresponding object in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        SyncDate__NS:
          description: |
            Date when the refund was synchronized with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        SynctoNetSuite__NS:
          description: |
            Specifies whether the refund should be synchronized with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
      title: refundFieldsNS
      type: object
    RefundPartResponseType:
      properties:
        amount:
          description: |
            The amount of the refund part.
          format: double
          type: number
        createdById:
          description: |
            The ID of the Zuora user who created the refund part.
          type: string
        createdDate:
          description: |
            The date and time when the refund part was created, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-01 15:31:10.
          format: date-time
          type: string
        creditMemoId:
          description: |
            The ID of the credit memo associated with the refund part.
          type: string
        id:
          description: |
            The ID of the refund part.
          type: string
        paymentId:
          description: |
            The ID of the payment associated with the refund part.
          type: string
        success:
          description: Returns `true` if the request was processed successfully.
          type: boolean
        updatedById:
          description: |
            The ID of the Zuora user who last updated the refund part.
          type: string
        updatedDate:
          description: |
            The date and time when the refund part was last updated, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-02 15:36:10.
          format: date-time
          type: string
      type: object
    RefundPartResponseTypewithSuccess:
      properties:
        amount:
          description: |
            The amount of the refund part.
          format: double
          type: number
        createdById:
          description: |
            The ID of the Zuora user who created the refund part.
          type: string
        createdDate:
          description: |
            The date and time when the refund part was created, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-01 15:31:10.
          format: date-time
          type: string
        creditMemoId:
          description: |
            The ID of the credit memo associated with the refund part.
          type: string
        id:
          description: |
            The ID of the refund part.
          type: string
        paymentId:
          description: |
            The ID of the payment associated with the refund part.
          type: string
        updatedById:
          description: |
            The ID of the Zuora user who last updated the refund part.
          type: string
        updatedDate:
          description: |
            The date and time when the refund part was last updated, in `yyyy-mm-dd hh:mm:ss` format. For example, 2017-03-02 15:36:10.
          format: date-time
          type: string
      title: parts
      type: object
    RemoveProduct:
      description: |
        Information about an order action of type `RemoveProduct`.
      properties:
        ratePlanId:
          description: |
            Internal identifier of the rate plan to remove.
          type: string
        uniqueToken:
          description: A unique string to represent the rate plan charge in the order. The unique token is used to perform multiple actions against a newly added rate plan. For example, if you want to add and update a product in the same order, you would assign a unique token to the product rate plan when added and use that token in future order actions.A unique string in the order to represent the rate plan.
          type: string
      title: removeProduct
      type: object
    RenewalTerm:
      properties:
        period:
          description: |
            Duration of the renewal term in months, years, days, or weeks, depending on the value of the `periodType` field.
          type: integer
        periodType:
          description: |
            Unit of time that the renewal term is measured in.
          enum:
            - Month
            - Year
            - Day
            - Week
          type: string
      type: object
    RevenueEventItemObjectCustomFields:
      additionalProperties:
        description: |
          Custom fields of the Revenue Event Item object. The name of each custom field has the form <code>*customField*__c</code>. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
      description: |
        Container for custom fields of a Revenue Event Item object.
      title: revenueEventItemFieldsCustom
      type: object
    RevenueEventObjectCustomFields:
      additionalProperties:
        description: |
          Custom fields of the Revenue Event object. The name of each custom field has the form <code>*customField*__c</code>. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
      description: |
        Container for custom fields of a Revenue Event object.
      title: revenueEventFieldsCustom
      type: object
    RevenueScheduleItemObjectCustomFields:
      additionalProperties:
        description: |
          Custom fields of the Revenue Schedule Item object. The name of each custom field has the form <code>*customField*__c</code>. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
      description: |
        Container for custom fields of a Revenue Schedule Item object.
      title: revenueScheduleItemFieldsCustom
      type: object
    RevenueScheduleItemType:
      allOf:
        - properties:
            accountingPeriodName:
              description: |
                Name of the accounting period. The open-ended accounting period is named `Open-Ended`.
              type: string
          required:
            - accountingPeriodName
          type: object
        - $ref: "#/components/schemas/RevenueScheduleItemObjectCustomFields"
      title: revenueItems
    RevenueScheduleObjectCustomFields:
      additionalProperties:
        description: |
          Custom fields of the Revenue Schedule object. The name of each custom field has the form <code>*customField*__c</code>. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
      description: |
        Container for custom fields of a Revenue Schedule object.
      title: revenueScheduleFieldsCustom
      type: object
    RevproAccountingCodes:
      example:
        adjustmentLiabilityAccount: adjustL-1
        adjustmentRevenueAccount: adjustRev-1
        contractAssetAccount: CA-2
        contractLiabilityAccount: CL-2
        productRatePlanChargeId: 2c92c0f962470b8101624b869fcd45fc
        recognizedRevenueAccount: ContractRevRec-1
        unbilledReceivablesAccount: unbilledR-1
      properties:
        adjustmentLiabilityAccount:
          description: The name of the account where the Account Type is "Adjustment Liability".
          maxLength: 100
          type: string
        adjustmentRevenueAccount:
          description: The name of the account where the Account Type is "Adjustment Revenue".
          maxLength: 100
          type: string
        contractAssetAccount:
          description: The name of the account where the Account Type is "Contract Asset".
          maxLength: 100
          type: string
        contractLiabilityAccount:
          description: The name of the account where the Account Type is "Contract Liability".
          maxLength: 100
          type: string
        productRatePlanChargeId:
          description: The ID of your product rate plan charge.
          type: string
        recognizedRevenueAccount:
          description: The name of the account where the Account Type is "Recognized Revenue".
          maxLength: 100
          type: string
        unbilledReceivablesAccount:
          description: The name of the account where the Account Type is "Unbilled Receivables".
          maxLength: 100
          type: string
      required:
        - productRatePlanChargeId
        - contractAssetAccount
        - contractLiabilityAccount
        - unbilledReceivablesAccount
        - adjustmentLiabilityAccount
        - recognizedRevenueAccount
        - adjustmentRevenueAccount
      type: object
    SaveResult:
      properties:
        Errors:
          description: ""
          items:
            $ref: "#/components/schemas/ActionsErrorResponse"
          type: array
        Id:
          description: ""
          type: string
        Success:
          description: ""
          type: boolean
      type: object
    SettingItemHttpOperation:
      properties:
        method:
          description: One of the HTTP methods supported by the setting endpoint, for example, GET,PUT,POST or DELETE.
          enum:
            - GET
            - HEAD
            - POST
            - PUT
            - PATCH
            - DELETE
            - OPTIONS
            - TRACE
          type: string
        parameters:
          description: An array of paramters required by this operation.
          items:
            $ref: "#/components/schemas/SettingItemHttpRequestParameter"
          type: array
        requestType:
          description: JSON Schema for the request body of this operation.
          type: object
        responseType:
          description: JSON Schema for the response body of this operation.
          type: object
        url:
          description: The endpoint url of the operation method. For example, `/settings/billing-rules`.
          type: string
      title: httpOperation
      type: object
    SettingItemHttpRequestParameter:
      properties:
        description:
          description: The description of the paramter.
          type: string
        name:
          description: The name of the parameter.
          type: string
      title: httpRequestParameter
      type: object
    SettingItemWithOperationsInformation:
      properties:
        context:
          description: The context where this setting item is effective.
          enum:
            - Tenant
            - Entity
            - User
            - None
          type: string
        description:
          description: The description of the setting item as you see from Zuora UI.
          type: string
        httpOperations:
          description: An array of HTTP operation methods that are supported on this setting endpoint.
          items:
            $ref: "#/components/schemas/SettingItemHttpOperation"
          type: array
        key:
          description: The unique key to distinguish the setting item.
          type: string
        pathPattern:
          description: The path pattern of the setting endpoint, relative to `/settings`. For example, `/billing-rules`.
          type: string
      title: settingItem
      type: object
    SettingValueRequest:
      properties:
        body:
          $ref: "#/components/schemas/BodyInSettingValueRequest"
        children:
          description: |
            An array of requests that can only be executed after its parent request has been executed successfully.
          items:
            $ref: "#/components/schemas/ChildrenSettingValueRequest"
          type: array
        id:
          description: |
            The id of the request. You can set it to any string. It must be unique within the whole batch.
          type: string
        method:
          description: |
            One of the HTTP methods supported by the setting endpoint, for example, GET,PUT,POST or DELETE.
          enum:
            - GET
            - HEAD
            - POST
            - PUT
            - PATCH
            - DELETE
            - OPTIONS
            - TRACE
          type: string
        url:
          description: |
            The relative URL of the setting. It is the same as in the `pathPattern` field in the response body of [Listing all Settings](https://www.zuora.com/developer/api-reference/#operation/GET_ListAllSettings). For example, `/billing-rules`.
          type: string
      title: settingsRequest
      type: object
    SettingValueResponse:
      properties:
        body:
          $ref: "#/components/schemas/BodyInSettingValueReponse"
        errorMessages:
          description: |
            An array of error messages if errors occur when executing the request.
          items:
            type: string
          type: array
        status:
          description: |
            User readable response status, for example, 502 BAD_GATEWAY.
          type: string
      title: settingsValueResponse
      type: object
    SettingValueResponseWrapper:
      properties:
        id:
          description: |
            The Id of the corresponding request.
          type: string
        method:
          description: |
            The HTTP method. It is the same as that of the corresponding request.
          enum:
            - GET
            - HEAD
            - POST
            - PUT
            - PATCH
            - DELETE
            - OPTIONS
            - TRACE
          type: string
        response:
          $ref: "#/components/schemas/SettingValueResponse"
        url:
          description: |
            The url as specified in the corresponding request.
          type: string
      title: settingsValueResponseWrapper
      type: object
    SettingsBatchRequest:
      example:
        requests:
          - id: "1"
            method: GET
            url: /billing-rules
          - id: "2"
            method: GET
            url: /accounting-rules
      properties:
        requests:
          items:
            $ref: "#/components/schemas/SettingValueRequest"
          type: array
      type: object
    SettingsBatchResponse:
      properties:
        responses:
          items:
            $ref: "#/components/schemas/SettingValueResponseWrapper"
          type: array
      title: batchResponse
      type: object
    SoldToContact:
      allOf:
        - description: |
            Contact details associated with an account.
          properties:
            address1:
              description: |
                First line of the contact's address. This is often a street address or a business name.
              maxLength: 255
              type: string
            address2:
              description: |
                Second line of the contact's address.
              maxLength: 255
              type: string
            city:
              description: |
                City of the contact's address.
              maxLength: 40
              type: string
            country:
              description: |
                Country; must be a valid country name or abbreviation. If using Zuora Tax, you must specify a country in the sold-to contact to calculate tax. A bill-to contact may be used if no sold-to contact is provided.
              maxLength: 64
              type: string
            county:
              description: |
                County of the contact's address.
              maxLength: 32
              type: string
            fax:
              description: |
                Fax number of the contact.
              maxLength: 40
              type: string
            firstName:
              description: |
                First name of the contact.
              maxLength: 100
              type: string
            homePhone:
              description: |
                Home phone number of the contact.
              maxLength: 40
              type: string
            lastName:
              description: |
                Last name of the contact.
              maxLength: 100
              type: string
            mobilePhone:
              description: |
                Mobile phone number of the contact.
              maxLength: 40
              type: string
            nickname:
              description: |
                Nickname of the contact.
              maxLength: 100
              type: string
            otherPhone:
              description: |
                Additional phone number of the contact. Use the `otherPhoneType` field to specify the type of phone number.
              maxLength: 40
              type: string
            otherPhoneType:
              description: |
                Specifies the type of phone number in the `otherPhone` field.
              enum:
                - Work
                - Mobile
                - Home
                - Other
              type: string
            personalEmail:
              description: |
                Personal email address of the contact.
              format: email
              maxLength: 80
              type: string
            postalCode:
              description: |
                ZIP code or other postal code of the contact's address.
              maxLength: 20
              type: string
            state:
              description: |
                State or province of the contact's address.
              maxLength: 40
              type: string
            taxRegion:
              description: |
                Region defined in your taxation rules. Only applicable if you use Zuora Tax.
              maxLength: 32
              type: string
            workEmail:
              description: |
                Business email address of the contact.
              format: email
              maxLength: 80
              type: string
            workPhone:
              description: |
                Business phone number of the contact.
              maxLength: 40
              type: string
          required:
            - firstName
            - lastName
          type: object
        - $ref: "#/components/schemas/ContactObjectCustomFields"
    SoldToContactPostOrder:
      allOf:
        - description: |
            Contact details associated with an account.
          properties:
            address1:
              description: |
                First line of the contact's address. This is often a street address or a business name.
              maxLength: 255
              type: string
            address2:
              description: |
                Second line of the contact's address.
              maxLength: 255
              type: string
            city:
              description: |
                City of the contact's address.
              maxLength: 40
              type: string
            contactDescription:
              description: |
                A description for the contact.          
              maxLength: 100
              type: string
            country:
              description: |
                Country; must be a valid country name or abbreviation. If using Zuora Tax, you must specify a country in the sold-to contact to calculate tax. A bill-to contact may be used if no sold-to contact is provided.
              maxLength: 64
              type: string
            county:
              description: |
                County of the contact's address.
              maxLength: 32
              type: string
            fax:
              description: |
                Fax number of the contact.
              maxLength: 40
              type: string
            firstName:
              description: |
                First name of the contact.
              maxLength: 100
              type: string
            homePhone:
              description: |
                Home phone number of the contact.
              maxLength: 40
              type: string
            lastName:
              description: |
                Last name of the contact.
              maxLength: 100
              type: string
            mobilePhone:
              description: |
                Mobile phone number of the contact.
              maxLength: 40
              type: string
            nickname:
              description: |
                Nickname of the contact.
              maxLength: 100
              type: string
            otherPhone:
              description: |
                Additional phone number of the contact. Use the `otherPhoneType` field to specify the type of phone number.
              maxLength: 40
              type: string
            otherPhoneType:
              description: |
                Specifies the type of phone number in the `otherPhone` field.
              enum:
                - Work
                - Mobile
                - Home
                - Other
              type: string
            personalEmail:
              description: |
                Personal email address of the contact.
              format: email
              maxLength: 80
              type: string
            postalCode:
              description: |
                ZIP code or other postal code of the contact's address.
              maxLength: 20
              type: string
            state:
              description: |
                State or province of the contact's address.
              maxLength: 40
              type: string
            taxRegion:
              description: |
                Region defined in your taxation rules. Only applicable if you use Zuora Tax.
              maxLength: 32
              type: string
            workEmail:
              description: |
                Business email address of the contact.
              format: email
              maxLength: 80
              type: string
            workPhone:
              description: |
                Business phone number of the contact.
              maxLength: 40
              type: string
          required:
            - firstName
            - lastName
          type: object
        - $ref: "#/components/schemas/ContactObjectCustomFields"
    SubmitDataQueryRequest:
      example:
        compression: NONE
        output:
          target: S3
        outputFormat: JSON
        query: SELECT accountnumber, balance FROM Account WHERE Account.balance > 100
      properties:
        columnSeparator:
          description: |
            The column separator. Only applicable if the `outputFormat` is `DSV`.
          type: string
        compression:
          description: |
            Specifies whether Zuora compresses the query results.
          enum:
            - NONE
            - GZIP
            - ZIP
          type: string
        encryptionKey:
          description: |
            Base-64 encoded public key of an RSA key-pair. 

            Note that Data Query only supports 1024-bit RSA keys.

            If you set this field, Zuora encrypts the query results using the provided public key. You must use the corresponding private key to decrypt the query results.
          format: byte
          type: string
        output:
          description: |
            Additional information about the query results.
          properties:
            target:
              description: |
                Set this field to `S3`.
              enum:
                - S3
              type: string
          required:
            - target
          type: object
        outputFormat:
          description: |
            Specifies the format of the query results.

            * `JSON` - Each row in the query results will be a JSON object. The format of the query result file is [JSON Lines](http://jsonlines.org/).
            * `CSV` - Each row in the query results will be a comma-separated list of values.
            * `TSV` - Each row in the query results will be a tab-separated list of values.
            * `DSV` - Pass any character as your custom delimiter into the `columnSeparator` field.
          enum:
            - JSON
            - CSV
            - TSV
            - DSV
          type: string
        query:
          description: |
            The query to perform. See [SQL Queries in Data Query](https://knowledgecenter.zuora.com/DC_Developers/BA_Data_Query/BA_SQL_Queries_in_Data_Query) for more information.
          type: string
        readDeleted:
          default: false
          description: |
            Indicates whether the query will retrieve only the deleted record. If `readDeleted` is set to `false` or it is not included in the request body, the query will retrieve only the non-deleted records. If it is set to `true`, only the deleted records will be retrieved.

            Note that Data Query is subject to Zuora Data Retention Policy. The retention period of deleted data is 30 days. You can only retrieve deleted data for 30 days through Data Query.
          type: boolean
        sourceData:
          description: |
            Specifiy that data queries run against the live transactional databases at Zuora (Data Query Live), or run against the optimized, replicated database at 12 hours freshness for high volume extraction (Data Query Unlimited).

            **Note**: Data Query Unlimited is an Early Adopter feature.  If you want to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/). 

            * `DATAHUB` - Data queries run against the optimized, replicated database at 12 hours freshness for high volume extraction (Data Query Unlimited). Data Query Unlimited is an Early Adopter feature.  If you want to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/). 
            * `LIVE` - Data queries run against the live transactional databases at Zuora (Data Query Live).

            The default value is `LIVE`.
          enum:
            - DATAHUB
            - LIVE
          type: string
        useIndexJoin:
          description: Indicates whether to use Index Join. Index join is useful when you have a specific reference value in your WHERE clause to index another large table by. See [Use Index Join](https://knowledgecenter.zuora.com/DC_Developers/BA_Data_Query/Best_practices_of_Data_Query#Use_Index_Join) for more information.
          type: boolean
      required:
        - query
        - outputFormat
        - compression
        - output
      type: object
    SubmitDataQueryResponse:
      properties:
        data:
          $ref: "#/components/schemas/DataQueryJob"
      type: object
    SubscribeRequest:
      properties:
        Account:
          $ref: "#/components/schemas/SubscribeRequestAccount"
        BillToContact:
          $ref: "#/components/schemas/SubscribeRequestBillToContact"
        PaymentMethod:
          description: |2-
             This is the object defining the payment details for the Account. The Account will be updated with this payment as the default payment method.
            Use this field if you are associating an electronic payment method with the account. A payment gateway must be enabled.
            Values: A valid electronic PaymentMethod.
          properties:
            AccountId:
              description: " The ID of the customer account associated with this payment method. "
              type: string
            AchAbaCode:
              description: |2-
                 The nine-digit routing number or ABA number used by banks.
                This field is only required if the `Type` field is set to `ACH`.


                **Character limit**: 9


                **Values**: a string of 9 characters or fewer 
              type: string
            AchAccountName:
              description: |2-
                 The name of the account holder, which can be either a person or a company.
                This field is only required if the `Type` field is set to `ACH`.


                **Character limit**: 70


                **Values**: a string of 70 characters or fewer 
              type: string
            AchAccountNumber:
              description: |2-
                 The bank account number associated with the ACH payment.
                This field is only required if the `Type` field is set to `ACH`.


                **Character limit**: 30


                **Values**: a string of 30 numeric characters or fewer 
              type: string
            AchAccountNumberMask:
              description: |2-
                 This is a masked displayable version of the ACH account number, used for security purposes. For example: `XXXXXXXXX54321`. Use this field for ACH payment methods.


                **Character limit**: 32


                **Values**: automatically generated 
              type: string
            AchAccountType:
              description: |2
                 The type of bank account associated with the ACH payment.
                This field is only required if the `Type` field is set to `ACH`.


                **Character limit**: 16


                **Values**:

                - `BusinessChecking`
                - `Checking`
                - `Saving`
              type: string
            AchAddress1:
              description: |2-
                 Line 1 for the ACH address. Required on create for the Vantiv payment gateway. Optional for other gateways.
                **Character limit:** **Values:** an address 
              type: string
            AchAddress2:
              description: |2-
                 Line 2 for the ACH address. Required on create for the Vantiv payment gateway. Optional for other gateways.
                **Character limit:** **Values:** an address 
              type: string
            AchBankName:
              description: |2-
                 The name of the bank where the ACH payment account is held. Use this field for ACH payment methods.


                **Character limit**: 70


                **Values**: a string of 70 characters or fewer 
              type: string
            Active:
              description: |2-
                 Specifies whether a payment method is available in Zuora. The default value is `false`.


                **Character limit**: 5


                **Values**: `true`, `false` 
              type: boolean
            BankBranchCode:
              description: |2-
                 The branch code of the bank used for direct debit. Use this field for direct debit payment methods.


                **Character limit**: 10


                **Values**:  string of 10 characters or fewer 
              type: string
            BankCheckDigit:
              description: |-
                The check digit in the international bank account number, which confirms the validity of the account. Use this field for direct debit payment methods.

                **Character limit**: 4


                **Values**:  string of 4 characters or fewer 
              type: string
            BankCity:
              description: |2-
                 The city of the direct debit bank. Use this field for direct debit payment methods.


                **Character limit**:70


                **Values**:  string of 70 characters or fewer 
              type: string
            BankCode:
              description: |2-
                 The sort code or number that identifies the bank. This is also known as the sort code. This field is required for direct debit payment methods.


                **Character limit**: 18


                **Values**:  string of 18 characters or fewer 
              type: string
            BankIdentificationNumber:
              description: |2-
                 The first six digits of the payment method's number, such as the credit card number or account number. Banks use this number to identify a payment method.


                **Character limit**: 6


                **Values**:  string of 6 characters or fewer 
              type: string
            BankName:
              description: |2-
                 The name of the direct debit bank. Use this field for direct debit payment methods.


                **Character limit**:80


                **Values**:  string of 80 characters or fewer 
              type: string
            BankPostalCode:
              description: |2-
                 The zip code or postal code of the direct debit bank. Use this field for direct debit payment methods.


                **Character limit**:20


                **Values**:  string of 20 characters or fewer 
              type: string
            BankStreetName:
              description: |2-
                 The name of the street of the direct debit bank. Use this field for direct debit payment methods.


                **Character limit**:60


                **Values**:  string of 60 characters or fewer 
              type: string
            BankStreetNumber:
              description: |2-
                 The number of the direct debit bank. Use this field for direct debit payment methods.


                **Character limit**:10


                **Values**:  string of 10 characters or fewer 
              type: string
            BankTransferAccountName:
              description: |2-
                 The name on the direct debit bank account. Use this field for direct debit payment methods.


                **Character limit**: 60


                **Values**:  string of 60 characters or fewer 
              type: string
            BankTransferAccountNumber:
              description: |2-
                 The number of the customer's bank account.
                This field is only required if the `Type` field is set to `BankTransfer`.


                **Character limit**:30


                **Values**:  string of 30 characters or fewer 
              type: string
            BankTransferAccountNumberMask:
              description: |2-
                 This is a masked displayable version of the ACH account number, used for security purposes. For example: `XXXXXXXXX54321`.


                **Character limit**: 32


                **Values**: automatically generated 
              type: string
            BankTransferAccountType:
              description: |2-
                 The type of the customer's bank account. Use this field for direct debit payment methods.


                **Character limit**: 11


                **Values**: `DirectDebit` 
              type: string
            BankTransferType:
              description: |2
                 Specifies the type of direct debit transfer. The value of this field is dependent on the country of the user.
                This field is only required if the `Type` field is set to `BankTransfer`.


                **Character limit**: 20


                **Values**:

                - `AutomatischIncasso` (NL)
                - `LastschriftDE` (Germany)
                - `LastschriftAT` (Austria)
                - `DemandeDePrelevement` (FR)
                - `DirectDebitUK` (UK)
                - `Domicil` (Belgium)
                - `LastschriftCH` (CH)
                - `RID` (Italy)
                - `OrdenDeDomiciliacion` (Spain)
              type: string
            BusinessIdentificationCode:
              description: |2-
                 The business identification code for Swiss direct payment methods that use the Global Collect payment gateway. Use this field only for direct debit payments in Switzerland with Global Collect.


                **Character limit**: 11


                **Values**: string of 11 characters or fewer 
              type: string
            City:
              description: |2-
                 The city of the customer's address. Use this field for direct debit payment methods.


                **Character limit**:80


                **Values**:  string of 80 characters or fewer 
              type: string
            Country:
              description: |2-
                 The two-letter country code of the customer's address.
                This field is only required if the `Type` field is set to `BankTransfer`, and the `BankTransferType` field is set to either `DirectDebitUK`, `DirectEntryAU`, or `DirectDebitNZ`.


                **Character limit**: 2


                **Values**: a valid country code 
              type: string
            CreatedById:
              description: |2-
                 The user ID of the person who created the `PaymentMethod` object when there is a login user in the user session. In Hosted Payment Method and Z-Checkout pages, this field is set to 3 as there is no login user to initiate a user session.


                **Character limit**: 32


                **Values**: automatically generated 
              type: string
            CreatedDate:
              description: |2-
                 The date when the `PaymentMethod` object was created in the Zuora system.


                **Character limit**: 29


                **Values**: automatically generated 
              format: date-time
              type: string
            CreditCardAddress1:
              description: |2-
                 The first line of the card holder's address, which is often a street address or business name. Use this field for credit card and direct debit payment methods.


                **Character limit**: 255


                **Values**: a string of 255 characters or fewer 
              type: string
            CreditCardAddress2:
              description: |2-
                 The second line of the card holder's address. Use this field for credit card and direct debit payment methods.


                **Character limit**: 255


                **Values**: a string of 255 characters or fewer 
              type: string
            CreditCardCity:
              description: |2-
                 The city of the card holder's address. Use this field for credit card and direct debit payment methods

                **Character limit**: 40


                **Values**: a string of 40 characters or fewer 
              type: string
            CreditCardCountry:
              description: " The country of the card holder's address."
              type: string
            CreditCardExpirationMonth:
              description: |2-
                 The expiration month of the credit card or debit card.
                This field is only required if the `Type` field is set to `CreditCard` or `DebitCard`.

                **Character limit**: 2


                **Values**: a two-digit number, 01 - 12 
              format: int32
              type: integer
            CreditCardExpirationYear:
              description: |2-
                 The expiration month of the credit card or debit card.
                This field is only required if the `Type` field is set to `CreditCard` or `DebitCard`.


                **Character limit**: 4


                **Values**: a four-digit number 
              format: int32
              type: integer
            CreditCardHolderName:
              description: |2-
                 The full name of the card holder.
                This field is only required if the `Type` field is set to `CreditCard` or `DebitCard`.


                **Character limit**: 50


                **Values**: a string of 50 characters or fewer 
              type: string
            CreditCardMaskNumber:
              description: |2-
                 A masked version of the credit or debit card number.


                **Character limit**: 32


                **Values**: automatically generated 
              type: string
            CreditCardNumber:
              description: |2-
                 The credit card or debit card number. This is an insert-only field; it cannot be updated nor queried for security purposes.
                This field is only required if the `Type` field is set to `CreditCard` or `DebitCard`.


                **Character limit**: 16


                **Values**: a string of 16 characters or fewer 
              type: string
            CreditCardPostalCode:
              description: |2-
                 The billing address's zip code. This field is required only when you define a debit card or credit card payment.


                **Character limit**: 20


                **Values**: a string of 20 characters or fewer 
              type: string
            CreditCardSecurityCode:
              description: |2-
                 The CVV or CVV2 security code. See [How do I control what information Zuora sends over to the Payment Gateway?](https://knowledgecenter.zuora.com/kb/How_do_I_control_information_sent_to_payment_gateways_when_verifying_payment_methods%3F) for more information. To ensure PCI compliance, this value is not stored and cannot be queried.


                **Character limit**:


                **Values**: a valid CVV or CVV2 security code 
              type: string
            CreditCardState:
              description: " The billing address's state. Use this field is if the `CreditCardCountry` value is either Canada or the US. State names must be spelled in full. "
              type: string
            CreditCardType:
              description: |
                The type of the credit card.

                Possible values  include `Visa`, `MasterCard`, `AmericanExpress`, `Discover`, `JCB`, and `Diners`. For more information about credit card types supported by different payment gateways, see [Supported Payment Gateways](https://knowledgecenter.zuora.com/CB_Billing/M_Payment_Gateways/Supported_Payment_Gateways).
              type: string
            DeviceSessionId:
              description: |2-
                 The session ID of the user when the `PaymentMethod` was created or updated. Some gateways use this field for fraud prevention. If this field is passed to Zuora, then Zuora passes this field to supported gateways. Currently only Verifi supports this field.


                **Character limit**: 255


                **Values**: 
              type: string
            Email:
              description: |2-
                 An email address for the payment method in addition to the bill to contact email address.


                **Character limit**: 80


                **Values**: a string of 80 characters or fewer 
              type: string
            ExistingMandate:
              description: |2-
                 Indicates if the customer has an existing mandate or a new mandate. A mandate is a signed authorization for UK and NL customers. When you are migrating mandates from another system, be sure to set this field correctly. If you indicate that a new mandate is an existing mandate or vice-versa, then transactions fail. This field is used only for the direct debit payment method.


                **Character limit**: 3


                **Values**: `Yes`, `No` 
              type: string
            FirstName:
              description: |2-
                 The customer's first name. This field is used only for the direct debit payment method.


                **Character limit**: 30


                **Values**: a string of 30 characters or fewer 
              type: string
            GatewayOptionData:
              description: |2-
                 Use this field to pass gateway options.


                **Character limit**: 255


                **Values**: GatewayOption 
              properties:
                GatewayOption:
                  description: ""
                  items:
                    $ref: "#/components/schemas/GatewayOption"
                  type: array
              required:
                - GatewayOption
              type: object
            IBAN:
              description: |2-
                 The International Bank Account Number. This field is used only for the direct debit payment method.


                **Character limit**: 42


                **Values**: a string of 42 characters or fewer 
              type: string
            IPAddress:
              description: |2-
                 The IP address of the user when the payment method was created or updated. Some gateways use this field for fraud prevention. If this field is passed to Zuora, then Zuora passes this field to supported gateways. Currently PayPal, CyberSource, Authorize.Net, and Verifi support this field.


                **Character limit**: 15


                **Values**: a string of 15 characters or fewer 
              type: string
            Id:
              description: |2-
                 The ID of this object. Upon creation, the ID of this object is `PaymentMethodId`.


                **Character limit**: 32


                **Values**: automatically generated 
              type: string
            LastFailedSaleTransactionDate:
              description: |2-
                 The date of the last failed attempt to collect payment with this payment method.


                **Character limit**: 29


                **Values**: automatically generated 
              format: date-time
              type: string
            LastName:
              description: |2-
                 The customer's last name. This field is used only for the direct debit payment method.


                **Character limit**: 70


                **Values**: a string of 70 characters or fewer 
              type: string
            LastTransactionDateTime:
              description: |2-
                 The date of the most recent transaction.


                **Character limit**: 29


                **Values**: a valid date and time value 
              format: date-time
              type: string
            LastTransactionStatus:
              description: |2-
                 The status of the most recent transaction.


                **Character limit**: 39


                **Values**: automatically generated 
              type: string
            MandateCreationDate:
              description: |2+
                 The date when the mandate was created, in `yyyy-mm-dd` format. A mandate is a signed authorization for UK and NL customers. This field is used only for the direct debit payment method.


                **Character limit**: 29


              format: date
              type: string
            MandateID:
              description: |2-
                 The ID of the mandate. A mandate is a signed authorization for UK and NL customers. This field is used only for the direct debit payment method.


                **Character limit**: 36


                **Values**: a string of 36 characters or fewer 
              type: string
            MandateReceived:
              description: |2-
                 Indicates if  the mandate was received. A mandate is a signed authorization for UK and NL customers. This field is used only for the direct debit payment method.


                **Character limit**: 3


                **Values**: `Yes`, `No `(case-sensitive) 
              type: string
            MandateUpdateDate:
              description: |2+
                 The date when the mandate was last updated, in `yyyy-mm-dd` format. A mandate is a signed authorization for UK and NL customers. This field is used only for the direct debit payment method.


                **Character limit**: 29


              format: date
              type: string
            MaxConsecutivePaymentFailures:
              description: |2-
                 Specifies the number of allowable consecutive failures Zuora attempts with the payment method before stopping.
                When the `UseDefaultRetryRule` field is set to `false`, this field is only required if the `PaymentRetryWindow` field is not defined.



                **Values**: a valid number 
              type: integer
            Name:
              description: " Create Query Delete Filter "
              type: string
            NumConsecutiveFailures:
              description: |2-
                 The number of consecutive failed payment for this payment method. It is reset to 0 upon successful payment. You can use the API to update the field value to 0.


                **Character limit**:


                **Values**: a positive whole number 
              format: int32
              type: integer
            PaymentMethodStatus:
              description: |2-
                 Specifies the status of the payment method. It is set to Active on creation.


                **Character limit**: 6


                **Values**: `Active` or `Closed` PaymentMethodStatus should not be used in the `create
                ` call. You can only set this field to **Closed** via the `update
                ` call. 
              type: string
            PaymentRetryWindow:
              description: |2-
                 The retry interval setting, which prevents making a payment attempt if the last failed attempt was within the last specified number of hours.
                When the `UseDefaultRetryRule` field is set to `false`, this field is only required if the `MaxConsecutivePaymentFailures` field is not defined.


                **Character limit**: 4


                **Values**: a whole number between 1 and 1000, exclusive 
              type: integer
            PaypalBaid:
              description: |2-
                 The PayPal billing agreement ID, which is a contract between two PayPal accounts. Typically, the selling party initiates a request to create a BAID, and sends it to buying party for acceptance. The seller can keep track of the BAID and use it for future charges against the buyer.
                This field is only required if the `Type` field is set to `PayPal`.


                **Character limit**: 64


                **Values**: a string of 64 characters or fewer 
              type: string
            PaypalEmail:
              description: |2-
                 The email address associated with the account holder's PayPal account or of the PayPal account of the person paying for the service.
                This field is only required if the `Type` field is set to `PayPal`.


                **Character limit**: 80


                **Values**: a string of 80 characters or fewer 
              type: string
            PaypalPreapprovalKey:
              description: |2-
                 PayPal's Adaptive Payments API key. Zuora does not create this key, nor does it call PayPal to generate it. You must use PayPal's Adaptive Payments' API to generate this key, and then pass it to Zuora. Zuora uses this key to authorize future payments to PayPal's Adaptive Payments API.
                This field is only required if you use PayPal Adaptive Payments gateway.


                **Character limit**: 32


                **Values**: a valid PayPal Adaptive Payment pre-approval key 
              type: string
            PaypalType:
              description: |2-
                 Specifies the PayPal gateway: PayFlow Pro, Express Checkout, or Adaptive Payments.
                This field is only required if you use the PayPal Adaptive Payments, Payflow Pro, or Express Checkout gateway.


                **Character limit**: 32


                **Values**: `ExpressCheckout`, `NativeExpressCheckout`, `AdaptivePayments` 
              type: string
            Phone:
              description: |2-
                 The phone number that the account holder registered with the bank. This field is used for credit card validation when passing to a gateway.


                **Character limit**: 40


                **Values**: a string of 40 characters or fewer 
              type: string
            PostalCode:
              description: |2-
                 The zip code of the customer's address. This field is used only for the direct debit payment method.


                **Character limit**: 20


                **Values**: a string of 20 characters or fewer 
              type: string
            SecondTokenId:
              description: |2-
                 A gateway unique identifier that replaces sensitive payment method data. SecondTokenId is conditionally required only when TokenID is being used to represent a gateway customer profile. SecondTokenId is used in the CC Reference Transaction payment method.

                **Character limit**: 64


                **Values**: a string of 64 characters or fewer 
              type: string
            SkipValidation:
              description: |2-
                 Creates the payment method even if authorization fails with the payment gateway.


                **Character limit**: 5


                **Values**: `t``rue`, `false` 
              type: boolean
            State:
              description: |2-
                 The state of the customer's address. This field is used only for the direct debit payment method.


                **Character limit**: 70


                **Values**: a string of 70 characters or fewer 
              type: string
            StreetName:
              description: |2-
                 The street name of the customer's address. This field is used only for the direct debit payment method.


                **Character limit**: 100


                **Values**: a string of 100 characters or fewer 
              type: string
            StreetNumber:
              description: |2-
                 The street number of the customer's address. This field is used only for the direct debit payment method.


                **Character limit**: 30


                **Values**: a string of 30 characters or fewer 
              type: string
            TokenId:
              description: |
                A gateway unique identifier that replaces sensitive payment method data or represents a gateway's unique customer profile. If you want to create an Amazon Pay payment method, specify `AmazonBillingAgreementId` for this field. 

                While `TokenId` is used to represent a customer profile, `SecondTokenId` is conditionally required for representing the underlying tokenized payment method. When the `Type` field is set to `CreditCardReferenceTransaction`, this field is required if the `CreditCardNumber` field is not specified. 

                **Character limit**: 255
                **Values**: a string of 255 characters or fewer
              type: string
            TotalNumberOfErrorPayments:
              description: |2-
                 The number of error payments that used this payment method.


                **Character limit**:


                **Values**: automatically generated 
              format: int32
              type: integer
            TotalNumberOfProcessedPayments:
              description: |2-
                 The number of successful payments that used this payment method.


                **Character limit**:


                **Values**: automatically generated 
              format: int32
              type: integer
            Type:
              description: The type of payment method. If you want to create an Amazon Pay payment method, specify `CreditCardReferenceTransaction` for this field.
              enum:
                - ACH
                - ApplePay
                - BankTransfer
                - Cash
                - Check
                - CreditCard
                - CreditCardReferenceTransaction
                - DebitCard
                - Other
                - PayPal
                - WireTransfer
              type: string
            UpdatedById:
              description: |2-
                 The ID of the user who last updated the payment method.


                **Character limit**: 32


                **Values**: automatically generated 
              type: string
            UpdatedDate:
              description: |2-
                 The date when the payment method was last updated.


                **Character limit**: 29


                **Values**: automatically generated 
              format: date-time
              type: string
            UseDefaultRetryRule:
              description: |2-
                 Determines whether to use the default retry rules configured in the [Z-Payments settings](https://knowledgecenter.zuora.com/CB_Billing/L_Payment_Methods/H_Configure_Payment_Method_Retry_Rules). Set this to `true` to use the default retry rules. Set this to `false` to set the specific rules for this payment method. If you set this value to `false`, then the fields, `PaymentRetryWindow` and `MaxConsecutivePaymentFailures`, are required.


                **Character limit**: 5


                **Values**: `t``rue`, `false` 
              type: boolean
          required:
            - Type
          type: object
        PreviewOptions:
          description: |
            Only used if you want to call this operation in preview mode. After a call in preview mode is completed, Zuora will roll back the subscription and return only the temporary invoice data.
          properties:
            EnablePreviewMode:
              description: |
                Specifies whether the call should create a subscription/amendment, or whether it should return a preview of the order. Used with either NumberOfPeriods or PreviewThroughTermEnd. 

                If the preview mode is enabled, Zuora recommends that you set the `subscribes` > `SubscribeOptions` > `ProcessPayments` field to `false` and skip setting the `subscribes` > `PaymentMethod` field in your request so that no charge occurs for payment method validation in a preview.
              type: boolean
            NumberOfPeriods:
              description: |
                The number of invoice periods to show in a preview.
              type: integer
            PreviewThroughTermEnd:
              description: |
                Specifies whether to preview the charge through the end of the subscription term. Applicable to termed subscriptions only.
              type: boolean
            PreviewType:
              default: InvoiceItem
              description: |
                The type of preview to return:

                 * `InvoiceItem` - Return an invoice item preview
                 * `ChargeMetrics` - Return a charge metrics preview
                 * `InvoiceItemChargeMetrics` - Return an invoice item and charge metrics of that item
              enum:
                - InvoiceItem
                - ChargeMetrics
                - InvoiceItemChargeMetrics
              type: string
          type: object
        SoldToContact:
          $ref: "#/components/schemas/SubscribeRequestSoldToContact"
        SubscribeOptions:
          description: |2-
             This optional object specifies parameters related to invoicing - whether to immediately generate an invoice and collect payment, and whether the invoice should cover all subscriptions or just this new subscription.
            The default behavior is to invoice immediately for all the account's subscriptions, with the current date as the target date, and immediately collect payment if the account's `AutoPay` flag is true.


            **Values:** A valid SubscribeOptions object. 
          properties:
            ApplicationOrder:
              description: |
                The priority order to apply credit memos and/or unapplied payments to an invoice. Possible item values are: `CreditMemo`, `UnappliedPayment`.

                **Note:**
                  - This field is only available if you have the Invoice Settlement feature enabled and set the `X-Zuora-WSDL-Version` request header to `107` or later.
                  - This field is valid only if the `applyCredit` field is set to `true`.
                  - If no value is specified for this field, the default priority order is used, ["CreditMemo", "UnappliedPayment"], to apply credit memos first and then apply unapplied payments.
                  - If only one item is specified, only the items of the spedified type are applied to invoices. For example, if the value is `["CreditMemo"]`, only credit memos are used to apply to invoices.
              items:
                type: string
              type: array
            ApplyCredit:
              description: |
                Whether to automatically apply credit memos or unapplied payments, or both to an invoice.

                If the value is `true`, the credit memo or unapplied payment, or both will be automatically applied to the invoice. If no value is specified or the value is `false`, no action is taken.

                **Note**: This field is only available if you have the Invoice Settlement feature enabled and set the `X-Zuora-WSDL-Version` request header to `107` or later.
              type: boolean
            ApplyCreditBalance:
              description: ""
              type: boolean
            ElectronicPaymentOptions:
              description: ""
              properties:
                PaymentMethodId:
                  description: ""
                  type: string
              type: object
            ExternalPaymentOptions:
              description: ""
              properties:
                Amount:
                  description: ""
                  format: double
                  type: number
                EffectiveDate:
                  description: ""
                  format: date
                  type: string
                GatewayOrderId:
                  description: ""
                  type: string
                PaymentMethodId:
                  description: ""
                  type: string
                ReferenceId:
                  description: ""
                  maxLength: 100
                  type: string
              type: object
            GenerateInvoice:
              description: ""
              type: boolean
            ProcessPayments:
              description: |
                Use this when you are using electronic payment types.

                If `GenerateInvoice` is true, specifies whether payment should be applied when the subscription is created. If the `Account` > `AutoPay` flag is true and `GenerateInvoice` is true and `ProcessPayments` is true, then the payment is created for the invoice balance and charged. The default value is `true`. 

                If a temporary error that Zuora cannot create or submit a payment to the gateway is seen, Zuora will automatically retry the action to collect the payment. You can contact [Zuora Global Support](https://support.zuora.com/) to set the maximum number of retries that Zuora can perform. The number can range from 0 to 2 with a default value of 0. However, retrying the request can make the API call take longer than expected. Zuora does not guarantee the retry could be completed within the timeout limit. 

                **Note:** The retry mechanism only supports the case that one single subscription is created by the Subscribe action. Also, the retry mechanism does not support the preview mode of the Subscribe action.

                **Note:** If you have the [Invoice Settlement](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/Invoice_Settlement) feature enabled, Zuora does not support using this field to collect payments against invoices.
              type: boolean
            SubscribeInvoiceProcessingOptions:
              description: ""
              properties:
                InvoiceDate:
                  description: ""
                  format: date
                  type: string
                InvoiceProcessingScope:
                  description: |
                    A string specifying the scope of the requested invoice. Possible values:
                    * `Account` invoice for all subscriptions within the account - the default value
                    * `Subscription` invoice for only the subscription being created in this call
                  type: string
                InvoiceTargetDate:
                  description: ""
                  format: date
                  type: string
              type: object
          required:
            - GenerateInvoice
            - ProcessPayments
          type: object
        SubscriptionData:
          description: |2-
             This object contains the information on the contract's dates and terms.


            **Values:** A valid SubscriptionData object. 
          properties:
            RatePlanData:
              description: ""
              items:
                $ref: "#/components/schemas/RatePlanData"
              type: array
            Subscription:
              $ref: "#/components/schemas/SubscribeRequestSubscriptionDataSubscription"
          required:
            - Subscription
            - RatePlanData
          type: object
      required:
        - Account
        - SubscriptionData
      type: object
    SubscribeRequestAccount:
      allOf:
        - properties:
            AccountNumber:
              description: |
                Unique account number assigned to the account.

                **Character limit**: 50


                **Values**: one of the following:

                - null to auto-generate
                - a string of 50 characters or fewer that doesn't begin with the default account number prefix
              type: string
            AdditionalEmailAddresses:
              description: |-
                List of additional email addresses to receive emailed invoices.

                **Character limit**: 120


                **Values**: comma-separated list of email addresses 
              type: string
            AllowInvoiceEdit:
              description: |2-
                 Indicates if associated invoices can be edited.


                **Character limit**: 5


                **Values**: `true`, `false` (default if left null) 
              type: boolean
            AutoPay:
              description: |2-
                 Indicates if future payments are automatically collected when they're due during a Payment Run.


                **Character limit**: 5


                **Values**: `true`, `false` (default) 
              type: boolean
            Batch:
              description: |2-
                 Organizes your customer accounts into groups to optimize your billing and payment operations.


                **Character limit**: 20


                **Values**:any system-defined batch (`Batch1` - `Batch50 `or by name). 
              type: string
            BcdSettingOption:
              description: |-
                Billing cycle day setting option.

                **Character limit**: 9


                **Values**: `AutoSet`, `ManualSet` 
              type: string
            BillCycleDay:
              description: |-
                Billing cycle day (BCD) on which bill runs generate invoices for the account.

                **Character limit**: 2


                **Values**: any activated system-defined bill cycle day (`1` - `31`) 
              format: int32
              type: integer
            CommunicationProfileId:
              description: |-
                Associates the account with a specified communication profile.

                **Character limit**: 32


                **Values**: a valid communication profile ID 
              type: string
            CrmId:
              description: |-
                CRM account ID for the account. A CRM is a customer relationship management system, such as Salesforce.com.

                **Character limit**: 100


                **Values**: a string of 100 characters or fewer 
              type: string
            Currency:
              description: " Currency that the customer is billed in. See [a currency value defined in the Zuora Ui admin settings](https://knowledgecenter.zuora.com/CB_Billing/Billing_Settings/Customize_Currencies) "
              type: string
            CustomerServiceRepName:
              description: |-
                Name of the account's customer service representative, if applicable.

                **Character limit**: 50


                **Values**: a string of 50 characters or fewer 
              type: string
            DefaultPaymentMethodId:
              description: |-
                ID of the default payment method for the account. This field is only required if the `AutoPay` field is set to `true`.


                **Character limit**: 32


                **Values**: A valid ID for an existing payment method. This field does not support external payment methods. 
              type: string
            Id:
              description: Internal identifier of an existing account. Only set this field if you want to assign the subscription to an existing account.
              type: string
            InvoiceDeliveryPrefsEmail:
              description: |-
                Indicates if the customer wants to receive invoices through email.
                **Character limit**: 5


                **Values**: `true`, `false` (default if left null) 
              type: boolean
            InvoiceDeliveryPrefsPrint:
              description: |-
                Indicates if the customer wants to receive printed invoices, such as through postal mail.

                **Character limit**: 5


                **Values**: `true`, `false` (default if left null) 
              type: boolean
            InvoiceTemplateId:
              description: |+
                The ID of the invoice template. Each customer account can use a specific invoice template for invoice generation.

                **Character limit**: 32


                **Values**: a[ valid template ID configured in Z-Billing Settings](https://knowledgecenter.zuora.com/CB_Billing/Billing_Settings/Manage_Invoice_Rules_and_Templates) To find the ID of your current invoice template: In Zuora, navigate to **Settings > Z-Billing > Manage Invoice Rules and Templates** and click **Show Id **next to the template you want to use.


              type: string
            LastInvoiceDate:
              description: |2-
                 The date when the previous invoice was generated for the account. The field value is null if no invoice has ever been generated for the account.


                **Character limit**: 29


                **Values**: automatically generated 
              format: date
              type: string
            Name:
              description: |-
                Name of the account as displayed in the Zuora UI.

                **Character limit**: 255


                **Values**: a string of 255 characters or fewer 
              type: string
            Notes:
              description: |2-
                 Comments about the account.

                **Character limit**: 65,535


                **Values**: a string of 65,535 characters 
              type: string
            ParentId:
              description: |-
                Identifier of the parent customer account for this Account object. Use this field if you have customer hierarchy enabled.

                **Character limit**: 32


                **Values**: a valid account ID 
              type: string
            PaymentGateway:
              description: |
                Gateway used for processing electronic payments and refunds. This field is only required if there is no default payment gateway is defined in the tenant.

                **Character limit**: 40


                **Values**: one of the following:

                - a valid configured gateway name
                - Null to inherit the default value set in Z-Payment Settings
              type: string
            PaymentTerm:
              description: |-
                Indicates when the customer pays for subscriptions.

                **Character limit**: 100


                **Values**: [a valid, active payment term defined in the web-based UI administrative settings](https://knowledgecenter.zuora.com/CB_Billing/Billing_Settings/Define_Payment_Terms) 
              type: string
            PurchaseOrderNumber:
              description: |-
                The number of the purchase order associated with this account. Purchase order information generally comes from customers.

                **Character limit**: 100


                **Values**: a string of 100 characters or fewer 
              type: string
            SalesRepName:
              description: |-
                The name of the sales representative associated with this account, if applicable.

                **Character limit**: 50


                **Values**: a string of 50 characters or fewer 
              type: string
            TaxCompanyCode:
              description: |2-
                 Unique code that identifies a company account in Avalara. Use this field to calculate taxes based on origin and sold-to addresses in Avalara.
                This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).



                **Character limit**: 50


                **Values**: a valid company code 
              type: string
            TaxExemptCertificateID:
              description: |-
                ID of your customer's tax exemption certificate.

                **Character limit**: 32


                **Values**: a string of 32 characters or fewer 
              type: string
            TaxExemptCertificateType:
              description: |-
                Type of the tax exemption certificate that your customer holds.
                **Character limit**: 32


                **Values**: a string of 32 characters or fewer 
              type: string
            TaxExemptDescription:
              description: |-
                Description of the tax exemption certificate that your customer holds.

                **Character limit**: 500


                **Values**: a string of 500 characters or fewer 
              type: string
            TaxExemptEffectiveDate:
              description: |-
                Date when the the customer's tax exemption starts.

                **Character limit**: 29 **Version notes**: requires Z-Tax 
              format: date
              type: string
            TaxExemptExpirationDate:
              description: |-
                Date when the customer's tax exemption certificate expires
                **Character limit**: 29 **Version notes**: requires Z-Tax 
              format: date
              type: string
            TaxExemptIssuingJurisdiction:
              description: |-
                Indicates the jurisdiction in which the customer's tax exemption certificate was issued.

                **Character limit**: 32


                **Values**: a string of 32 characters or fewer 
              type: string
            TaxExemptStatus:
              description: |2
                 Status of the account's tax exemption. This field is only required if you use Zuora Tax. This field is not available if you do not use Zuora Tax.


                **Character limit**: 19


                **Values**: one of the following:

                - `Yes`
                - `No`
                - `PendingVerification`
              type: string
            TotalInvoiceBalance:
              description: |-
                Total balance of the account's invoices.

                **Character limit**: 16


                **Values**: a valid currency value 
              format: double
              type: number
            VATId:
              description: |2-
                 EU Value Added Tax ID.
                This feature is in **Limited Availability**. If you wish to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).



                **Character limit**: 25


                **Values**: a valid Value Added Tax ID 
              type: string
          required:
            - Batch
            - BillCycleDay
            - Currency
            - Name
          type: object
        - $ref: "#/components/schemas/AccountObjectNSFields"
        - $ref: "#/components/schemas/AccountObjectCustomFields"
      description: |2-
         This is the Account object containing the information for this particular subscription. It has all the information needed to create an account for a subscription.

        **Values:** A valid account.
      title: Account
    SubscribeRequestBillToContact:
      allOf:
        - properties:
            AccountId:
              description: |2-
                 The Zuora account ID associated with this contact. This field is not required when you use the subscribe
                call. This field is required for all other calls.
                **Character limit: **32 **Values: **a valid account ID 
              type: string
            Address1:
              description: |2-
                 The first line of the contact's address, which is often a street address or business name.


                **Character limit**: 255


                **Values**: a string of 255 characters or fewer 
              type: string
            Address2:
              description: |2-
                 The second line of the contact's address.


                **Character limit**: 255


                **Values**: a string of 255 characters or fewer 
              type: string
            City:
              description: |2-
                 The city of the contact's address.


                **Character limit**: 40 **Values: **a string of 40 characters or fewer 
              type: string
            Country:
              description: " The country of the contact's address. This field is only required if you enbale taxation. "
              type: string
            County:
              description: |2-
                 The country. May optionally be used by [Z-Tax](/C_Zuora_User_Guides/A_Billing_and_Payments/I_Taxes/Z-Tax) to calculate county tax.


                **Character limit**: 32


                **Values**: a string of 32 characters or fewer 
              type: string
            CreatedById:
              description: |-
                The ID of the Zuora user who created the contact.

                **Character limit**: 32


                **Values**: automatically generated 
              type: string
            CreatedDate:
              description: |-
                The date when the contact was created.

                **Character limit**: 29


                **Values**: automatically generated 
              format: date-time
              type: string
            Description:
              description: |2-
                 A description for the contact.


                **Character limit**: 100


                **Values**: a string of 100 characters or fewer 
              type: string
            Fax:
              description: |2-
                 The contact's fax number.


                **Character limit**: 40


                **Values**: a string of 40 characters or fewer 
              type: string
            FirstName:
              description: |2-
                 The contact's first name.


                **Character limit**: 100


                **Values**: a string of the contact's first name 
              type: string
            HomePhone:
              description: |2-
                 The contact's home phone number.


                **Character limit**: 40


                **Values**: a string of 40 characters or fewer 
              type: string
            LastName:
              description: |2-
                 The contact's last name.


                **Character limit**: 100


                **Values**: a string of 100 characters or fewer 
              type: string
            MobilePhone:
              description: |2-
                 The contact's mobile phone number.


                **Character limit**: 40


                **Values**: a string of 40 characters or fewer 
              type: string
            NickName:
              description: |2-
                 A nickname for the contact.


                **Character limit**: 100


                **Values**: a string of 100 characters or fewer 
              type: string
            OtherPhone:
              description: |2-
                 An additional phone number for the contact.


                **Character limit**: 40


                **Values**: a string of 40 characters or fewer 
              type: string
            OtherPhoneType:
              description: |-
                The type of the `OtherPhone`.

                **Character limit**: 20


                **Values**: `Work`, `Mobile`, `Home`, `Other` 
              type: string
            PersonalEmail:
              description: |2-
                 The contact's personal email address.


                **Character limit**: 80


                **Values**: a string of 80 characters or fewer 
              type: string
            PostalCode:
              description: |2-
                 The zip code for the contact's address.
                **Character limit:** 20 **Values: **a string of 20 characters or fewer 
              type: string
            State:
              description: " The state or province of the contact's address. "
              type: string
            TaxRegion:
              description: "If using [Z-Tax](https://knowledgecenter.zuora.com/CB_Billing/J_Billing_Operations/L_Taxes/A_Z-Tax) tax rules "
              type: string
            UpdatedById:
              description: |2-
                 The ID of the user who lasted updated the contact.


                **Character limit**: 32


                **Values**: automatically generated 
              type: string
            UpdatedDate:
              description: |2-
                 The date when the contact was last updated.


                **Character limit**: 29


                **Values**: automatically generated 
              format: date-time
              type: string
            WorkEmail:
              description: |2-
                 The contact's business email address.


                **Character limit**: 80


                **Values**: a string of 80 characters or fewer 
              type: string
            WorkPhone:
              description: |2-
                 The contact's business phone number.


                **Character limit**: 40 **notes**: --


                **Values**: a string of 40 characters or fewer 
              type: string
          required:
            - FirstName
            - LastName
          type: object
        - $ref: "#/components/schemas/ContactObjectCustomFields"
      description: |2-
         This is the object that contains the contact associated with this account in the Account's `BillToId` field.
        This field is only required if the account does not exist.
        Values: A valid contact for the account.
      title: Contact
    SubscribeRequestSoldToContact:
      allOf:
        - properties:
            AccountId:
              description: |2-
                 The Zuora account ID associated with this contact. This field is not required when you use the subscribe
                call. This field is required for all other calls.
                **Character limit: **32 **Values: **a valid account ID 
              type: string
            Address1:
              description: |2-
                 The first line of the contact's address, which is often a street address or business name.


                **Character limit**: 255


                **Values**: a string of 255 characters or fewer 
              type: string
            Address2:
              description: |2-
                 The second line of the contact's address.


                **Character limit**: 255


                **Values**: a string of 255 characters or fewer 
              type: string
            City:
              description: |2-
                 The city of the contact's address.


                **Character limit**: 40 **Values: **a string of 40 characters or fewer 
              type: string
            Country:
              description: " The country of the contact's address. "
              type: string
            County:
              description: |2-
                 The country. May optionally be used by [Z-Tax](/C_Zuora_User_Guides/A_Billing_and_Payments/I_Taxes/Z-Tax) to calculate county tax.


                **Character limit**: 32


                **Values**: a string of 32 characters or fewer 
              type: string
            CreatedById:
              description: |-
                The ID of the Zuora user who created the contact.

                **Character limit**: 32


                **Values**: automatically generated 
              type: string
            CreatedDate:
              description: |-
                The date when the contact was created.

                **Character limit**: 29


                **Values**: automatically generated 
              format: date-time
              type: string
            Description:
              description: |2-
                 A description for the contact.


                **Character limit**: 100


                **Values**: a string of 100 characters or fewer 
              type: string
            Fax:
              description: |2-
                 The contact's fax number.


                **Character limit**: 40


                **Values**: a string of 40 characters or fewer 
              type: string
            FirstName:
              description: |2-
                 The contact's first name.


                **Character limit**: 100


                **Values**: a string of the contact's first name 
              type: string
            HomePhone:
              description: |2-
                 The contact's home phone number.


                **Character limit**: 40


                **Values**: a string of 40 characters or fewer 
              type: string
            LastName:
              description: |2-
                 The contact's last name.


                **Character limit**: 100


                **Values**: a string of 100 characters or fewer 
              type: string
            MobilePhone:
              description: |2-
                 The contact's mobile phone number.


                **Character limit**: 40


                **Values**: a string of 40 characters or fewer 
              type: string
            NickName:
              description: |2-
                 A nickname for the contact.


                **Character limit**: 100


                **Values**: a string of 100 characters or fewer 
              type: string
            OtherPhone:
              description: |2-
                 An additional phone number for the contact.


                **Character limit**: 40


                **Values**: a string of 40 characters or fewer 
              type: string
            OtherPhoneType:
              description: |-
                The type of the `OtherPhone`.

                **Character limit**: 20


                **Values**: `Work`, `Mobile`, `Home`, `Other` 
              type: string
            PersonalEmail:
              description: |2-
                 The contact's personal email address.


                **Character limit**: 80


                **Values**: a string of 80 characters or fewer 
              type: string
            PostalCode:
              description: |2-
                 The zip code for the contact's address.
                **Character limit:** 20 **Values: **a string of 20 characters or fewer 
              type: string
            State:
              description: " The state or province of the contact's address. "
              type: string
            TaxRegion:
              description: "If using [Z-Tax](https://knowledgecenter.zuora.com/CB_Billing/J_Billing_Operations/L_Taxes/A_Z-Tax) tax rules "
              type: string
            UpdatedById:
              description: |2-
                 The ID of the user who lasted updated the contact.


                **Character limit**: 32


                **Values**: automatically generated 
              type: string
            UpdatedDate:
              description: |2-
                 The date when the contact was last updated.


                **Character limit**: 29


                **Values**: automatically generated 
              format: date-time
              type: string
            WorkEmail:
              description: |2-
                 The contact's business email address.


                **Character limit**: 80


                **Values**: a string of 80 characters or fewer 
              type: string
            WorkPhone:
              description: |2-
                 The contact's business phone number.


                **Character limit**: 40 **notes**: --


                **Values**: a string of 40 characters or fewer 
              type: string
          type: object
        - $ref: "#/components/schemas/ContactObjectCustomFields"
      description: |2-
         Unless otherwise specified, this field defaults to the information in the `BillToContact` field.

        **Values:** A valid contact. 
      title: Contact
    SubscribeRequestSubscriptionDataSubscription:
      allOf:
        - properties:
            AccountId:
              description: " This field can be updated when `Status` is `Draft`. "
              type: string
            AncestorAccountId:
              description: |2-
                 A filter option for querying all subscriptions under the same account hierarchy.


                **Character limit**: 32


                **Values**: a valid account ID 
              type: string
            AutoRenew:
              description: |2-
                 This field can be updated when `Status` is `Draft`. Indicates if the subscription automatically renews at the end of the term. This field is only required if the `TermType` field is set to `TERMED`.



                **Values**: `true`, `false` 
              type: boolean
            CancelledDate:
              description: |2-
                 The date of the amendment that canceled the subscription.



                **Values**: inherited from `Amendment`.`EffectiveDate` 
              format: date
              type: string
            ContractAcceptanceDate:
              description: |2
                 The date when the customer accepts the contract. This field can be updated when **Status** is `Draft`.


                This field is only required if the [Require Service Activation of Orders?](https://knowledgecenter.zuora.com/CB_Billing/Billing_Settings/Define_Default_Subscription_Settings#Require_Service_Activation_of_Orders.3F) Setting is set to `Yes`. If this setting is set to `Yes`:

                - If ContractAcceptanceDate field is required, you must set this field, ContractAcceptanceDate, and ContractEffectiveDate fields in the subscribe call to activate a subscription.
                - If ContractAcceptanceDate field is not required, you must set both this field and the ContractEffectiveDate field in the subscribe call to activate a subscription. If you only set a valid date in the ContractEffectiveDate field, the subscribe call still returns success, but the subscription is in `DRAT` status.
              format: date
              type: string
            ContractEffectiveDate:
              description: |2-
                 The date when the contract takes effect. This field can be updated when **Status** is `Draft`.


                **Note**: This field is required in the subscribe call. If you set the value of this field to null and both the ServiceActivationDate and ContractAcceptanceDate fields are not required, the subscribe call still returns success, but the new subscription is in `DRAFT` status. To activate the subscription, you must set a valid date to this field. 
              format: date
              type: string
            CreatedById:
              description: |-
                The user ID of the person who created the subscription.

                **Character limit**: 32


                **Values**: automatically generated 
              type: string
            CreatedDate:
              description: |2-
                 The date the subscription was created. This value is the same as the OriginalCreatedDate value until the subscription is amended.



                **Values**: automatically generated 
              format: date-time
              type: string
            CreatorAccountId:
              description: |2-
                 The account ID that created the subscription or the amended subscription.


                **Character limit**: 32


                **Values**: automatically generated 
              type: string
            CreatorInvoiceOwnerId:
              description: |-
                The account ID that owns the invoices associated with the subscription or the amended subscription.


                **Character limit**: 32


                **Values**: automatically generated 
              type: string
            CurrentTerm:
              description: |2-
                 The length of the period for the current subscription term. This field is only required If the `TermType` field is set to `TERMED` and its value must be greater than `0`. If TermType is set to `EVERGREEN`, this value is ignored. Default is `0`.


                **Character limit**: 20


                **Values**: automatically generated 
              format: int32
              type: integer
            CurrentTermPeriodType:
              description: |2
                 The period type for the current subscription term. This field is used with the CurrentTerm field to specify the current subscription term.



                **Values**:

                - `Month` (default)
                - `Year`
                - `Day`
                - `Week`
              type: string
            InitialTerm:
              description: |2-
                 The length of the period for the first subscription term. This field can be updated when Status is `Draft`. If you use the subscribe
                call, this field is required.


                This field is only required if the `TermType` field is set to `TERMED`.

                **Character limit**: 20


                **Values**: any valid number. The default value is 0. 
              format: int32
              type: integer
            InitialTermPeriodType:
              description: |2
                 The period type for the first subscription term.



                **Values**:

                - `Month` (default)
                - `Year`
                - `Day`
                - `Week`


                **Note**:

                - This field can be updated when `Status` is `Draft`.
                - This field is used with the `InitialTerm` field to specify the initial subscription term.
              type: string
            InvoiceOwnerId:
              description: " This field can be updated when `Status` is `Draft`. "
              type: string
            IsInvoiceSeparate:
              description: |2-
                 Determines if the subscription is invoiced separately. If `TRUE`, then all charges for this subscription are collected into the subscription's own invoice.



                **Values**: `TRUE`, `FALSE `(default) 
              type: boolean
            Name:
              description: |2
                 The unique identifier of the subscription. If you don't specify a value, then Zuora generates a name automatically. Whether auto-generated or manually specified, the subscription name must be unique. Otherwise an error will occur. You can change this value only when the subscription is in `Draft` status. Once the subscription is activated, you can't change this value, nor can you use this value for a different subscription.


                **Character limit**: 100


                **Values**: one of the following:

                - leave null to automatically generate
                - a string of 100 characters or fewer
              type: string
            Notes:
              description: |2-
                 Use this field to record comments about the subscription.


                **Character limit**: 500


                **Values**: a string of 500 characters or fewer 
              type: string
            OriginalCreatedDate:
              description: |2-
                 The date when the subscription was originally created. This value is the same as the CreatedDate value until the subscription is amended.



                **Values**: automatically generated 
              format: date-time
              type: string
            OriginalId:
              description: |2-
                 The original ID of this subscription.



                **Values**: automatically generated 
              type: string
            PreviousSubscriptionId:
              description: |2-
                 The subscription ID immediately prior to the current subscription.


                **Character limit**: 32


                **Values**: automatically generated 
              type: string
            RenewalSetting:
              description: |2-
                 This field can be updated when **Status** is `Draft`. Specifies whether a termed subscription will remain termed or change to evergreen when it is renewed.


                This field is only required if the `TermType` field is set to `TERMED`.


                **Values**: `RENEW_WITH_SPECIFIC_TERM `(default), `RENEW_TO_EVERGREEN` 
              type: string
            RenewalTerm:
              description: |2
                 The length of the period for the subscription renewal term. This field can be updated when **Status** is `Draft`. If you use the subscribe
                call, this field is required.


                This field is only required if the `TermType` field is set to `TERMED`.


                **Character limit**: 20


                **Values**: one of the following:

                - leave null to default to `0`
                - any number
              format: int32
              type: integer
            RenewalTermPeriodType:
              description: |2
                 The period type for the subscription renewal term.



                **Values**:

                - `Month` (default)
                - `Year`
                - `Day`
                - `Week`


                **Note**:

                - This field is used with the RenewalTerm field to specify the subscription renewal term.
                - This field can be updated when Status is `Draft`.
              type: string
            ServiceActivationDate:
              description: |2+
                 The date when the subscription is activated.
                This field can be updated when **Status** is `Draft`. This field is only required if the [Require Service Activation of Orders?](https://knowledgecenter.zuora.com/CB_Billing/Billing_Settings/Define_Default_Subscription_Settings#Require_Service_Activation_of_Orders.3F) Setting is set to `Yes`.
                If this setting is set to `Yes`:

                - If ContractAcceptanceDate field is required, you must set this field, ContractAcceptanceDate, and ContractEffectiveDate fields in the subscribe call to activate a subscription.
                - If ContractAcceptanceDate field is not required, you must set both this field and the ContractEffectiveDate field in the subscribe call to activate a subscription. If you only set a valid date in the ContractEffectiveDate field, the subscribe call still returns success, but the subscription is in `DRAT` status.


                **Character limit**: 29

              format: date
              type: string
            Status:
              description: |2
                 The status of the subscription.


                **Character limit**: 17


                **Values**: automatically generated

                **Possible values**: one of the following:

                - `Draft`
                - `PendingActivation`
                - `PendingAcceptance`
                - `Active`
                - `Cancelled`
                - `Expired`
                - `Suspended` (This value is in **Limited Availability**.)
              type: string
            SubscriptionEndDate:
              description: |2-
                 The date when the subscription term ends, where the subscription ends at midnight the day before. For example, if the SubscriptionEndDate is 12/31/2016, the subscriptions ends at midnight (00:00:00 hours) on 12/30/2016. This date is the same as the term end date or the cancelation date, as appropriate.


                **Character limit**: 29


                **Values**: automatically generated 
              format: date
              type: string
            SubscriptionStartDate:
              description: |2-
                 The date when the subscription term starts. This date is the same as the start date of the original term, which isn't necessarily the start date of the current or new term.


                **Character limit**: 29


                **Values**: automatically generated 
              format: date
              type: string
            TermEndDate:
              description: |2-
                 This field can be updated when **Status** is `Draft`. The date when the subscription term ends. If the subscription is evergreen, the TermEndDate value is null or is the cancelation date, as appropriate.

                **Character limit**: 29


                **Values**: automatically generated 
              format: date
              type: string
            TermStartDate:
              description: |2-
                 This field can be updated when **Status** is `Draft`. The date when the subscription term begins. If this is a renewal subscription, then this date is different from the subscription start date. If you don't specify a value, then Zuora uses ContractEffectiveDate automatically.


                **Character limit**: 29 
              format: date
              type: string
            TermType:
              description: |2-
                 This field can be updated when **Status** is `Draft`. Indicates if a subscription is [termed or evergreen](https://knowledgecenter.zuora.com/BC_Subscription_Management/Subscriptions#Termed_and_Evergreen_Subscriptions). A termed subscription has a specific end date and requires manual renewal. An evergreen subscription doesn't have an end date and doesn't need renewal. This field can be updated when the subscription status is Draft.


                **Character limit**: 9


                **Values**: `TERMED`, `EVERGREEN` 
              type: string
            UpdatedById:
              description: |2-
                 The ID of the user who last updated the subscription.
                **Character limit:** 32 **Values: **automatically generated 
              type: string
            UpdatedDate:
              description: |2-
                 The date when the subscription was last updated.
                **Character limit:** 29


                **Values**: automatically generated 
              format: date-time
              type: string
            Version:
              description: |2-
                 The version number of the subscription.



                **Values**: automatically generated 
              format: int32
              type: integer
          required:
            - ContractEffectiveDate
            - TermType
          type: object
        - $ref: "#/components/schemas/SubscriptionObjectQTFields"
        - $ref: "#/components/schemas/SubscriptionObjectNSFields"
        - $ref: "#/components/schemas/SubscriptionObjectCustomFields"
      description: ""
      title: Subscription
    SubscribeResult:
      properties:
        AccountId:
          description: ""
          type: string
        AccountNumber:
          description: ""
          type: string
        ChargeMetricsData:
          description: ""
          properties:
            ChargeMetrics:
              description: ""
              items:
                $ref: "#/components/schemas/NewChargeMetrics"
              type: array
          type: object
        CreditMemoData:
          description: |
            Container for credit memo data.

            **Note**: This field is only available if you have the Invoice Settlement feature enabled and set the `X-Zuora-WSDL-Version` request header to `107` or later.
          items:
            $ref: "#/components/schemas/ActionSubscribeCreditMemoData"
          type: array
        CreditMemoId:
          description: |
            The ID of the credit memo.

            **Note**: This field is only available if you have the Invoice Settlement feature enabled and set the `X-Zuora-WSDL-Version` request header to `107` or later.
          type: string
        CreditMemoNumber:
          description: |
            The number of the credit memo.

            **Note**: This field is only available if you have the Invoice Settlement feature enabled and set the `X-Zuora-WSDL-Version` request header to `107` or later.
          type: string
        CreditMemoResult:
          description: |
            The result of the credit memo.

            **Note**: This field is only available if you have the Invoice Settlement feature enabled and set the `X-Zuora-WSDL-Version` request header to `107` or later.
          properties:
            CreditMemo:
              description: ""
              items:
                description: ""
                properties:
                  CreditMemoNumber:
                    description: ""
                    type: string
                  Id:
                    description: ""
                    type: string
                type: object
              type: array
          title: CreditMemoResult
          type: object
        Errors:
          description: ""
          items:
            $ref: "#/components/schemas/ActionsErrorResponse"
          type: array
        GatewayResponse:
          description: ""
          type: string
        GatewayResponseCode:
          description: ""
          type: string
        InvoiceData:
          description: ""
          items:
            $ref: "#/components/schemas/ActionSubscribeInvoiceData"
          type: array
        InvoiceId:
          description: ""
          type: string
        InvoiceNumber:
          description: ""
          type: string
        InvoiceResult:
          description: ""
          properties:
            Invoice:
              description: ""
              items:
                description: ""
                properties:
                  Id:
                    description: ""
                    type: string
                  InvoiceNumber:
                    description: ""
                    type: string
                type: object
              type: array
          type: object
        PaymentId:
          description: ""
          type: string
        PaymentTransactionNumber:
          description: ""
          type: string
        SubscriptionId:
          description: ""
          type: string
        SubscriptionNumber:
          description: ""
          type: string
        Success:
          description: ""
          type: boolean
        TotalMrr:
          description: ""
          format: double
          type: number
        TotalTcv:
          description: ""
          format: double
          type: number
      type: object
    SubscriptionObjectCustomFields:
      additionalProperties:
        description: |
          Custom fields of the Subscription object. The name of each custom field has the form <code>*customField*__c</code>. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
      description: |
        Container for custom fields of a Subscription object.
      title: subscriptionFieldsCustom
      type: object
    SubscriptionObjectNSFields:
      description: |
        Container for Subscription fields provided by the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
      properties:
        IntegrationId__NS:
          description: |
            ID of the corresponding object in NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        IntegrationStatus__NS:
          description: |
            Status of the subscription's synchronization with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        Project__NS:
          description: |
            The NetSuite project that the subscription was created from. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        SalesOrder__NS:
          description: |
            The NetSuite sales order than the subscription was created from. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
        SyncDate__NS:
          description: |
            Date when the subscription was synchronized with NetSuite. Only available if you have installed the [Zuora Connector for NetSuite](https://www.zuora.com/connect/app/?appId=265).
          maxLength: 255
          type: string
      title: subscriptionFieldsNS
      type: object
    SubscriptionObjectQTFields:
      description: |
        Container for Subscription fields provided by Zuora Quotes.
      properties:
        CpqBundleJsonId__QT:
          description: |
            The Bundle product structures from Zuora Quotes if you utilize Bundling in Salesforce. Do not change the value in this field.
          maxLength: 32
          type: string
        OpportunityCloseDate__QT:
          description: |
            The closing date of the Opportunity. This field is used in Zuora data sources to report on Subscription metrics. If the subscription originated from Zuora Quotes, the value is populated with the value from Zuora Quotes.
          format: date
          type: string
        OpportunityName__QT:
          description: |
            The unique identifier of the Opportunity. This field is used in Zuora data sources to report on Subscription metrics. If the subscription originated from Zuora Quotes, the value is populated with the value from Zuora Quotes.
          maxLength: 100
          type: string
        QuoteBusinessType__QT:
          description: |
            The specific identifier for the type of business transaction the Quote represents such as New, Upsell, Downsell, Renewal or Churn. This field is used in Zuora data sources to report on Subscription metrics. If the subscription originated from Zuora Quotes, the value is populated with the value from Zuora Quotes.
          maxLength: 32
          type: string
        QuoteNumber__QT:
          description: |
            The unique identifier of the Quote. This field is used in Zuora data sources to report on Subscription metrics. If the subscription originated from Zuora Quotes, the value is populated with the value from Zuora Quotes.
          maxLength: 32
          type: string
        QuoteType__QT:
          description: |
            The Quote type that represents the subscription lifecycle stage such as New, Amendment, Renew or Cancel. This field is used in Zuora data sources to report on Subscription metrics. If the subscription originated from Zuora Quotes, the value is populated with the value from Zuora Quotes.
          maxLength: 32
          type: string
      title: subscriptionFieldsQT
      type: object
    SubscriptionProductFeature:
      allOf:
        - properties:
            CreatedById:
              description: ""
              type: string
            CreatedDate:
              description: |2-
                 Date and time when the product feature was added to the subscription.


                **Character limit**: 29


                **Values**: 
              format: date-time
              type: string
            Description:
              description: |2-
                 Description of the subscription product feature.


                **Character limit**: 500


                **Values**: 
              type: string
            FeatureCode:
              description: |2-
                 Unique code of the feature.


                **Character limit**: 255


                **Values**: 
              type: string
            FeatureId:
              description: |2-
                 Internal Zuora ID of the feature.


                **Character limit**: 32


                **Values**: 
              type: string
            Name:
              description: |2-
                 Name of the feature.


                **Character limit**: 255


                **Values**: 
              type: string
            RatePlanId:
              description: |2-
                 Id of the product rate plan to which the feature belongs.


                **Character limit**: 32


                **Values**: 
              type: string
            UpdatedById:
              description: |2-
                 Internal Zuora ID of the user who last updated the subscription product feature.


                **Character limit**: 32


                **Values**: 
              type: string
            UpdatedDate:
              description: |2-
                 Date and time when the subscription product feature was last updated.


                **Character limit**: 29


                **Values**: 
              format: date-time
              type: string
          required:
            - FeatureId
          type: object
        - $ref: "#/components/schemas/SubscriptionProductFeatureObjectCustomFields"
    SubscriptionProductFeatureList:
      properties:
        SubscriptionProductFeature:
          description: ""
          items:
            $ref: "#/components/schemas/ActionAmendSubscriptionProductFeature"
          type: array
      type: object
    SubscriptionProductFeatureObjectCustomFields:
      additionalProperties:
        description: |
          Custom fields of the Subscription Product Feature object. The name of each custom field has the form <code>*customField*__c</code>. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
      description: |
        Container for custom fields of a Subscription Product Feature object.
      title: subscriptionProductFeatureFieldsCustom
      type: object
    Task:
      description: |
        A task.
      properties:
        action_type:
          description: |
            The type of the task.
          enum:
            - Approval
            - Attachment
            - Billing::BillRun
            - Billing::CurrencyConversion
            - Billing::CustomInvoice
            - Callout
            - Cancel
            - Create
            - CustomObject::Create
            - CustomObject::Delete
            - CustomObject::Query
            - CustomObject::Update
            - Data::BillingPreviewRun
            - Data::Link
            - Delay
            - Delete
            - Download::SFTP
            - Email
            - Export
            - File::CustomPDF::CustomDocument
            - If
            - InvoiceGenerate
            - Iterate
            - Logic::CSVTranslator
            - Logic::Case
            - Logic::CustomCode
            - Logic::JSONTransform
            - Logic::Lambda
            - Logic::ResponseFormatter
            - Logic::XMLTransform
            - NewProduct
            - Notifications::GoogleCloudPrint
            - Notifications::PhoneCall
            - Notifications::SMS
            - Payment::GatewayReconciliation
            - Payment::PaymentRun
            - Query
            - RemoveProduct
            - Reporting::ReportData
            - Reporting::RunReport
            - Resume
            - Suspend
            - UI::Page
            - UI::Stop
            - Update
            - Upload::FTP
            - Upload::SFTP
            - WriteOff
          type: string
        call_type:
          description: |
            The type of API used.
          type: string
        concurrent_limit:
          description: the number of concurrent tasks that are allowed to run simultaneously
          type: integer
        data:
          description: |
            The data payload for the task.
          type: object
        end_time:
          description: |
            If **Instance** is **true**, the end time of the task instance.
          type: string
        error:
          description: |
            If **Instance** is **true** and **status** is **Error**, the error reason of the task instance failure.
          type: string
        error_class:
          description: |
            If **Instance** is **true** and **status** is **Error**, the error class of the task instance failure.
          type: string
        error_details:
          description: |
            If **Instance** is **true** and **status** is **Error**, the error details of the task instance failure.
          type: string
        id:
          description: |
            The unique ID of the task.
          type: integer
        instance:
          description: |
            Indicates whether this task belongs to an instance of a workflow.
          type: boolean
        name:
          description: |
            The name of the task.
          type: string
        object:
          description: |
            The selected object for the task.
          type: string
        object_id:
          description: |
            The id of the selected object of the task.
          type: string
        original_task_id:
          description: |
            If **Instance** is **true**, the ID of the original task in the original workflow.
          type: integer
        original_workflow_id:
          description: |
            If **Instance** is **true**, the ID of the original workflow.
          type: integer
        parameters:
          description: |
            The configuration of the task.
          type: object
        start_time:
          description: |
            If **Instance** is **true**, the start time of the task instance.
          type: string
        status:
          description: |
            If **Instance** is **true**, the status of the task instance.
          enum:
            - Queued
            - Processing
            - Pending
            - Success
            - Stopped
            - Error
          type: string
        tags:
          description: |
            The array of filter tags.
          items:
            type: string
          type: array
        task_id:
          description: the id of this task's parent task. Will be null if this is the first task of the workflow
          type: integer
        workflow_id:
          description: |
            The ID of the workflow that the task belongs to.
          type: integer
      type: object
    TasksResponse:
      properties:
        data:
          description: |
            The list of tasks retrieved.
          items:
            $ref: "#/components/schemas/Task"
          type: array
        pagination:
          description: |
            An object containing pagination information for the list of tasks returned by the API.
          properties:
            next_page:
              description: |
                A string containing the URL where the next page of data can be retrieved.
              type: string
            page:
              description: |
                An integer denoting the current page number.
              type: integer
            page_length:
              description: |
                An integer denoting the number of tasks in this response.
              type: integer
          type: object
      type: object
    TaxInfo:
      description: |
        Information about the tax exempt status of a customer account.
      properties:
        VATId:
          description: |
            EU Value Added Tax ID.

            **Note:** This feature is in Limited Availability. If you wish to have access to the feature, submit a request at [Zuora Global Support](https://support.zuora.com).
          maxLength: 25
          type: string
        companyCode:
          description: |
            Unique code that identifies a company account in Avalara. Use this field to calculate taxes based on origin and sold-to addresses in Avalara.

            **Note:** This feature is in Limited Availability. If you wish to have access to the feature, submit a request at [Zuora Global Support](https://support.zuora.com).
          maxLength: 50
          type: string
        exemptCertificateId:
          description: |
            ID of the customer tax exemption certificate. Applicable if you use Zuora Tax or Connect tax engines.
          maxLength: 32
          type: string
        exemptCertificateType:
          description: |
            Type of tax exemption certificate that the customer holds. Applicable if you use Zuora Tax or Connect tax engines.
          maxLength: 32
          type: string
        exemptDescription:
          description: |
            Description of the tax exemption certificate that the customer holds. Applicable if you use Zuora Tax or Connect tax engines.
          maxLength: 500
          type: string
        exemptEffectiveDate:
          description: |
            Date when the customer tax exemption starts, in YYYY-MM-DD format. Applicable if you use Zuora Tax or Connect tax engines.
          format: date
          type: string
        exemptExpirationDate:
          description: |
            Date when the customer tax exemption expires, in YYYY-MM-DD format. Applicable if you use Zuora Tax or Connect tax engines.
          format: date
          type: string
        exemptIssuingJurisdiction:
          description: |
            Jurisdiction in which the customer tax exemption certificate was issued.
          maxLength: 32
          type: string
        exemptStatus:
          default: No
          description: |
            Status of the account tax exemption. Applicable if you use Zuora Tax or Connect tax engines. Required if you use Zuora Tax. 
          enum:
            - No
            - Yes
            - PendingVerification
          type: string
      title: taxInfo
      type: object
    TaxationItemObjectCustomFields:
      additionalProperties:
        description: |
          Custom fields of the Taxation Item object. The name of each custom field has the form <code>*customField*__c</code>. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
      description: |
        Container for custom fields of a Taxation Item object.
      title: taxationItemFieldsCustom
      type: object
    Term:
      description: |
        List of terms for the subscription.
      properties:
        endDate:
          description: |
            The end date of the term.
          format: date
          type: string
        isEvergreen:
          description: |
            Indicates whether the term is evergreen.
          type: boolean
        startDate:
          description: |
            The start date of the term.
          format: date
          type: string
        termNumber:
          description: |
            The term number.
          format: long
          type: number
      type: object
    TermsAndConditions:
      description: |
        Information about an order action of type `TermsAndConditions`.
      properties:
        autoRenew:
          type: boolean
        initialTerm:
          $ref: "#/components/schemas/InitialTerm"
        renewalSetting:
          enum:
            - RENEW_WITH_SPECIFIC_TERM
            - RENEW_TO_EVERGREEN
          type: string
        renewalTerms:
          items:
            $ref: "#/components/schemas/RenewalTerm"
          type: array
      title: termsAndConditions
      type: object
    TimeSlicedElpNetMetrics:
      properties:
        amount:
          description: The extended list price which is calculated by the original product catalog list price multiplied by the delta quantity.
          type: number
        endDate:
          description: The latest date that the metric applies.
          format: date
          type: string
        generatedReason:
          description: |
            Specify the reason why the metrics are generated by the certain order action.
          enum:
            - IncreaseQuantity
            - DecreaseQuantity
            - ChangePrice
            - Extension
            - Contraction
          type: string
        invoiceOwner:
          description: The acount number of the billing account that is billed for the subscription.
          type: string
        orderItemId:
          description: The ID of the order item referenced by the order metrics.
          type: string
        startDate:
          description: The earliest date that the metric applies.
          format: date
          type: string
        subscriptionOwner:
          description: The acount number of the billing account that owns the subscription.
          type: string
        tax:
          description: The tax amount in the metric when the tax permission is enabled.
          type: number
        termNumber:
          format: long
          type: number
        type:
          description: The type for ELP is always "Regular".
          enum:
            - Regular
            - Discount
          type: string
      type: object
    TimeSlicedMetrics:
      properties:
        amount:
          type: number
        endDate:
          format: date
          type: string
        generatedReason:
          description: |
            Specify the reason why the metrics are generated by the certain order action.

            This field is only available to existing Orders customers who already have access to the field.

            **Note:** The following Order Metrics have been deprecated. Any new customers who onboard on [Orders](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/AA_Overview_of_Orders) or [Orders Harmonization](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Orders_Harmonization/Orders_Harmonization) will not get these metrics.
            * The Order ELP and Order Item objects 
            * The "Generated Reason" and "Order Item ID" fields in the Order MRR, Order TCB, Order TCV, and Order Quantity objects

            Existing Orders customers who have these metrics will continue to be supported.
          enum:
            - IncreaseQuantity
            - DecreaseQuantity
            - ChangePrice
            - Extension
            - Contraction
          type: string
        invoiceOwner:
          description: The acount number of the billing account that is billed for the subscription.
          type: string
        orderItemId:
          description: |
            The ID of the order item referenced by the order metrics.

            This field is only available to existing Orders customers who already have access to the field.

            **Note:** The following Order Metrics have been deprecated. Any new customers who onboard on [Orders](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/AA_Overview_of_Orders) or [Orders Harmonization](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Orders_Harmonization/Orders_Harmonization) will not get these metrics.
            * The Order ELP and Order Item objects 
            * The "Generated Reason" and "Order Item ID" fields in the Order MRR, Order TCB, Order TCV, and Order Quantity objects

            Existing Orders customers who have these metrics will continue to be supported.
          type: string
        startDate:
          format: date
          type: string
        subscriptionOwner:
          description: The acount number of the billing account that owns the subscription.
          type: string
        termNumber:
          format: long
          type: number
      type: object
    TimeSlicedMetricsForEvergreen:
      properties:
        amount:
          type: number
        endDate:
          format: date
          type: string
        invoiceOwner:
          description: The acount number of the billing account that is billed for the subscription.
          type: string
        startDate:
          format: date
          type: string
        subscriptionOwner:
          description: The acount number of the billing account that owns the subscription.
          type: string
        termNumber:
          format: long
          type: number
      type: object
    TimeSlicedNetMetrics:
      properties:
        amount:
          type: number
        discountChargeNumber:
          type: string
        endDate:
          format: date
          type: string
        generatedReason:
          description: |
            Specify the reason why the metrics are generated by the certain order action.

            This field is only available to existing Orders customers who already have access to the field.

            **Note:** The following Order Metrics have been deprecated. Any new customers who onboard on [Orders](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/AA_Overview_of_Orders) or [Orders Harmonization](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Orders_Harmonization/Orders_Harmonization) will not get these metrics.
            * The Order ELP and Order Item objects 
            * The "Generated Reason" and "Order Item ID" fields in the Order MRR, Order TCB, Order TCV, and Order Quantity objects

            Existing Orders customers who have these metrics will continue to be supported.
          enum:
            - IncreaseQuantity
            - DecreaseQuantity
            - ChangePrice
            - Extension
            - Contraction
          type: string
        invoiceOwner:
          description: The acount number of the billing account that is billed for the subscription.
          type: string
        orderItemId:
          description: |
            The ID of the order item referenced by the order metrics.

            This field is only available to existing Orders customers who already have access to the field.

            **Note:** The following Order Metrics have been deprecated. Any new customers who onboard on [Orders](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/AA_Overview_of_Orders) or [Orders Harmonization](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Orders_Harmonization/Orders_Harmonization) will not get these metrics.
            * The Order ELP and Order Item objects 
            * The "Generated Reason" and "Order Item ID" fields in the Order MRR, Order TCB, Order TCV, and Order Quantity objects

            Existing Orders customers who have these metrics will continue to be supported.
          type: string
        startDate:
          format: date
          type: string
        subscriptionOwner:
          description: The acount number of the billing account that owns the subscription.
          type: string
        termNumber:
          format: long
          type: number
        type:
          description: Indicates whether this metrics is for a regular charge or a discount charge.
          enum:
            - Regular
            - Discount
          type: string
      type: object
    TimeSlicedNetMetricsForEvergreen:
      properties:
        amount:
          type: number
        discountChargeNumber:
          type: string
        endDate:
          format: date
          type: string
        invoiceOwner:
          description: The acount number of the billing account that is billed for the subscription.
          type: string
        startDate:
          format: date
          type: string
        subscriptionOwner:
          description: The acount number of the billing account that owns the subscription.
          type: string
        termNumber:
          format: long
          type: number
        type:
          description: Indicates whether this metrics is for a regular charge or a discount. charge.
          enum:
            - Regular
            - Discount
          type: string
      type: object
    TimeSlicedTcbNetMetrics:
      properties:
        amount:
          type: number
        discountChargeNumber:
          type: string
        endDate:
          format: date
          type: string
        generatedReason:
          description: |
            Specify the reason why the metrics are generated by the certain order action.

            This field is only available to existing Orders customers who already have access to the field.

            **Note:** The following Order Metrics have been deprecated. Any new customers who onboard on [Orders](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/AA_Overview_of_Orders) or [Orders Harmonization](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Orders_Harmonization/Orders_Harmonization) will not get these metrics.
            * The Order ELP and Order Item objects 
            * The "Generated Reason" and "Order Item ID" fields in the Order MRR, Order TCB, Order TCV, and Order Quantity objects

            Existing Orders customers who have these metrics will continue to be supported.
          enum:
            - IncreaseQuantity
            - DecreaseQuantity
            - ChangePrice
            - Extension
            - Contraction
          type: string
        invoiceOwner:
          description: The acount number of the billing account that is billed for the subscription.
          type: string
        orderItemId:
          description: |
            The ID of the order item referenced by the order metrics.

            This field is only available to existing Orders customers who already have access to the field.

            **Note:** The following Order Metrics have been deprecated. Any new customers who onboard on [Orders](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/AA_Overview_of_Orders) or [Orders Harmonization](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Orders_Harmonization/Orders_Harmonization) will not get these metrics.
            * The Order ELP and Order Item objects 
            * The "Generated Reason" and "Order Item ID" fields in the Order MRR, Order TCB, Order TCV, and Order Quantity objects

            Existing Orders customers who have these metrics will continue to be supported.
          type: string
        startDate:
          format: date
          type: string
        subscriptionOwner:
          description: The acount number of the billing account that owns the subscription.
          type: string
        tax:
          type: number
        termNumber:
          format: long
          type: number
        type:
          description: Indicates whether this metrics is for a regular charge or a discount charge.
          enum:
            - Regular
            - Discount
          type: string
      type: object
    TimeSlicedTcbNetMetricsForEvergreen:
      properties:
        amount:
          type: number
        discountChargeNumber:
          type: string
        endDate:
          format: date
          type: string
        invoiceOwner:
          description: The acount number of the billing account that is billed for the subscription.
          type: string
        startDate:
          format: date
          type: string
        subscriptionOwner:
          description: The acount number of the billing account that owns the subscription.
          type: string
        tax:
          type: number
        termNumber:
          format: long
          type: number
        type:
          description: Indicates whether this metrics is for a regular charge or a discount. charge.
          enum:
            - Regular
            - Discount
          type: string
      type: object
    TransferPaymentType:
      example:
        accountId: 4028905f5a87c0ff015a88889fe500a8
      properties:
        accountId:
          description: |
            The ID of the customer account that the payment is transferred to.
          type: string
      type: object
    TriggerDate:
      properties:
        name:
          description: |
            Name of the trigger date of the order action.
          enum:
            - ContractEffective
            - ServiceActivation
            - CustomerAcceptance
          type: string
        triggerDate:
          description: |
            Trigger date in YYYY-MM-DD format.
          format: date
          type: string
      title: triggerDate
      type: object
    TriggerParams:
      description: |
        Specifies when a charge becomes active.
      properties:
        specificTriggerDate:
          description: |
            Date in YYYY-MM-DD format. Only applicable if the value of the `triggerEvent` field is `SpecificDate`. 

            While this field is applicable, if this field is not set, your `CreateSubscription` order action creates a `Pending` order and a `Pending Acceptance` subscription. If at the same time the service activation date is required and not set, a `Pending Activation` subscription is created.

            While this field is applicable, if this field is not set, the following order actions create a `Pending` order but do not impact the subscription status. **Note**: This feature is in **Limited Availability**. If you want to have access to the feature, submit a request at [Zuora Global Support](http://support.zuora.com/).
             * AddProduct
             * UpdateProduct
             * RemoveProduct
             * RenewSubscription
             * TermsAndConditions
          format: date
          type: string
        triggerEvent:
          description: |
            Condition for the charge to become active.

            If the value of this field is `SpecificDate`, use the `specificTriggerDate` field to specify the date when the charge becomes active.
          enum:
            - ContractEffective
            - ServiceActivation
            - CustomerAcceptance
          type: string
      title: startDate
      type: object
    UnapplyCreditMemoType:
      example:
        effectiveDate: 2017-03-02
        invoices:
          - amount: 1
            invoiceId: 4028905f5a87c0ff015a87d3f8f10043
            items:
              - amount: 0.9
                creditMemoItemId: 4028905f5a890526015a8d73f74b0016
                invoiceItemId: 4028905f5a87c0ff015a87d3f90c0045
              - amount: 0.1
                creditTaxItemId: 4028905f5a890526015a8d73f90c0018
                taxItemId: 4028905f5a87c0ff015a87d3f884003f
      properties:
        debitMemos:
          description: |
            Container for debit memos that the credit memo is unapplied from. The maximum number of debit memos is 1,000.
          items:
            $ref: "#/components/schemas/CreditMemoUnapplyDebitMemoRequestType"
          type: array
        effectiveDate:
          description: |
            The date when the credit memo is unapplied.
          format: date
          type: string
        invoices:
          description: |
            Container for invoices that the credit memo is unapplied from. The maximum number of invoices is 1,000.
          items:
            $ref: "#/components/schemas/CreditMemoUnapplyInvoiceRequestType"
          type: array
      type: object
    UnapplyPaymentType:
      example:
        debitMemos:
          - amount: 1.02
            debitMemoId: 4028905f5a87c0ff015a87e49e6b0062
            items:
              - amount: 1
                debitMemoItemId: 4028905f5a87c0ff015a87e49e7a0063
              - amount: 0.02
                taxItemId: 4028905f5a87c0ff015a87e49f5e0065
        effectiveDate: 2017-03-01
        invoices:
          - amount: 10.1
            invoiceId: 4028905f5a87c0ff015a87d3f8f10043
            items:
              - amount: 10
                invoiceItemId: 4028905f5a87c0ff015a87d3f90c0045
              - amount: 0.1
                taxItemId: 4028905f5a87c0ff015a87d3f884003f
      properties:
        debitMemos:
          description: |
            Container for debit memos. The maximum number of debit memos is 1,000.
          items:
            $ref: "#/components/schemas/PaymentDebitMemoApplicationUnapplyRequestType"
          type: array
        effectiveDate:
          description: |
            The date when the payment is unapplied, in `yyyy-mm-dd` format.
          format: date
          type: string
        invoices:
          description: |
            Container for invoices. The maximum number of invoice is 1,000.
          items:
            $ref: "#/components/schemas/PaymentInvoiceApplicationUnapplyRequestType"
          type: array
      type: object
    UpdateCustomObjectCusotmField:
      description: A reference to a field.
      properties:
        definition:
          $ref: "#/components/schemas/CustomObjectCustomFieldDefinitionUpdate"
        filterable:
          description: |
            Indicates whether the field is filterable or not. Applicable to `addField` and `updateField` actions.

            You can change a filterable field to non-filterable and vice versa. You can also add a filterable field. One custom object can have a maximum of 10 filterable fields.

            Note that changing filterable fields triggers reindexing. It will take 12-24 hours before all your data are reindexed and available to query.
          type: boolean
        name:
          description: The name of the custom field to be updated
          type: string
        required:
          description: |
            Indicates whether the field is required or optional.

            You can update a required field to optional. On the other hand, you can only update an optional field to required on the custom object with no records.

            You can only add a required field to the custom object with no records.
          type: boolean
        targetName:
          description: Required if the `type` of the action is `renameField`
          type: string
      type: object
    UpdateEntityResponseType:
      properties:
        success:
          description: Returns `true` if the request is successful.
          type: boolean
      type: object
    UpdateEntityType:
      example:
        displayName: Acme-Italy
        locale: en_GB
        name: Acme-Italy
        timezone: Europe/Rome
      properties:
        displayName:
          description: |-
            The display name of the entity that is shown in the Zuora UI and APIs

            **Note:** If you do not specify the display name in the request, the entity name is used as the display name.
          maxLength: 255
          type: string
        locale:
          description: The locale that is used in this entity.
          type: string
        name:
          description: |-
            The name of the entity that is the entity identifier and is unique across all entities in a multi-entity hierarchy.

            **Note:** Only alphanumeric characters (letters A–Z and a–z, and digits 0–9), space, period, and hyphen are allowed to be used in entity names. 
          maxLength: 255
          type: string
        timezone:
          description: The time zone that is used in this entity.
          type: string
      type: object
    UpdatePaymentType:
      allOf:
        - properties:
            comment:
              description: |
                Comments about the payment.
              maxLength: 255
              minLength: 0
              type: string
            financeInformation:
              description: |
                Container for the finance information related to the payment.

                For a standalone payment, the finance information cannot be updated.
              properties:
                bankAccountAccountingCode:
                  description: |
                    The accounting code that maps to a bank account in your accounting system.
                  maxLength: 100
                  minLength: 0
                  type: string
                transferredToAccounting:
                  description: |
                    Whether the payment was transferred to an external accounting system. Use this field for integration with accounting systems, such as NetSuite. 
                  enum:
                    - Processing
                    - Yes
                    - No
                    - Error
                    - Ignore
                  type: string
                unappliedPaymentAccountingCode:
                  description: |
                    The accounting code for the unapplied payment.
                  maxLength: 100
                  minLength: 0
                  type: string
              type: object
            referenceId:
              description: |
                The transaction ID returned by the payment gateway. Use this field to reconcile payments between your gateway and Zuora Payments.

                You can only update the reference ID for external payments.
              maxLength: 100
              minLength: 0
              type: string
          type: object
        - $ref: "#/components/schemas/PaymentObjectNSFields"
        - $ref: "#/components/schemas/PaymentObjectCustomFields"
      example:
        comment: new comment
        financeInformation:
          transferredToAccounting: No
    UpdateTask:
      description: |
        A task.
      properties:
        action_type:
          description: |
            The type of task.
          type: string
        call_type:
          description: |
            The type of the API used.
          type: string
        concurrent_limit:
          description: |
            The maximum number of this task that can run concurrently.
          maximum: 9999999
          minimum: 1
          type: integer
        id:
          description: |
            The unique ID of the task.
          type: integer
        name:
          description: |
            The name of the task.
          type: string
        object:
          description: |
            The selected object for the task.
          type: string
        object_id:
          description: |
            The ID of the selected object of the task.
          type: string
        status:
          description: |
            The status of the task instance.
          enum:
            - Queued
            - Processing
            - Pending
            - Success
            - Stopped
            - Error
          type: string
        tags:
          description: |
            The array of filter tags.
          items:
            type: string
          type: array
        workflow_id:
          description: |
            The ID of the workflow the task belongs too.
          type: integer
      required:
        - id
      title: task
      type: object
    Usage:
      description: |
        The task usage of a particular day.
      properties:
        date:
          description: |
            The date when the usage record is created.
          type: string
        values:
          properties:
            taskCount:
              description: |
                The amount of task runs that have been used.
              type: integer
          type: object
      type: object
    UsageFlatFeePricingOverride:
      allOf:
        - $ref: "#/components/schemas/PriceChangeParams"
        - properties:
            listPrice:
              description: |
                Price of the charge.
              type: number
          type: object
      description: |
        Pricing information about a usage charge that uses the "flat fee" charge model. In this charge model, the charge has a fixed price.
      title: usageFlatFee
    UsageFlatFeePricingUpdate:
      allOf:
        - $ref: "#/components/schemas/PriceChangeParams"
        - properties:
            listPrice:
              type: number
          type: object
    UsageObjectCustomFields:
      additionalProperties:
        description: |
          Custom fields of the Usage object. The name of each custom field has the form <code>*customField*__c</code>. Custom field names are case sensitive. See [Manage Custom Fields](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Manage_Custom_Fields) for more information.
      description: |
        Container for custom fields of a Usage object.
      title: usageFieldsCustom
      type: object
    UsageOveragePricingOverride:
      allOf:
        - $ref: "#/components/schemas/PriceChangeParams"
        - properties:
            includedUnits:
              description: |
                Number of free units that may be consumed.
              minimum: 0
              type: number
            numberOfPeriods:
              description: |
                Number of periods that Zuora considers when calculating overage charges with overage smoothing.
              minimum: 1
              type: integer
            overagePrice:
              description: |
                Price per overage unit consumed.
              type: number
            overageUnusedUnitsCreditOption:
              description: |
                Specifies whether to credit the customer for unused units.

                If the value of this field is `CreditBySpecificRate`, use the `unusedUnitsCreditRates` field to specify the rate at which to credit the customer for unused units.
              enum:
                - NoCredit
                - CreditBySpecificRate
              type: string
            unusedUnitsCreditRates:
              description: |
                Per-unit rate at which to credit the customer for unused units. Only applicable if the value of the `overageUnusedUnitsCreditOption` field is `CreditBySpecificRate`.
              type: number
          type: object
      description: |
        Pricing information about a usage charge that uses the "overage" charge model. In this charge model, the charge has an allowance of free units and a fixed price per additional unit consumed.
      title: usageOverage
    UsageOveragePricingUpdate:
      allOf:
        - $ref: "#/components/schemas/PriceChangeParams"
        - properties:
            includedUnits:
              description: |
                A certain quantity of units for free in the overage charge model. It cannot be negative. It must be 0 and above. Decimals are allowed.
              type: number
            overagePrice:
              type: number
          type: object
    UsagePerUnitPricingOverride:
      allOf:
        - $ref: "#/components/schemas/PriceChangeParams"
        - properties:
            listPrice:
              description: |
                Per-unit price of the charge.
              type: number
            ratingGroup:
              description: |
                Specifies how Zuora groups usage records when rating usage. See [Usage Rating by Group](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/J_Billing_Operations/Usage/Usage_Rating_by_Group) for more information.
                  * ByBillingPeriod (default): The rating is based on all the usages in a billing period.
                  * ByUsageStartDate: The rating is based on all the usages on the same usage start date. 
                  * ByUsageRecord: The rating is based on each usage record.
                  * ByUsageUpload: The rating is based on all the usages in a uploaded usage file (.xls or .csv). If you import a mass usage in a single upload, which contains multiple usage files in .xls or .csv format, usage records are grouped for each usage file.
              enum:
                - ByBillingPeriod
                - ByUsageStartDate
                - ByUsageRecord
                - ByUsageUpload
              type: string
          type: object
      description: |
        Pricing information about a usage charge that uses the "per unit" charge model. In this charge model, the charge has a fixed price per unit consumed.
      title: usagePerUnit
    UsagePerUnitPricingUpdate:
      allOf:
        - $ref: "#/components/schemas/PriceChangeParams"
        - properties:
            listPrice:
              type: number
          type: object
    UsageTieredPricingOverride:
      allOf:
        - $ref: "#/components/schemas/PriceChangeParams"
        - properties:
            ratingGroup:
              description: |
                Specifies how Zuora groups usage records when rating usage. See [Usage Rating by Group](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/J_Billing_Operations/Usage/Usage_Rating_by_Group) for more information.
                  * ByBillingPeriod (default): The rating is based on all the usages in a billing period.
                  * ByUsageStartDate: The rating is based on all the usages on the same usage start date. 
                  * ByUsageRecord: The rating is based on each usage record.
                  * ByUsageUpload: The rating is based on all the usages in a uploaded usage file (.xls or .csv). If you import a mass usage in a single upload, which contains multiple usage files in .xls or .csv format, usage records are grouped for each usage file.
              enum:
                - ByBillingPeriod
                - ByUsageStartDate
                - ByUsageRecord
                - ByUsageUpload
              type: string
            tiers:
              description: |
                List of cumulative pricing tiers in the charge.
              items:
                $ref: "#/components/schemas/ChargeTier"
              type: array
          type: object
      description: |
        Pricing information about a usage charge that uses the "tiered pricing" charge model. In this charge model, the charge has cumulative pricing tiers that become effective as units are consumed.
      title: usageTiered
    UsageTieredPricingUpdate:
      allOf:
        - $ref: "#/components/schemas/PriceChangeParams"
        - properties:
            tiers:
              items:
                $ref: "#/components/schemas/ChargeTier"
              type: array
          type: object
    UsageTieredWithOveragePricingOverride:
      allOf:
        - $ref: "#/components/schemas/PriceChangeParams"
        - properties:
            numberOfPeriods:
              description: |
                Number of periods that Zuora considers when calculating overage charges with overage smoothing.
              minimum: 1
              type: integer
            overagePrice:
              description: |
                Price per overage unit consumed.
              type: number
            overageUnusedUnitsCreditOption:
              description: |
                Specifies whether to credit the customer for unused units.

                If the value of this field is `CreditBySpecificRate`, use the `unusedUnitsCreditRates` field to specify the rate at which to credit the customer for unused units.
              enum:
                - NoCredit
                - CreditBySpecificRate
              type: string
            tiers:
              description: |
                List of cumulative pricing tiers in the charge.
              items:
                $ref: "#/components/schemas/ChargeTier"
              type: array
            unusedUnitsCreditRates:
              description: |
                Per-unit rate at which to credit the customer for unused units. Only applicable if the value of the `overageUnusedUnitsCreditOption` field is `CreditBySpecificRate`.
              type: number
          type: object
      description: |
        Pricing information about a usage charge that uses the "tiered with overage" charge model. In this charge model, the charge has cumulative pricing tiers that become effective as units are consumed. The charge also has a fixed price per unit consumed beyond the limit of the final tier.
      title: usageTieredWithOverage
    UsageTieredWithOveragePricingUpdate:
      allOf:
        - $ref: "#/components/schemas/PriceChangeParams"
        - properties:
            overagePrice:
              type: number
            tiers:
              items:
                $ref: "#/components/schemas/ChargeTier"
              type: array
          type: object
    UsageVolumePricingOverride:
      allOf:
        - $ref: "#/components/schemas/PriceChangeParams"
        - properties:
            ratingGroup:
              description: |
                Specifies how Zuora groups usage records when rating usage. See [Usage Rating by Group](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/J_Billing_Operations/Usage/Usage_Rating_by_Group) for more information.
                  * ByBillingPeriod (default): The rating is based on all the usages in a billing period.
                  * ByUsageStartDate: The rating is based on all the usages on the same usage start date. 
                  * ByUsageRecord: The rating is based on each usage record.
                  * ByUsageUpload: The rating is based on all the usages in a uploaded usage file (.xls or .csv). If you import a mass usage in a single upload, which contains multiple usage files in .xls or .csv format, usage records are grouped for each usage file.
              enum:
                - ByBillingPeriod
                - ByUsageStartDate
                - ByUsageRecord
                - ByUsageUpload
              type: string
            tiers:
              description: |
                List of variable pricing tiers in the charge.
              items:
                $ref: "#/components/schemas/ChargeTier"
              type: array
          type: object
      description: |
        Pricing information about a usage charge that uses the "volume pricing" charge model. In this charge model, the charge has a variable price per unit, depending on how many units are consumed.
      title: usageVolume
    UsageVolumePricingUpdate:
      allOf:
        - $ref: "#/components/schemas/PriceChangeParams"
        - properties:
            tiers:
              items:
                $ref: "#/components/schemas/ChargeTier"
              type: array
          type: object
    UsagesResponse:
      properties:
        metrics:
          description: |
            The list of tasks retrieved.
          items:
            $ref: "#/components/schemas/Usage"
          type: array
      type: object
    ValidationErrors:
      properties:
        reasons:
          description: The list of reasons that the request was unsuccessful
          items:
            $ref: "#/components/schemas/ValidationReasons"
          title: validation reasons
          type: array
        success:
          description: Returns `false` if the request was not successful.
          type: boolean
      type: object
    ValidationReasons:
      properties:
        fieldName:
          description: The name of the invalid field
          type: string
        title:
          description: A description why that field is invalid
          type: string
      type: object
    Workflow:
      description: |
        A workflow.
      properties:
        calloutTrigger:
          description: |
            Indicates whether the callout trigger is enabled for the retrieved workflow.
          type: boolean
        createdAt:
          description: |
            The date and time when the workflow is created, in the `YYYY-MM-DD HH:MM:SS` format.
          format: datetime
          type: string
        description:
          description: |
            The description of the workflow.
          type: string
        id:
          description: |
            The unique ID of the workflow.
          type: integer
        interval:
          description: |
            The schedule of the workflow, in a CRON expression. Returns null if the schedued trigger is disabled.
          type: string
        name:
          description: |
            The name of the workflow.
          type: string
        ondemandTrigger:
          description: |
            Indicates whether the ondemand trigger is enabled for the workflow.
          type: boolean
        scheduledTrigger:
          description: |
            Indicates whether the scheduled trigger is enabled for the workflow.
          type: boolean
        timezone:
          description: |
            The timezone that is configured for the scheduler of the workflow. Returns null if the scheduled trigger is disabled.
          type: string
        type:
          description: |
            The type of the workflow. Currently the only valid value is 'Workflow::Setup'.
          enum:
            - Workflow::Setup
            - Workflow::Instance
          type: string
        updatedAt:
          description: |
            The date and time when the workflow is updated the last time, in the `YYYY-MM-DD HH:MM:SS` format.
          format: datetime
          type: string
      title: workflow
      type: object
    WorkflowError:
      properties:
        code:
          description: A short error code describing the error
          enum:
            - invalid
          type: string
        status:
          description: The http status code for this error
          type: integer
        title:
          description: A human readable description describing the error
          type: string
      type: object
    WorkflowInstance:
      description: A instance workflow object.
      properties:
        createdAt:
          description: |
            The date and time when the workflow is created, in the `YYYY-MM-DD HH:MM:SS` format.
          format: datetime
          type: string
        id:
          description: |
            The unique ID of the workflow.
          type: integer
        name:
          description: |
            The run number of this workflow instance
          type: string
        originalWorkflowId:
          description: |
            The identifier of the workflow template that is used to create this instance.
          type: integer
        status:
          description: |
            Describes the current state of this workflow instance:
              - Queued: The workflow is in queue for being processed.
              - Processing: The workflow is in process.
          enum:
            - Queued
            - Processing
          type: string
        updatedAt:
          description: |
            The date and time the last time when the workflow is updated, in the `YYYY-MM-DD HH:MM:SS` format.
          format: datetime
          type: string
      type: object
    creditCard:
      description: |
        Default payment method associated with an account. Only credit card payment methods are supported.
      properties:
        cardHolderInfo:
          $ref: "#/components/schemas/AccountCreditCardHolder"
        cardNumber:
          description: |
            Card number. Once set, you cannot update or query the value of this field. The value of this field is only available in masked format. For example, XXXX-XXXX-XXXX-1234 (hyphens must not be used when you set the credit card number).
          type: string
        cardType:
          description: |
            Type of card.
          enum:
            - Visa
            - MasterCard
            - AmericanExpress
            - Discover
            - JCB
            - Diners
            - CUP
            - Maestro
            - Electron
            - AppleVisa
            - AppleMasterCard
            - AppleAmericanExpress
            - AppleDiscover
            - AppleJCB
            - Elo
            - Hipercard
            - Naranja
            - Nativa
            - TarjetaShopping
            - Cencosud
            - Argencard
            - Cabal
          type: string
        expirationMonth:
          description: |
            Expiration date of the card.
          maximum: 12
          minimum: 1
          type: integer
        expirationYear:
          description: |
            Expiration year of the card.
          maximum: 2500
          minimum: 1980
          type: integer
        securityCode:
          description: |
            CVV or CVV2 security code of the card. To ensure PCI compliance, Zuora does not store the value of this field.
          type: string
      type: object
    orderMetric:
      description: The set of order metrics for an order action.
      properties:
        chargeNumber:
          type: string
        elp:
          description: |
            The extended list price which is calculated by the original product catalog list price multiplied by the delta quantity.

            The `elp` nested field is only available to existing Orders customers who already have access to the field.

            **Note:** The following Order Metrics have been deprecated. Any new customers who onboard on [Orders](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/AA_Overview_of_Orders) or [Orders Harmonization](https://knowledgecenter.zuora.com/Billing/Subscriptions/Orders/Orders_Harmonization/Orders_Harmonization) will not get these metrics.
            * The Order ELP and Order Item objects 
            * The "Generated Reason" and "Order Item ID" fields in the Order MRR, Order TCB, Order TCV, and Order Quantity objects

            Existing Orders customers who have these metrics will continue to be supported.
          items:
            $ref: "#/components/schemas/TimeSlicedElpNetMetrics"
          type: array
        mrr:
          items:
            $ref: "#/components/schemas/TimeSlicedNetMetrics"
          type: array
        originRatePlanId:
          type: string
        productRatePlanChargeId:
          type: string
        productRatePlanId:
          type: string
        quantity:
          items:
            $ref: "#/components/schemas/TimeSlicedMetrics"
          type: array
        tcb:
          description: Total contracted billing which is the forecast value for the total invoice amount.
          items:
            $ref: "#/components/schemas/TimeSlicedTcbNetMetrics"
          type: array
        tcv:
          description: Total contracted value.
          items:
            $ref: "#/components/schemas/TimeSlicedNetMetrics"
          type: array
      type: object
    tokenResponse:
      properties:
        access_token:
          description: The generated token.
          type: string
        expires_in:
          description: The number of seconds until the token expires.
          type: number
        jti:
          description: A globally unique identifier for the token.
          type: string
        scope:
          description: A space-delimited list of scopes that the token can be used to access.
          type: string
        token_type:
          description: The type of token that was generated, i.e., `bearer`.
          type: string
      type: object
    zObject:
      additionalProperties:
        description: |
          Field of the object.
      type: object
    zObject_update:
      allOf:
        - properties:
            Id:
              description: ""
              type: string
            fieldsToNull:
              description: |
                Used to set a list of fields to null.
              items:
                type: string
              type: array
          required:
            - Id
          type: object
        - $ref: "#/components/schemas/zObject"
      title: zObject
